JuliusBrussee/caveman
🪨 why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.
About JuliusBrussee/caveman
JuliusBrussee/caveman is an open-source project on GitHub, mainly written in Go. 🪨 why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman. It currently holds 106,899 stars and 0 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).
Project Overview
Git Homed tracks it on the AI Agent Skills Trending board and on the AI AI Agent Skills Trending list.
GitHub Repository Details
README
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.
▶️ ThePrimeagen reacts: "No way this actually works"
🏆 #1 on GitHub Trending · July 2026 · 🥇 #1 Repository of the Day on Trendshift · April 2026
#1 on Hacker News · 904 points · 366 comments · #8 Product of the Day on Product Hunt
📄 Cited in CAVEWOMAN, an Adobe Research paper that measured caveman-style output cutting cost 1.4 to 2.4×, up to 3× · 🧪 Tested by JetBrains on 86 real coding tasks: "costs you nothing measurable in quality"
⚡ One command, no account, no API key. npx skills add JuliusBrussee/caveman -g → Quick Start
---
See it · Quick Start · The Numbers · How it compares · In the Wild · The Skill · The Proxy · Wrap · Your own app · When to Skip · Docs
---
🪨 See it
| 🗣️ Normal agent · 69 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. Inline object prop = new ref = re-render. Wrap in
|
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. Security warnings and "are you sure?" confirmations come back in full sentences on their own, then caveman resumes.
Caveman no make brain smaller. Caveman make mouth smaller.
Half the fun is that your agent talks like it just discovered fire. The other half is that it is still right.
---
🌍 Why this exists
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. Most agents write like a cover letter and read like a firehose.
Caveman attacks both ends, in the agent you run and in the one you build:
- The skill shrinks what the agent says. One rule file. Free forever. Works in 30+ agents.
- The proxy shrinks what the agent reads: logs, test output, JSON, diffs, search results. Runs on your machine. Every squeezed byte gets a backup, so the agent can always pull the original back.
- The middleware does the same inside your own code: one wrapper around the LangChain, Vercel AI SDK, OpenAI, or Anthropic call you already make. Tool results get shrunk before the model sees them, the original stays in your history, and the model can fetch it back.
---
⚡ Quick Start
Caveman come in two sizes. Start small.
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 -g
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. 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
Your own app: the middleware
Building an agent in code instead of running one in a terminal? Same shrinking, one wrapper around the call you already make. MIT client, alpha today:
npm install @caveman-ai/middleware @caveman-ai/sdk # TypeScript, plus your framework (ai, openai, …)
pip install 'caveman-middleware[langchain]' caveman-sdk # Python 3.13+, swap the extra for your framework
Six lines of code and a local runtime. Full walkthrough below.
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.7.0/install.sh | bash
Windows, PowerShell 5.1+:
irm https://raw.githubusercontent.com/JuliusBrussee/caveman/v2.7.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 -g # 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 first five minutes
Small rock. The skill, right after npx skills add:
1. Ask it something. Any coding question. Watch the preamble vanish and the answer stay.
2. Turn the dial. /caveman lite for tight-but-polite. /caveman ultra for grunts. /caveman wenyan for classical Chinese, because someone asked.
3. Commit like a caveman. /caveman-commit writes a Conventional Commit in one line.
4. Review like a caveman. /caveman-review gives one finding per line: L42: 🔴 null deref. Guard it.
5. Shrink your memory files. /caveman-compress CLAUDE.md cuts the prose, keeps every heading, path, and command, and backs up the original.
6. Come home. Say stop caveman. Normal prose returns. No hard feelings.
Big rock. The proxy, right after npm install -g @caveman-ai/cli:
1. Find out where your tokens go. caveman learn reads months of agent history already on your disk, locally, and ranks your token sinks worst-first with a one-line fix behind each. Do this before anything else. It is the most useful five minutes in this README.
2. Let it fix them. caveman learn implement hands each fix to Claude Code or Codex one diff at a time, applied only on your yes, and reverts anything that did not lower tokens per turn.
3. Wrap your agent. caveman claude (or codex, gemini, aider, opencode, pi, …) puts the proxy in front of it. Logs, test output, JSON, and diffs get shrunk before the provider sees them. Originals stay on disk, and the agent can pull any of them back.
4. Shrink the noisy stuff. caveman shrink -- pnpm test compresses command output. caveman browse gives the agent a compressed view of a web page instead of a 15,000-token accessibility dump.
5. Prove it on your own work. caveman trial -- claude runs a real session with and without caveman, then caveman trial report shows the difference. That A/B outranks every number on this page. A trial needs its own proxy, so if you already did step 3 it will tell you to run caveman disable claude first, and caveman enable claude after. Caveman rather say "cannot measure this" than hand you a report full of zeros.
6. Shrink caveman itself. caveman convert --dry-run shows which installed skills get cheaper as PNG pages the model reads as an image. Convert the profitable ones, revert byte-for-byte any time.
7. Watch the bill. caveman stats for history and estimates. /caveman-stats inside Claude Code for that session.
---
📊 The Numbers
Every number below is either from a committed run in this repo or from a named third party. Nothing rounded up. Where a number is small, it says so. Where a row is red, it stays red.
What the skill saves (writing less)
| Who measured | What they measured | Result |
|---|---|---|
| Adobe Research (CAVEWOMAN, arXiv 2606.24083) | Eight models, five datasets, five compression levels | Output-side caveman style cuts realized cost 1.4 to 2.4× per model, up to 3× in the best case |
| JetBrains | 86 real coding tasks, paired A/B, Claude Code 2.1.200. Skill only, no proxy (July 2026, before the proxy existed) | 8.5% fewer output tokens, about 10% cost. No detectable quality change (sign test p = 0.82) |
| This repo (committed eval snapshot) | Ten dev questions, skill vs a plain Answer concisely. control, claude-opus-4-6 | 50% fewer output tokens at the median on top of the terse control. Length only, not correctness |
Read those three together and you get the honest picture. Chat-style Q&A: big cut. Agentic coding sessions, where most tokens are code and tool calls that the skill never touches: high single digits on output, quality flat.
The JetBrains number is why the proxy exists. They measured the skill alone, in July 2026, before the proxy shipped. Their finding was that an agent's bill is mostly reading, not writing, and no talking style fixes that. So we built the thing that shrinks the reading. The table below is what that changed.
The Adobe paper's other finding matters too: compressing the human's prompt into caveman-speak makes models answer longer and worse. Caveman never rewrites your prompts. Only the agent's mouth.
The rules add input tokens on every call, and whether shorter output pays for them depends on your agent, caching, and billing. Full accounting: docs/HONEST-NUMBERS.md.
No reviewed API benchmark result is published here yet. Run
uv run python benchmarks/run.py to generate a new result, then review its raw
response pairs and quality before publishing the generated table.
What the proxy saves (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, every answer checked against an exact oracle:
| 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% |
18 of 18 answer checks passed. Case-clustered 95% interval: 14.6% to 48.5%. In the same suite, Headroom's wrap saved 6.7% and failed 3 of 18 checks. Method, provenance hashes, and limits: docs/WRAP-BENCHMARK.md. Raw harness artifacts are not in this checkout, so treat it as a pinned report, not a public reproduction.
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.
Everything else caveman shrinks
| Surface | Measured | Number |
|---|---|---|
| Browser pages | Focused question against a 200-row table, vs the Playwright ARIA snapshot | 121 tokens vs 15,704. 129.8× smaller. Tiny forms lose 2.3×; the benchmark says so |
| Memory files (/caveman-compress) | Five real CLAUDE.md-style fixtures | 46% smaller on average, headings, code, paths, and URLs verified intact |
| The skill itself (pixel mode) | Rendered to PNG pages the model reads as an image | 1,069 to 415 estimated tokens, a 61% cut |
| Your harness prefix (subagent-tax) | What every subagent re-sends before doing any work | On one real machine, 219k of a 267k-char request was tool schemas. Run it on yours |
---
🧮 How it compares
Many tool in valley promise small token. They work at different layers, so first what each one touches, then what got measured. Every quote below is from that tool's own README or GitHub page on 2026-09-19.
What each one touches
| Tool | What it shrinks | Get the original back? | Phones home |
|---|---|---|---|
| Caveman | What the agent says (skill) and what it reads: tool output, logs, JSON, diffs, test output, web pages (proxy) | Always. Byte-exact original in local SQLite, one recovery handle | CLI: anonymous counts on by default, caveman telemetry off. Skill and hooks: never |
| RTK | Shell command output only: ls, cat, grep, git, test runners. Read and Grep tool calls bypass it | When a command fails or gets cut short, or opt-in for successful runs | Off by default, opt-in |
| Headroom | Tool output, logs, files, and history, through a local proxy | Yes, reversible cache | On by default, HEADROOM_BEACON=off |
| context-mode | Tool output, run in a sandbox so raw data never enters context | Matching sections from a searchable index, not the whole thing back | Never |
| pxpipe | Text context, re-rendered as images the model reads | No. "It is lossy." Misses are silent | Local log only |
What the tin says, and who checked
| Tool | Says on the tin | Who checked, on what | Found | |---|---|---|---| | Caveman | Only what this page measures | This repo, pinned 54-run Claude Code suite, every answer checked against a known-right answer | 33.2% fewer input tokens, 18/18 answers right | | Caveman, skill only | | JetBrains, 86 real coding tasks, paired A/B | 8.5% fewer output tokens, quality flat (sign test p = 0.82) | | RTK | "cuts up to 90% of the bash output your agent reads". Their README adds: "it is not the same as cutting your bill by 90%" | JetBrains, same lab, same method, 86 tasks, 425 billed trials | +7.6% median cost per task at low reasoning effort (p = 0.004), +0.1% at high. Quality tie | | Headroom | "20% fewer tokens for coding agents, 60-95% fewer tokens for JSON" | This repo, same 54-run suite as above | 6.7% fewer input tokens, 15/18 answers right | | context-mode | "315 KB becomes 5.4 KB. 98% reduction." | Own size numbers only. No quality check published | — | | pxpipe | "~59–70% lower end-to-end bill" | Own SWE-bench runs | Lite 10/10 both arms. Pro 14/19 with, 15/19 without, and their rerun of the one split says run-to-run variance |
Same suite, same model, same questions
The one place two of these tools ran side by side against the same known-right answers. Claude Code 2.1.223, claude-sonnet-5, Headroom 0.33.0, six agent-shaped workloads, three runs each, provider-reported input tokens:
| Arm | Answers right | Provider input tokens | vs direct | 95% interval | |---|---:|---:|---:|---:| | Direct Claude Code | 18/18 | 885,793 | baseline | | | Caveman wrap + skill | 18/18 | 591,673 | -33.2% | 14.6% to 48.5% | | Headroom wrap | 15/18 | 703,202 on its 15 correct runs | -6.7% on those 15 | -0.7% to 17.9% |
Caveman used fewer tokens in 15 of the 18 paired runs. Headroom's 703,202 covers only the 15 runs it answered right, so its 6.7% is against those same 15 direct runs, not against the 885,793 total. Its three failed YAML runs stay in the table and count for nothing. Caveman's one red row, HTML at +9.9%, is in the per-case table above and stays red too. We ran this ourselves, and the raw harness artifacts are not published yet, so it is a pinned report, not something you can re-run from this repo. Method and hashes: docs/WRAP-BENCHMARK.md.
RTK, context-mode, and pxpipe were not in that run. RTK rewrites shell output, and this suite hands the agent its data through a tool call, not the shell, so RTK would have sat idle. Different layer, different test. Fair is fair on the rest: RTK's telemetry is opt-in and ours is opt-out, context-mode sends nothing anywhere, and pxpipe ran SWE-bench where we have not. Stack them if you like. Headroom's own README lists caveman as something it happily runs behind.
---
📣 In the Wild
|
ThePrimeagen · "No way this actually works" Adobe Research · CAVEWOMAN: How Large Language Models Behave Under Linguistic Input and Output Compression JetBrains · Speaking to AI Agents like Cavemen Saves 65% of Tokens. We Test. |
Hacker News · #1, 904 points, 366 comments The New Stack · Getting Claude Code to grunt in Caveman-speak might not save as many tokens as you think GitHub Trending · #1 overall, July 2026 Product Hunt · #8 Product of the Day |
---
💬 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.
| Level | Same question: "Why does my React component re-render?" |
|---|---|
| lite | Your component re-renders because you create a new object reference each render. Wrap it in useMemo. |
| full (default) | New object ref each render. Inline object prop = new ref = re-render. Wrap in useMemo. |
| ultra | Inline obj prop, new ref, re-render. useMemo. |
| wenyan-full | 每繪新生對象參照,故重繪;以 useMemo 包之則免。 |
Three things the skill will never do: shorten your code, paraphrase an error message, or grunt through a security warning. It drops to full sentences for anything irreversible, then picks the club back up.
Everything in the box · commit messages, reviews, subagents, work patterns
| Tool / command | What you get |
| ----------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| /caveman [lite\|full\|ultra\|wenyan-lite\|wenyan-full\|wenyan-ultra\|off] | Shorter replies at the intensity you choose. |
| cavecrew-investigator, cavecrew-builder, cavecrew-reviewer | Compressed subagent
