Caveman Token Optimizer 是一个 Claude Code 技能(skill)兼 Codex 插件,由 ara.so 收录于 Daily 2026 Skills 合集。它的核心作用是让 AI 智能体用压缩过的“原始人语”风格回答,从而减少输出 token,同时保持完整的技术准确性。据资料描述,平均可削减约 65% 的输出 token,最高可达 87%。
用途 该工具面向希望降低 AI 回答冗长程度、节省输出 token 的使用者。它不改变输入 token,也不影响模型的思考/推理 token,只压缩可见回答的措辞。
主要能力 Caveman 模式会去除:客套话(如“Sure, I'd be happy to help!”)、模糊措辞(如“It might be worth considering”)、冠词(a、an、the)以及冗长的过渡语。 Caveman 模式会保留:所有代码块(按正常方式书写)、技术术语(精确拼写,如 useMemo、polymorphism、middleware)、错误信息(原样引用)、变量名、Git 提交信息以及 PR 描述(正常行文)。
强度等级 工具提供三档强度:
- Lite:去掉填充语,保留语法。示例:“Component re-renders because inline object prop creates new reference each cycle. Wrap in useMemo.”
- Full:默认档,去掉冠词,使用短句片段。示例:“New object ref each render. Inline prop = new ref = re-render. Wrap in useMemo.”
- Ultra:最大压缩,电报式,尽量缩写。示例:“Inline obj prop → new ref → re-render. useMemo.”
使用方式 安装: Claude Code(npx):npx skills add JuliusBrussee/caveman Claude Code(插件系统): claude plugin marketplace add JuliusBrussee/caveman claude plugin install caveman@caveman Codex:克隆仓库,在仓库内打开 Codex,运行 /plugins,搜索 Caveman,安装插件。 手动/本地: git clone https://github.com/JuliusBrussee/caveman.git cd caveman pip install -e .
触发命令: Claude Code:/caveman(启用默认 full 模式)、/caveman lite、/caveman full、/caveman ultra。 Codex:$caveman、$caveman lite、$caveman full、$caveman ultra。 自然语言触发短语包括:“talk like caveman”“caveman mode”“less tokens please”“be concise”。 关闭:/caveman off,或说“stop caveman”“normal mode”。强度等级会保持到更改或会话结束。
基准测试结果 资料给出 Claude API 的真实 token 计数(可通过 benchmarks/ 目录复现):
- React 重渲染 bug:正常 1180,Caveman 159,节省 87%
- Auth 中间件修复:正常 704,Caveman 121,节省 83%
- PostgreSQL 连接池设置:正常 2347,Caveman 380,节省 84%
- Git rebase 与 merge:正常 702,Caveman 292,节省 58%
- Async/await 重构:正常 387,Caveman 301,节省 22%
- Docker 多阶段构建:正常 1042,Caveman 290,节省 72%
- 平均:正常 1214,Caveman 294,节省 65%
复现基准测试: git clone https://github.com/JuliusBrussee/caveman.git cd caveman/benchmarks export ANTHROPIC_API_KEY=your_key_here python run_benchmarks.py python compare.py --task react-rerender python compare.py --task auth-middleware python compare.py --all
集成方式 若想在自己的 Claude API 调用中使用 caveman 风格压缩,可加载 caveman 的 SKILL.md 作为系统提示附加内容,示例代码见资料中的 Python 片段(使用 anthropic 客户端,system 参数拼接 caveman_skill 并指定 full 强度)。
适用场景 适合日常技术问答、调试、代码解释等需要简洁回答的会话;也适合在会话中临时切换强度,例如写 PR 描述时用 /caveman off 切回正常行文,之后再重新启用。
限制 Caveman 只压缩输出 token,输入 token 不变;推理/思考 token 不受影响,节省只体现在可见回答中。代码输出较多的任务(如 Docker 设置)因代码原样保留,节省幅度较小。若需要面向用户的文档、正式报告或 PR 描述,应关闭 caveman 模式。
关键文件 caveman/ 目录包含:SKILL.md(Claude Code 加载的技能定义)、benchmarks/(run_benchmarks.py 复现 token 计数、compare.py 并排对比工具)、plugin.json(Codex 插件清单)、README.md。
链接 仓库:https://github.com/JuliusBrussee/caveman 主页:https://juliusbrussee.github.io/caveman/