开发框架与工具 · 中文选型解读

caveman

已解读GitHubGo

Caveman是一款AI编码助手配套的Token优化工具,可精简助手输出文本、压缩输入上下文,降低AI调用的Token消耗。

104.5kstar今天仍有更新维护状态许可待核对商用提醒
在 GitHub 查看官方项目
适合解决加快 AI 应用搭建、评测、监控和迭代
更适合负责 AI 产品研发和平台建设的团队
投入判断上手门槛:中。需要研发人员完成集成和维护
一分钟看懂

这个项目值得继续研究吗?

AI 依据上游资料解读 · 2026/9/7

Caveman是一款AI编码助手配套的Token优化工具,可精简助手输出文本、压缩输入上下文,降低AI调用的Token消耗。

解决什么问题
当前企业使用的AI编码助手普遍按Token计费,助手输出常含大量冗余铺垫文本,重复读取代码、日志也会产生不必要的Token消耗,拉高AI使用成本,还会拉长响应等待时间。
适合什么团队
适合日常高频使用AI编码助手的研发团队,以及希望降低AI服务采购成本、提升编码助手响应效率的企业技术部门。
使用前注意
需Node.js 22.13及以上版本运行;部分场景可能出现Token消耗不降反升,建议先小范围测试验证收益;skill采用MIT许可,proxy运行时采用BSL-1.1许可。

本页用于缩短初步筛选时间,不构成技术、采购或法律结论。 正式使用前请在真实业务数据上验证,并以官方说明与许可证为准。

项目导读

从官方资料看清能力、部署与采用边界

AI 翻译整理 · 保留官方来源

以下内容依据项目公开 README 或模型卡翻译整理,代码、命令和产品名保持原样。

项目定位

Caveman是专为AI编码助手打造的Token(AI服务计费的基本单位,约对应四分之三个英文单词)优化工具,核心逻辑是在完整保留代码、命令、文件路径、错误信息等核心内容准确性的前提下,精简AI输出的冗余表述、压缩输入的上下文内容,降低Token消耗的同时不影响使用效果。

核心能力

Caveman的能力分为两个维度:

  1. 输出Token优化:通过规则约束AI编码助手的输出风格,去掉无意义的铺垫性表述,仅保留核心结论与操作指引。官方测试数据显示,10个常见编码场景下,输出Token平均减少65%,效果最好的场景可减少87%的输出Token,仅在输出内容本身以代码为主的场景优化幅度较低。
  2. 输入Token优化:通过本地代理压缩AI助手读取的上下文内容,包括日志、测试输出、代码 diff、网页内容等,压缩后的原始内容会在本地备份,AI助手可随时调取恢复。官方测试显示,常见编码场景下输入Token平均减少33%,网页内容浏览场景最高可减少99%的Token消耗。

官方公开了所有测试场景的原始数据,其中也包含优化失效的场景:比如Dashboard HTML告警场景,因无适配的压缩规则,使用后Token消耗反而上升9.9%,不存在刻意隐瞒负面结果的情况。

典型使用方式

Caveman提供两种使用模式,可按需选择,也可叠加使用,大部分用户从轻量模式开始试用后再升级到全量模式:

轻量模式(Small Rock)

仅加载规则文件,实现输出Token优化,适合初次试用的用户。支持30+主流AI编码助手,包括Claude Code、Codex、Gemini、Cursor、Windsurf、Cline、Copilot等,永久免费使用。

安装仅需执行一条命令:

npx skills add JuliusBrussee/caveman

若安装后未自动生效,输入/caveman即可触发;也可通过/caveman lite|full|ultra调整精简强度,输入/caveman off即可随时关闭功能。

全量模式(Big Rock)

在本地运行代理服务,同时实现输入、输出Token优化,适合AI使用量较大的团队。

安装命令如下:

npm install -g @caveman-ai/cli && caveman setup --install
caveman claude        # 可替换为codex、gemini、aider、qwen等对应助手名称

此外项目也提供全量安装脚本、Windows PowerShell安装脚本、单个助手单独安装等方式,卸载也可通过官方提供的一键命令完成。

部署与使用注意

  1. 部署要求:需Node.js 22.13及以上版本运行,代理服务完全运行在用户本地,所有原始数据仅存储在本地,不会上传至第三方,不存在数据泄露风险。
  2. 成本测试提示:官方给出的优化比例是单轮测试的结果,实际全会话的节省比例会更低,因为规则本身会占用1-1.5k输入Token;在输出本身就非常简洁的场景下,甚至可能出现Token消耗上升的情况,建议先小范围测试1-2周,确认实际收益后再全量推广。

