像原始人一样对话省下 65% Token:编程 Agent 优化工具 Caveman 4.0 正式发布
英文标题:📦 JuliusBrussee/caveman
开源编程 Agent 工具 Caveman 正式发布 4.0 版本,通过让 AI 采用极简的“原始人语体”(Caveman Voice)及多重优化机制,可大幅削减高达 65% 的 Token 消耗。新版本从单一技能扩展为六大核心模块,涵盖输出语体压缩、上下文文件与日志预压缩(平均减少 33.2% 输入 Token)、动态模型路由(成本降低 54%)以及 Code Mode 脚本复用等。Adobe Research、Elastic 和 JetBrains 的独立实测均表明,该方案能在基本不损耗代码任务质量的前提下显著压缩调用成本。这为控制高频次 Agent 会话与代码生成的推理预算提供了一套轻量且立竿见影的工程化实践方案。
18.1 KB
18.7 KB
403.0 KB
14.0 KB
338.0 KB
100.3 KB
中文
| 普通 Agent · 63 tokens |
|---|
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, so React re-renders. Wrap the prop in
useMemo.
同样的修复方案。63 个 Token 缩减为 20 个。大脑依然好使。
挑选你的石斧:
| 技能 | 相同回答 | Tokens |
|---|---|---|
/caveman |
New object ref each render, so React re-renders. Wrap the prop in useMemo. |
20 |
/ultracave |
Inline object prop, new ref, re-render. useMemo. |
14 |
/megacave |
新參照致重繪。useMemo。 |
13 |
Token 计数统计:基于 tiktoken o200k。
bash npx @caveman-ai/cli@latest
单条命令即可启动。支持 Mac、Linux、Windows。Caveman 会自动扫描你的本地 Agent 与登录凭据,并展示将要修改的内容。按下回车,配置完成。需要 Node.js 22.13+ 环境。
配置完成后,原生的 claude 命令将直接保持原始人模式。Codex、Gemini CLI、OpenCode 以及 30 多种其他 Agent 同样适用。工具完全运行于你的本地机器,使用你自有的 API 密钥与 Claude Pro/Max 登录认证。一颗石子,化繁为简。
在 4.0 之前安装过 Caveman?请在命令中指定 @latest,否则本地旧版本会优先执行。若已完成配置,运行 caveman setup 可重新打开配置界面。如果只想获得更精简的回答,也可以仅安装单一 Skill。
4.0 版本全新升级:Caveman 现由六个功能组件(“Rock”)构成。安装后默认全开,且每个组件均提供独立开关。
| 模块 | 功能说明 | 实测表现 |
|---|---|---|
| 少说话(Say less) | Agent 简短作答。代码保持精准无误 | 63 → 20 tokens,相同修复效果 |
| 少阅读(Read less) | 在模型读取前,压缩日志、JSON、CSV 及测试输出 | 每次会话减少 33.2% 输入 Token |
| 自动路由(Auto) · 新功能 | 针对每次请求自动选择最合适的模型与思考强度(effort) | 相比 xhigh 思考强度的 Opus 便宜 54%,评分相同 |
| 代码块复用(Blocks) · 新功能 | Code 模式:Agent 保存已编写的脚本并直接再次执行 | 单次测试运行 Token 从 397 → 76 |
| 减少浪费(Waste fixes) | 识别并修复 Token 浪费环节。新增:在你暂停交互时保持 Prompt 缓存处于温热状态 | 暂未测试统计 |
| 网页浏览(Browse) | 网页内容以压缩形式返回 | 页面精简 129.8 倍 |
运行 caveman status 可查看当前开启的组件。运行 caveman off browse 可关闭指定功能。仅 Auto 功能需要账号支持(免费提供)。详情参见 4.0.0 发布说明。
以下先展示外部实验室的评测结果,我们自己的测试数据附在下方各组件后。数据未经任何四舍五入。标红数据保持如实呈现。
| 机构 | 测试环境 | 测试结果 |
|---|---|---|
| Adobe Research,CAVEWOMAN 论文(引用了本仓库) | 原始人风格输出,覆盖 8 个模型、5 个数据集 | 各模型成本降低 1.4 至 2.4 倍,最高降幅达 3 倍 |
| Elastic,Elasticsearch Labs | 针对 Elasticsearch 重制的原始人模式,覆盖 8 个真实 MCP 场景 | 响应 Token 减少 63.6%。 “信息零损失。” |
| JetBrains | 86 个真实编程任务,配对 A/B 测试 | 无明显质量损失(p = 0.82)。输出 Token 减少 8.5% |
有两项重要发现奠定了 Caveman 的设计思路。Adobe 研究表明:将用户自己的提示词转为原始人风格会导致回答质量下降,因此 Caveman 绝不修改用户的提示词。JetBrains 发现:Agent 会话大多由代码和工具调用构成,语体缩减并不会影响它们。因此,Caveman 演进出了缩减 Agent 所读取内容以及底层运行载体的新功能模块。
少说话:原始人语体(Caveman Voice)
这是一种精炼语体,而非语法破损。每一条回复都遵循相同的结构。
| 规则 | 具体含义 |
|---|---|
| 先讲结论 | [对象] [动作] [原因]. [下一步]. 无寒暄,无“让我来”,无重复总结 |
| 一句只讲一件事 | 借鉴自飞机维护手册受控英语规范 ASD-STE100:单句最多 20 词,使用主动语态,一物一词 |
| 绝不丢弃关键语义 | 冠词可省略;但 not、never、no、only 等否定及限定词绝不删除;数字和单位保持原样精确 |
| 核心负载逐字保留 | 代码、指令、文件路径以及错误提示逐字符保留,绝不改动 |
| 不做多余表演 | 不使用拟人化废话(如“让我想想”);工具调用之间不闲聊。若原始人表述不够精简,则恢复常规表述 |
| 知晓停止边界 | 遇到安全警告、不可逆操作以及用户产生困惑时,使用完整句子作答。随后恢复极简语体 |
| 用户 Prompt 维持原样 | 永不重写用户输入。研究表明重写会带来反效果 |
基于 claude-opus-5-5 测试 10 个开发者问题:
| 指令类型 | 输出 Token 数量 |
|---|---|
| 无指令 | 6,983 |
Answer concisely.(简明作答) |
4,334 |
/caveman |
4,119 |
/ultracave |
2,693 |
“Be concise”(保持简练)是真实的基准参考线;新模型本身已理解该指令。在此基础上,/caveman 在中位数上进一步节省了 3%,而 /ultracave 则进一步节省了 35%。测试基于 3.1.0 规则,暂未重新运行。这些规则本身会消耗约 1,160 个输入 Token;如果你是按请求计费(例如 GitHub Copilot),缩短回答并不能带来成本节约。测试框架与套件 · 所有 Caveman 处于劣势的场景
只想单独使用该组件? 仅安装 Skill,无需配置代理:
bash npx skills add JuliusBrussee/caveman -g
若未自动启动,可输入 /caveman(在 Codex 中为 $caveman)。输入 stop caveman 可恢复普通模式。
其他接入方式:Claude 客户端与手机端、Claude Code 插件、Gemini、一次性配置所有 Agent、Windows 环境、卸载指南。
在网页版 Claude、手机端 App 或 Cowork 中使用?无需终端环境。直接在 Claude 账户的 Customize > Plugins 中添加一次 Caveman 即可:操作步骤(暂未做端到端完整测试)。
bash
Claude Code 插件,支持每次交互会话自动启动,子 Agent 同样生效
claude plugin marketplace add JuliusBrussee/caveman && claude plugin install caveman@caveman
Gemini CLI
gemini extensions install https://github.com/JuliusBrussee/caveman
一次性配置本机所有 Agent,并添加 Claude Code 状态栏标识(需要 Node.js 22.13+)
curl -fsSL https://raw.githubusercontent.com/JuliusBrussee/caveman/v4.0.1/install.sh | bash
如果已经在 Claude Code 内部,可通过 Slash 命令形式添加:
bash /plugin marketplace add JuliusBrussee/caveman /plugin install caveman@caveman
Windows 平台(PowerShell 5.1+):
powershell irm https://raw.githubusercontent.com/JuliusBrussee/caveman/v4.0.1/install.ps1 | iex
在 npm 12 或更高版本中,npm 会拦截 git 方式安装。上述单行脚本自 v3.2.0 起已内置处理该问题。锁定在 v3.1.0 或更早版本的旧安装命令仍会失败;请使用上述命令,或使用:npx --allow-git=root -y github:JuliusBrussee/caveman#v4.0.1
如需卸载:npx -y github:JuliusBrussee/caveman -- --uninstall(npm 12+ 需附带 --allow-git=root)
如果此前仅安装了技能插件,运行 npx skills remove JuliusBrussee/caveman -g 即可卸载。
安装出现故障?在本仓库中打开你的 Agent 并对它说:"Read CLAUDE.md and INSTALL.md, install caveman for me." 让 Agent 自行修复。
少阅读:减少 33.2% 输入 Token
语体缩减的是 Agent 的输出内容;此组件缩减的则是 Agent 的输入读取。保持回答质量不变:18 道测试题全部答对。
| 文件类型 | 经过 Caveman 压缩的文件 | 文件压缩率 | Claude Code 完整会话(运行 3 次) | 会话节省率 |
|---|---|---|---|---|
| CSV | 28,041 → 314 | 98.9% | 165,823 → 74,484 | 55.1% |
| 日志(Logs) | 22,810 → 348 | 98.5% | 148,807 → 74,068 | 50.2% |
| YAML | 20,447 → 178 | 99.1% | 132,124 → 71,027 | 46.2% |
| 测试输出 | 18,806 → 203 | 98.9% | 150,377 → 108,514 | 27.8% |
| JSON | 18,837 → 281 | 98.5% | 147,975 → 108,939 | 26.4% |
| HTML | 21,670 → 21,670 | 暂无 | 140,687 → 154,641 | 差 9.9% |
| 全部 6 项 | 130,611 → 22,994 | 82.4% | 885,793 → 591,673 | 33.2% |
“文件”栏代表单凭当前的压缩算法处理后的测试文件。“会话”栏则是完整的 Agent 会话运行过程(因包含系统提示词和工具调用,整体变动比例相对较小)。客观提示:会话测试数据取自 2026 年 8 月的旧版引擎;HTML 尚未配备专用压缩器因此表现不佳;且每个测试文件均将一条有效记录隐藏在 61 到 72 KB 的噪音信息中。实际业务效果会有所不同。在相同测试集上的保留表现:18 题中做对 15 题,Token 减少 6.7%。评测方法
所有文件原始副本均保留在本地磁盘,Agent 可随时调回原版文件。
Auto:成本降低 54%,任务评分持平
Agent 模型选择器中的全新模型。选择 Auto 后,Caveman 会根据每项任务的具体难度自动匹配模型与思考强度(effort)。高难任务调用强大模型,简单任务则节省算力。
| 配置 | 任务解决率 | 单次尝试成本 | 耗时中位数 |
|---|---|---|---|
| 全部任务采用 Opus 5.5(xhigh 思考强度) | 44.3% | $7.83 | 35.2 分钟 |
| Auto(仅使用 Claude 系列模型) | 43.7% | $3.59 | 15.9 分钟 |
| Auto(搭配 OpenAI 及开源模型) | 42.9% | $3.47 | 16.7 分钟 |
Auto 的消耗仅相当于 Opus 5.5(xhigh 级别)的 0.46 倍。这意味着节省了 54% 的成本,同时耗时缩短了一半以上。数据源于 SWE-Interact 与 SWE-Together 的 85 项真实编程任务(单次尝试)。客观提示:测试目前执行完成了一半,0.5 分的分数差异在当前样本规模下属于误差区间(±7),且大部分成本缩减来自于 Auto 在简单请求中降低了推理思考强度。若你已将 Opus 设为 medium 强度,节省幅度可能会偏低(暂未专门测量)。完整数据表格与限制说明
bash caveman login # 免费账号,登录后模型选择器中将显示 Auto caveman providers add openai # 可选:配置自有 Key 为 Auto 引入更多模型支持
支持在 Claude Code、OpenCode 以及通过 ChatGPT 登录的 Codex 中运行,支持自定义 API 密钥、Claude Pro/Max 或 ChatGPT 账号。选择其他任何模型将按原有配置正常运行。未登录状态下不启用 Auto,不会外发任何内容。详见 Auto 数据发送说明。
Blocks:代码模式,脚本一次编写多次复用
专为代码模式打造的 skills.sh。 代码模式(Code Mode)指 Agent 直接编写脚本运行,而非连续发起多轮工具调用(参见 Cloudflare 与 Anthropic)。面临的问题:Agent 每次会话都会重复编写相同的脚本,用完即弃,下次重写。Blocks 将这些脚本保留在你的仓库中,并在每次 Pull Request 时进行校验,按需回传给 Agent。
| 输入命令 | 原始输出 | 当前 Agent 自行编写处理 | Blocks |
|---|---|---|---|
go test -v ./...(326 项测试) |
10,561 | 397 · ` | tail -20` |
| 1.4 MB JSON 文件 | 251,893 | 236 · 自行编写 heredoc 处理 | 227 · json-peek |
| 366 行 Go 代码文件 | 3,111 | 250 · grep -n |
489 · grep-defs |
以上为 Agent 读回的 Token 数量。在单台机器上,Agent 曾在一周内重复编写相同脚本达 394 次。普渡大学的研究测得该习惯最高占单项任务成本的 9.57%。虽然 grep-defs 的表现逊色于直接使用原生 grep,但该对比行如实保留。测试方法
该模块随 Caveman 一同提供。现已预置 8 个代码块:json-peek、jsonl-stats、test-summary、first-error、wait-for、grep-defs、http-json、replace-in-file。当 Agent 准备编写已被现有 Block 覆盖的脚本时,仅需提示一行:直接使用 Block。绝不会拒绝或重写执行命令。
bash caveman-blocks scan # 扫描本月 Agent 重复输入的脚本。脚本内容绝不离开本地机器 caveman-blocks init # 将规则与 Block 索引写入本仓库的 AGENTS.md
当前为预览版本(v0.1.0-rc.5)。仅支持 Python,暂无沙箱机制。独立开源仓库:caveman-ai/blocks。
| 组件 | 功能说明 | 实测表现 |
|---|---|---|
caveman learn |
基于磁盘中的 Agent 历史记录,对 Token 消耗大户进行排名。caveman learn implement 逐条实施修复 diff,仅在你明确确认后应用 |
暂未测试统计 |
| Prompt 缓存保活(Warm cache) · 新功能 | 当你短暂离开时,服务商会释放会话缓存,导致下次提问需按全量计费。Caveman 会在暂停期间为 Anthropic 的 Prompt 缓存进行保活,且仅在历史数据显示你通常会按时返回时触发。每次保活记录均列在 caveman stats 中 |
暂未测试统计 |
caveman browse <url> |
为 Agent 提供压缩后的网页内容 | 在针对 200 行表格的 Playwright 快照测试中,消耗从 15,704 tokens 降至 121 tokens。极小表单场景消耗略多 2.3 倍。基准测试 |
/caveman-compress <file> |
压缩诸如 CLAUDE.md 等上下文文件,并保留备份 |
5 个测试文件 Token 从 6,198 降至 4,138,单文件降幅 22.8% 至 49.1%,标题、代码块与路径全部完好保留。基准测试 |
| 中间件(Middleware) | 将相同的压缩能力直接嵌入现有的 Vercel AI SDK、LangChain、OpenAI 或 Anthropic 代码调用中。TypeScript · Python · 全部框架支持 · 团队单容器部署 | 暂未测试统计 |
终端常用指令:
bash caveman claude # 挂载 Caveman 启动 Agent:codex · gemini · opencode · aider · kilo · qwen · hermes · openclaw · pi caveman status # 查看当前启用状态、连接的 Agent 及建议的下一步 caveman on browse # 单独开启或关闭某个组件:output · input · waste-fixes · routing · scripts · browse caveman login # 登录免费账号,开启 Auto 功能
English / 原文
| Normal agent · 63 tokens |
|---|
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, so React re-renders. Wrap the prop in
useMemo.
Same fix. 63 token become 20. Brain still big.
Pick your club:
| Skill | Same answer | Tokens |
|---|---|---|
/caveman |
New object ref each render, so React re-renders. Wrap the prop in useMemo. |
20 |
/ultracave |
Inline object prop, new ref, re-render. useMemo. |
14 |
/megacave |
新參照致重繪。useMemo。 |
13 |
Token counts: tiktoken o200k.
npx @caveman-ai/cli@latest
One command. Mac, Linux, Windows. Caveman find your agents and your logins, show what it change. Press Enter. Done. Needs Node.js 22.13+.
After that, plain claude stays caveman'd. So do Codex, Gemini CLI, OpenCode, and 30+ more. It runs on your machine, with your keys and your Claude Pro/Max login. One rock. That it.
Had caveman before 4.0? Say @latest, or the old copy on your machine wins. Already set up? caveman setup opens the screen again. Only want shorter answers? Get just the skill.
New in 4.0: caveman is six parts. All on after install. Each has its own switch.
| Rock | What it does | Measured |
|---|---|---|
| Say less | Agent answers short. Code stays exact | 63 → 20 tokens, same fix |
| Read less | Logs, JSON, CSV, test output shrink before the model reads them | 33.2% fewer input tokens per session |
| Auto · new | Picks the model and the effort for each ask | 54% cheaper than Opus at xhigh, same score |
| Blocks · new | Code mode: agent keeps the scripts it writes and runs them again | 397 → 76 tokens for one test run |
| Waste fixes | Finds where your tokens go and fixes it. New: keeps the prompt cache warm while you pause | Not measured yet |
| Browse | Web pages come back compressed | 129.8× smaller page |
caveman status shows what is on. caveman off browse turns one off. Only Auto needs an account, and it is free. 4.0.0 release notes
Outside labs first. Ours come with each rock below. Nothing rounded up. Red rows stay red.
| Who | Setup | Result |
|---|---|---|
| Adobe Research , CAVEWOMAN paper (cites this repo) | Caveman-style output, eight models, five datasets | Cost cut 1.4 to 2.4× per model, up to 3× |
| Elastic , Elasticsearch Labs | Caveman mode remade for Elasticsearch, eight live MCP scenarios | 63.6% fewer response tokens. "Zero information loss." |
| JetBrains | 86 real coding tasks, paired A/B | No measurable quality loss (p = 0.82). 8.5% fewer output tokens |
Two findings shaped caveman. Adobe: cavemanning your prompt makes answers worse, so caveman never touches your prompt. JetBrains: agent sessions are mostly code and tool calls, which the voice leaves alone. So caveman grew rocks that shrink what the agent reads and what it runs on.
Say less: the caveman voice
A voice, not broken grammar. Every reply follows the same structure.
| Rule | What it means |
|---|---|
| Answer first | [thing] [action] [reason]. [next step]. No greeting, no "let me", no recap |
| One idea per sentence | Built on ASD-STE100, the controlled English of aircraft maintenance manuals: 20 words max, active voice, one term per thing |
| Meaning never dropped | Articles can go. not , never , no , only never go. Numbers and units stay exact |
| Payload verbatim | Code, commands, paths, and error messages untouched, character for character |
| No theater | No "me think". No chatter between tool calls. If caveman phrasing isn't shorter, plain wins |
| Knows when to stop | Security warnings, irreversible actions, and confused users get full sentences. Then grunt resumes |
| Your prompts stay yours | Never rewritten. Research say that backfire |
Ten dev questions on claude-opus-5-5:
| Instruction | Output tokens |
|---|---|
| None | 6,983 |
Answer concisely. |
4,334 |
/caveman |
4,119 |
/ultracave |
2,693 |
"Be concise" is the real baseline; new models already know it. On top of it, /caveman cuts 3% more at the median and /ultracave 35% more. Measured on the 3.1.0 rules, not yet re-run. The rules cost about 1,160 tokens of input, and if you pay per request (GitHub Copilot), shorter answers save nothing. Harness · Every case where caveman loses
Only want this rock? The skill alone, no proxy:
npx skills add JuliusBrussee/caveman -g
Type /caveman ($caveman in Codex) if it doesn't start on its own. Say stop caveman to go back.
Other ways in : Claude app and phone, Claude Code plugin, Gemini, every agent at once, Windows, uninstall
Claude on the web, the phone app, or Cowork? No terminal. Add caveman to your Claude account once, in Customize > Plugins: steps. Not tested end to end yet.
# Claude Code plugin, auto-starts every interactive session, subagents too
claude plugin marketplace add JuliusBrussee/caveman && claude plugin install caveman@caveman
# Gemini CLI
gemini extensions install https://github.com/JuliusBrussee/caveman
# Every agent on your machine at once, plus the Claude Code statusline badge (Node.js 22.13+)
curl -fsSL https://raw.githubusercontent.com/JuliusBrussee/caveman/v4.0.1/install.sh | bash
Already inside Claude Code? Same rock, slash form. Type these where you talk to Claude:
/plugin marketplace add JuliusBrussee/caveman
/plugin install caveman@caveman
Windows, PowerShell 5.1+:
irm https://raw.githubusercontent.com/JuliusBrussee/caveman/v4.0.1/install.ps1 | iex
On npm 12 or newer, new npm block git install. One-liners above handle it themselves from v3.2.0 on. Old one-liner pinned to v3.1.0 or older still fail there: use one above, or this: npx --allow-git=root -y github:JuliusBrussee/caveman#v4.0.1
Changed your mind: npx -y github:JuliusBrussee/caveman -- --uninstall (on npm 12+, add --allow-git=root too)
Only grabbed the skill? npx skills remove JuliusBrussee/caveman -g take it back out.
Install broke? Open your agent in this repo and say "Read CLAUDE.md and INSTALL.md, install caveman for me." Agent fix own brain.
Read less: 33.2% fewer input tokens
The voice shrinks what the agent says. This shrinks what it reads. Same answers: 18 of 18 right.
| File type | The file, through caveman | File saved | Whole Claude Code session, 3 runs | Session saved |
|---|---|---|---|---|
| CSV | 28,041 → 314 | 98.9% | 165,823 → 74,484 | 55.1% |
| Logs | 22,810 → 348 | 98.5% | 148,807 → 74,068 | 50.2% |
| YAML | 20,447 → 178 | 99.1% | 132,124 → 71,027 | 46.2% |
| Test output | 18,806 → 203 | 98.9% | 150,377 → 108,514 | 27.8% |
| JSON | 18,837 → 281 | 98.5% | 147,975 → 108,939 | 26.4% |
| HTML | 21,670 → 21,670 | none yet | 140,687 → 154,641 | 9.9% worse |
| All six | 130,611 → 22,994 | 82.4% | 885,793 → 591,673 | 33.2% |
The file is each test file through today's compressor alone. The session is the whole agent run, which also carries the system prompt and tools, so it moves less. Honest part: the session run is from August 2026 on an older engine, HTML has no compressor yet so it lost, and each test file hides one record in 61 to 72 KB of noise. Yours will vary. Headroom on the same suite: 15 of 18 right, 6.7% fewer tokens. Method
Every original stays on your disk. The agent can pull it back any time.
Auto: 54% cheaper, same score
New model in your agent's picker. Pick Auto and caveman chooses the model and the effort for each ask. Hard ask, big brain. Easy ask, save rocks.
| Setup | Tasks solved | Cost per try | Median time |
|---|---|---|---|
| Opus 5.5, xhigh effort, every ask | 44.3% | $7.83 | 35.2 min |
| Auto , Claude models only | 43.7% | $3.59 | 15.9 min |
| Auto , plus OpenAI and open models | 42.9% | $3.47 | 16.7 min |
Auto costs 0.46× what Opus 5.5 at xhigh costs. That is 54% saved, in under half the time. 85 real coding tasks from SWE-Interact and SWE-Together, one try each. Honest part: the run is half done, the 0.5-point score gap is too small to tell apart at this size (±7), and most of the saving is Auto lowering effort on easy asks. Already on Opus at medium? Expect less; not measured yet. Full table and limits
caveman login # free account. Auto shows up in the model picker
caveman providers add openai # optional: give Auto more models, on your own key
Works in Claude Code, OpenCode, and Codex on a ChatGPT login, with API keys, Claude Pro/Max, or ChatGPT. Any other model you pick runs as picked. Not signed in: no Auto, nothing sent. What Auto sends
Blocks: code mode, script written once
skills.sh for code mode. Code mode is the agent writing a script instead of making tool call after tool call (Cloudflare, Anthropic). Problem: agent write same script every session, throw it away, write it again. Blocks keep it in your repo, check it every pull request, hand it back.
| Input | Raw | What agents type now | Block |
|---|---|---|---|
go test -v ./..., 326 tests |
10,561 | 397 · ` | tail -20` |
| 1.4 MB JSON file | 251,893 | 236 · their own heredoc | 227 · json-peek |
| 366-line Go file | 3,111 | 250 · grep -n |
489 · grep-defs |
Tokens the agent reads back. In one week, agents on one machine wrote the same script 394 times. Purdue measured the habit at up to 9.57% of task cost. grep-defs loses to a bare grep; row stays. Method
Comes with caveman. Eight blocks ready: json-peek · jsonl-stats · test-summary · first-error · wait-for · grep-defs · http-json · replace-in-file. When the agent starts typing a script a block already covers, it gets one line: use the block. Never denies or rewrites a command.
caveman-blocks scan # what your agents retyped this month. Script text never leaves your machine
caveman-blocks init # rules and block index into this repo's AGENTS.md
Pre-release (v0.1.0-rc.5). Python only, no sandbox yet. Own repo, own stars: caveman-ai/blocks
| Rock | What it does | Measured |
|---|---|---|
caveman learn |
Ranks where your tokens go, from agent history already on disk. caveman learn implement applies fixes one diff at a time, only on your yes |
Not yet |
| Warm cache · new | Step away and the provider forgets your session, so the next ask pays full price. Caveman keeps Anthropic's prompt cache warm while you pause, only when your own history says you come back in time. Every warm is listed in caveman stats |
Not yet |
caveman browse <url> |
A compressed web page for the agent | 121 tokens instead of 15,704 for a Playwright snapshot of a 200-row table. Tiny forms lose 2.3×. Bench |
/caveman-compress <file> |
Shrinks memory files like CLAUDE.md, keeps a backup |
4,138 tokens instead of 6,198 across five files, 22.8% to 49.1% each, every heading, code block, and path intact. Bench |
| Middleware | Same shrinking inside the Vercel AI SDK, LangChain, OpenAI, or Anthropic call you already make. TypeScript · Python · Every framework · One container for the team | Not yet |
In your terminal:
caveman claude # start an agent on caveman: codex · gemini · opencode · aider · kilo · qwen · hermes · openclaw · pi
caveman status # what is on, which agents it reaches, one next step
caveman on browse # switch one rock on or off: output · input · waste-fixes · routing · scripts · browse
caveman login # free account, turns on Auto
caveman learn # where your tokens go
caveman trial -- claude # A/B a real session on your own work
caveman shrink -- pnpm test # compress noisy command output
caveman convert --dry-run # pixel mode: skills the model reads as images
caveman stats # your token history
caveman doctor # one problem per line, with its fix
In your agent:
| Command | What it does |
|---|---|
/caveman · /ultracave · /megacave |
The voice, the grunt, the 文言文. /caveman status shows the mode, /caveman off stops it |
/caveman-commit |
One-line Conventional Commit |
/caveman-review |
One finding per line: L42: 🔴 null deref. Guard it. |
/caveman-compress <file> |
Shrinks memory files and backs up the original |
/caveman-stats |
Real token usage for this Claude Code session |
/caveman-help |
Every mode and command on one screen |
cavecrew |
Subagents that find, edit, and review code, then report back in caveman |
investigate-first · lean-build · surgical-patch · safe-refactor · migration · verify-and-stop |
Work patterns that write less code. Your agent picks them up when a task fits |
caveman-setup · caveman-discover · caveman-learn · caveman-manage · caveman-optimize · caveman-explore · caveman-evidence-review |
Drive the proxy from inside your agent |
Everything above is for the coding agent you use. Caveman Cloud is for the agents you build.
You ship an agent. Every run costs money. Is it good? Is it cheap? Which change made it worse? Cloud answers.
| Cloud does | What you get |
|---|---|
| Observability | Every run traced to the work and what it cost. Sets itself up from your repo, your keys, and the logs or OpenTelemetry you already have |
| Evals | Grades how good the answers are, on your own tasks, from your real traffic |
| Autopilot | Proposes a cheaper change, tests it on your recorded work, ships only when the evals say answers are still as good. You approve the pull request |
| Proof | Every number says if it is measured, inferred, or verified. A saving counts only after real traffic shows it |
Sign up free · Try the demo · Book a call · Docs
ThePrimeagen : "No way this actually works." Watch
Adobe Research : CAVEWOMAN, arXiv, June 2026
JetBrains : "It is fun, and it costs you nothing measurable in quality." Read
Elastic : elastic-caveman on Elasticsearch Labs, April 2026
Hacker News : #1, 904 points
GitHub Trending #1 overall, July 2026 · Trendshift #1 repo of the day, April 2026 · Product Hunt #8 of the day
Started as a joke in April 2026. Now past 100,000 stars. Joke got serious. Voice did not.
- The skill runs on your machine and sends nothing. One exception:
/caveman-compresssends the file you compress to your configured model provider. - The CLI sends usage stats by default: commands run, token counts, caveman-blocks commands and usage counts, a random install ID, OS, and IP. Never your prompts, code, file paths, or scripts you wrote. One person maintains this for free, and those stats show what to build next. Off for good, Blocks included:
caveman telemetry offorDO_NOT_TRACK=1. - Auto , only once you sign in and pick it: each ask sends Caveman Cloud your latest ask (with whatever your agent attaches to it, such as CLAUDE.md, memory or @-mentioned files), the one before it, and the end of the agent's last reply, plus each request's tool names, effort, a few agent headers, and the previous request's token counts. On the Free plan Caveman may keep it to improve routing.
caveman off routingstops it. - Where requests go: from your machine to your provider, or to another provider you added with
caveman providers add, on your own key. Only a request routed to a Caveman Cloud model passes through Caveman Cloud, whole (system prompt, tool results, code), on your Caveman project's stored key, billed to that project.caveman providers cloud offstops that.
The full list, and how to delete sent telemetry: SECURITY.md.
Apache-2.0, whole repo. Read it, fork it, ship it, host it. Free like mammoth on open plain. Older releases and third-party notices: LICENSING.md. "Caveman" and the rock logo are trademarks of Julius Brussee.
@software{brussee2026caveman,
author = {Brussee, Julius},
title = {Caveman: why many token when few do trick},
year = {2026},
url = {https://github.com/JuliusBrussee/caveman}
}

