by daoif
npx tokless install — Zero-dependency AST code skeleton, blind-read guard & token bill auditor for AI coding agents (Antigravity, Claude Code, Codex & more)
Available after the catalog security scan passes.
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM lists this project for discovery and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
# Add to your Claude Code skills
git clone https://github.com/daoif/toklessGuides for using ai agents skills like tokless.
See how tokless compares with popular alternatives.
简体中文 | English
在不损失一行代码排查与修复质量的前提下,把 AI 编程工具里无意义的大文件盲读膨胀与滚雪球 Token 消耗砍掉一半以上。
tokless 是面向主流 AI 编程 Agent(原生一键挂载 Google Antigravity、Claude Code、Codex CLI,通用支持 Cursor / Windsurf / Cline / Roo Code 等)的 纯 Node.js(>=18)零外部依赖 省流与账单透视套件:
tokless skeleton):IDE 的 @Codebase 只管找到文件,不管怎么读;AI 拿到文件名后常把上千行源码整份塞进上下文,在多步循环中引发 Cache Read 复利滚雪球。tokless 毫秒级提取函数/类/宏/类型定义与 [L起-L止] 行号骨架,让 AI 只按行切片读取真正要改的几十行代码(探索期单文件省流 85%~97%)。tokless-coder / tokless-reviewer):在纯写码/审码会话中剥离用不上的外部 MCP 与花哨工具 Schema,每步立省数千固定底座 Token。tokless audit):0 模型 Token 离线解剖本地会话账单,一眼定位最烧钱的 Top 5 步骤、跨模型切换/闲置引起的 Prefix Cache 断层,以及项目规则与 MCP 空载开销。同一生产级工程(Commit 3908815)切出两个独立 Worktree,同一模型执行完全相同的深层 Bug 排查、修复与编译验证任务:
| 对比维度 | 对照组 (原生默认模式) | 实验组 (启用 tokless) |
真实节省 / 提升 |
|---|---|---|---|
总 Token 吞吐 (input + cache_read + output) |
21,410,381 (2,141 万) | 10,029,592 (1,003 万) | 净省 53.2% (-1,138 万 Tokens) |
| 累计 Cache Read(滚雪球缓存消耗) | 20,858,589 (2,086 万) | 9,627,700 (963 万) | 净省 53.8% (-1,123 万 Tokens) |
| 模型调用轮数 / 总步数 | 64 轮 / 220 步 | 42 轮 / 150 步 | 少跑 34.4% 轮次 |
read_file 调用(无行号盲读) |
79 次(3 次盲读) | 51 次(0 次盲读) | 读取减少 35.4% |
| 峰值上下文水位 | 439,830 Tokens | 323,344 Tokens | 峰值降低 26.5% |
| 检出并修复的真实硬核 Bug 数 | 7 个(全部编译通过) | 7 个(全部编译通过) | 0 质量损耗 |
注:上表完成于早期
v0.1.0基线(仅含基础骨架提取与盲读拦截),后续版本已新增inheritMcp: false净身角色、C/C++ 深度解析与更精细的行号放行机制。完整报告见 真实 Bug 修复对照账单 与 静态骨架基准测试。
自动检测并挂载本机已安装的 Antigravity、Claude Code(~/.claude)与 Codex CLI(~/.codex),默认纯增益安装技能、省流规则与净身角色(默认不挂载 PreToolUse 子进程钩子,零读文件延迟;npx 运行自动切换实体拷贝防软链悬空):
npx tokless install
按需启用超大文件盲读护栏、指定宿主或一键干净卸载:
npx tokless install --with-guard # 可选启用 PreToolUse 护栏(仅对 >800 行无行号盲读返回骨架,传行号一律放行)
npx tokless install --target agy # 仅挂载 Google Antigravity(claude / codex / all 同理)
npx tokless uninstall --target all # 一键卸载并无损还原宿主原有配置
不想切终端?直接把下面这句话发给你的 AI 编程助手即可:
请运行 npx tokless install 帮我安装启用 tokless 省流套件,装好后确认技能与省流规则已生效。
使用 Cursor、Windsurf、Cline、Roo Code、Trae、OpenCode 等其他工具? 运行
npm i -g tokless,再把rules/AGENTS.md复制到项目根目录(或对应编辑器的规则文件)即可立享核心省流能力。各宿主具体安装目录详见 原理与各工具挂载说明。
| 宿主工具 | 1. tokless skeleton 语法骨架 |
2. PreToolUse 盲读护栏(--with-guard) |
3. 净身角色 (inheritMcp: false) |
4. tokless audit 账单体检 |
|---|---|---|---|---|
| Google Antigravity | 原生 Skill + CLI + rules/AGENTS.md |
可选 hooks.json (>800 行无行号导航) |
tokless-coder / tokless-reviewer |
全功能(project + list / session / compare) |
| Claude Code | ~/.claude/skills + CLI |
可选无损合并 ~/.claude/settings.json |
— | 支持 audit project 规则与 MCP 账单 |
| Codex CLI | ~/.codex/skills + CLI + AGENTS.md |
— | — | 支持 audit project 规则账单 |
| 其他 AI 编程工具 | npm i -g tokless + 根 AGENTS.md |
欢迎参考 targets/ 共创适配 |
— | 支持 audit project 规则账单 |
# 1. 代码骨架提取(按需惰性加载 JS/TS、Vue/Svelte、Python、Go、Rust、Java、Kotlin、C/C++、C#、Markdown 解析器)
npx tokless skeleton . --map # 全仓文件行数与字数鸟瞰图
npx tokless skeleton ./src --depth 3 --exclude third_party # 目录级签名与 [L起-L止] 行号地图(自动排除常见构建产物)
npx tokless skeleton ./driver/hal_uart.c # 单文件或 C/C++ 大头文件函数/宏/typedef/结构体定位
# 2. 本地 0 Token 账单与底座透视
npx tokless audit project . # [通用] 透视项目常驻规则、Skill 与 MCP 工具底座 Token 开销
npx tokless audit list --source cli # [Antigravity] 列出最近会话(支持 cli / app / ide / all)
npx tokless audit session latest # [Antigravity] 解剖最新会话 Top 5 烧钱步与缓存断层/模型切换归因
npx tokless audit compare latest~1 latest # [Antigravity] 优化前后双会话 A/B 账单对比
@Codebase / repomix 挡不住掉额度?原理与各宿主目录详解tokless 基于 Node.js 标准库从零独立实现,特此感谢以下社区贡献者与开源灵感项目:
如果 tokless 切实帮你省下了周额度,欢迎点一颗 Star 支持,或关注作者技术手记公众号 【织歌AI笔记】 交流实战经验。
tokless is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by daoif. npx tokless install — Zero-dependency AST code skeleton, blind-read guard & token bill auditor for AI coding agents (Antigravity, Claude Code, Codex & more). It has 52 GitHub stars.
tokless's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/daoif/tokless" and add it to your Claude Code skills directory (see the Installation section above).
tokless is primarily written in JavaScript. It is open-source under daoif on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh tokless against similar tools.
No comments yet. Be the first to share your thoughts!