维护状态与许可说明

该项目2026年4月创建,截至2026年9月仍处于活跃维护状态,未归档,问题反馈通道正常开放。

许可规则如下:轻量模式的规则文件采用MIT许可,可免费无限制使用;全量模式的CLI工具采用MIT许可,运行时组件采用BSL-1.1许可。

采用建议

如果仅需要精简AI编码助手的输出、提升信息读取效率,优先选择轻量模式,安装成本极低,几乎无使用门槛;如果团队AI编码助手使用量较大,输入上下文的Token成本占比较高,可尝试全量模式进一步降低成本。

可核对的事实层

官方资料与来源

查看来源 →
  • ai
  • anthropic
  • caveman
  • claude
  • claude-code
  • llm
  • meme
  • prompt-engineering
  • skill
  • tokens
默认分支main
关注仓库240
复刻次数6.0k
开放议题113
近期更新2026/9/6
仓库状态未标记归档
上游部署线索
## Install

Caveman come in two sizes.

**Small rock: the skill.** A rule file that makes your agent answer in caveman. MIT, free forever, works in [30+ agents](./INSTALL.md) (Claude Code, Codex, Gemini, Cursor, Windsurf, Cline, Copilot, more). One command:

```bash
npx skills add JuliusBrussee/caveman
```

Type `/caveman` if your agent doesn't wake up on its own. That the whole install. One rock.

**Big rock: the proxy.** Runs on your machine, between your agent and the AI provider, and shrinks what the agent *reads* before every call. Everything it squeezes gets a backup on your disk, so the agent can always pull the original back. MIT CLI, BSL-1.1 runtime:

```bash
npm install -g @caveman-ai/cli && caveman setup --install
caveman claude        # or codex · gemini · aider · kilo · qwen · opencode · hermes · openclaw · pi
```

They stack. Most people start with the small rock and gradua

该片段来自项目 README,仅用于初步判断;实际部署请以官方文档为准。

核对上游原始说明节选

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

why use many token when few do trick

Your AI coding agent bills by the word and writes like it knows that. Caveman make it stop. Brain still big. Mouth small. Bill small.

See it · Install · Numbers · Skill · Proxy · Wrap · Docs · Privacy · License

---

See it

The reason your React component is re-rendering is likely because you're creating a new object reference on each render cycle. When you pass an inline object as a prop, React's shallow comparison sees it as a different object every time, which triggers a re-render. I'd recommend using useMemo to memoize the object.
New object ref each render. Inline object prop = new ref = re-render. Wrap in useMemo.

Same diagnosis. Same fix. Same useMemo. The only thing that died was the throat-clearing.

Code, commands, file paths, and exact error messages never get cavemanned. Only the prose around them does.

┌──────────────────────────────────────────────────┐
│   output tokens saved (skill)   ██████░░░    65% │
│   input tokens saved  (proxy)   ███░░░░░░    33% │
│   code changed                  ░░░░░░░░░     0% │
│   vibes                         █████████    OOG │
└──────────────────────────────────────────────────┘

Caveman no make brain smaller. Caveman make mouth smaller.

Install

Caveman come in two sizes.

Small rock: the skill. A rule file that makes your agent answer in caveman. MIT, free forever, works in 30+ agents (Claude Code, Codex, Gemini, Cursor, Windsurf, Cline, Copilot, more). One command:

npx skills add JuliusBrussee/caveman

Type /caveman if your agent doesn't wake up on its own. That the whole install. One rock.

Big rock: the proxy. Runs on your machine, between your agent and the AI provider, and shrinks what the agent reads before every call. Everything it squeezes gets a backup on your disk, so the agent can always pull the original back. MIT CLI, BSL-1.1 runtime:

npm install -g @caveman-ai/cli && caveman setup --install
caveman claude        # or codex · gemini · aider · kilo · qwen · opencode · hermes · openclaw · pi

They stack. Most people start with the small rock and graduate.

More doors into the cave · full installer, Windows, single agents, uninstall

The full installer wires up Claude Code hooks and the statusline badge, finds every supported agent on your machine, and skips agents you no have. Safe to re-run. Needs Node.js 22.13+.

curl -fsSL https://raw.githubusercontent.com/JuliusBrussee/caveman/v2.6.0/install.sh | bash

Windows, PowerShell 5.1+:

irm https://raw.githubusercontent.com/JuliusBrussee/caveman/v2.6.0/install.ps1 | iex

Just one agent:

# Claude Code
claude plugin marketplace add JuliusBrussee/caveman && claude plugin install caveman@caveman

# Gemini CLI
gemini extensions install https://github.com/JuliusBrussee/caveman

# Qwen Code CLI, then its Caveman wrapper
npm i -g @qwen-code/qwen-code
caveman qwen

# Codex, Cursor, Windsurf, Cline, and other skills-compatible agents
npx skills add JuliusBrussee/caveman --skill '*' -a codex --yes  # replace codex with your agent profile

Install broke? Open your agent in this repo and say: "Read CLAUDE.md and INSTALL.md, install caveman for me." Agent read repo, agent fix own brain. Snake eat tail.

Changed your mind: npx -y github:JuliusBrussee/caveman -- --uninstall

The full 30+ agent matrix, dry runs, flags, and verification live in INSTALL.md.

The numbers

A token is what AI billing counts, roughly three quarters of a word. Your agent pays for every token it writes and every token it reads. Reading is usually the bigger bill. The skill cuts the writing. The proxy cuts the reading.

Skill: writing less

Ten ordinary coding prompts through the real Claude API, with the skill and without. Same model, same questions. Output tokens per reply:

| Task | Normal | Caveman | Saved | | ---------------------------------- | -------: | ------: | ------: | | Implement React error boundary | 3454 | 456 | 87% | | Set up PostgreSQL connection pool | 2347 | 380 | 84% | | Explain git rebase vs merge | 702 | 292 | 58% | | Refactor callback to async/await | 387 | 301 | 22% | | Average across all ten prompts | 1214 | 294 | 65% |

Best row and worst row both up there on purpose. Caveman wins big when the agent would have written an essay, and barely at all when the answer was already mostly code.

All ten prompts · regenerate with uv run python benchmarks/run.py

| Task | Normal | Caveman | Saved | | --------------------------------------- | -------- | ------- | ------- | | Explain React re-render bug | 1180 | 159 | 87% | | Fix auth middleware token expiry | 704 | 121 | 83% | | Set up PostgreSQL connection pool | 2347 | 380 | 84% | | Explain git rebase vs merge | 702 | 292 | 58% | | Refactor callback to async/await | 387 | 301 | 22% | | Architecture: microservices vs monolith | 446 | 310 | 30% | | Review PR for security issues | 678 | 398 | 41% | | Docker multi-stage build | 1042 | 290 | 72% | | Debug PostgreSQL race condition | 1200 | 232 | 81% | | Implement React error boundary | 3454 | 456 | 87% | | Average | 1214 | 294 | 65% |

[!IMPORTANT]
Before you multiply 65% by your invoice: the skill only shortens output. Input and reasoning tokens don't change, and the skill's own rules cost about 1 to 1.5k input tokens every turn. Whole-session savings land lower than the table. On work that was already terse, you can lose money. Speed and readability are the product. The discount is the bonus. Full accounting in docs/HONEST-NUMBERS.md.
Maintainer note. If you read one linked doc, read that one. I wrote it after #550, where someone's Cursor A/B went the wrong way and I couldn't reproduce it. Caveman is a shorter agent, not free money. Measure your own setup before you tell your boss anything.

Proxy: reading less

Your agent rereads logs, test output, diffs, and half your repo all day. The proxy shrinks that stream before it reaches the provider. Pinned 54-run Claude Code benchmark, provider-reported input tokens, three runs per case:

| Case | Direct Claude Code | Through caveman | Change | | ---------------------- | -----------------: | --------------: | ---------: | | CSV outlier hunt | 165,823 | 74,484 | -55.1% | | Log needle in haystack | 148,807 | 74,068 | -50.2% | | YAML config drift | 132,124 | 71,027 | -46.2% | | Test output failure | 150,377 | 108,514 | -27.8% | | Deployment JSON drift | 147,975 | 108,939 | -26.4% | | Dashboard HTML alert | 140,687 | 154,641 | +9.9% | | Total | 885,793 | 591,673 | -33.2% |

All 18 of 18 exact-answer checks passed, so the squeeze cost nothing in correctness. Method, confidence intervals, and limits: docs/WRAP-BENCHMARK.md.

Maintainer note. The HTML row is red and it stays red. That case had no compression transform, so caveman paid its own overhead and won nothing back. The day I hide a red row is the day you should stop trusting the green ones.

Browsing too: a focused question against a 200-row table costs 121 tokens through caveman's view of the page, against 15,704 for the Playwright ARIA baseline. That's 129.8× smaller (browse/BENCHMARK.md).

The skill, unpacked

One rule file, one talking style, plus a small toolbox. /caveman lite|full|ultra|wenyan-lite|wenyan-full|wenyan-ultra sets intensity. /caveman off or normal mode turns it off.

上游文档较长,此处为节选。完整内容见官方项目。