Caveman - Make AI Coding Agents Stop Wasting Tokens

After installing Caveman, your AI agent suddenly stops rambling. 85,900+ Stars, MIT license, takes 30 seconds to set up.

What is this?

Caveman is a plugin for AI coding agents. Claude Code, Codex, Gemini, Cursor, Windsurf, Copilot — all of them support it.

It does one thing: makes AI answers shorter.

Not shorter thinking. Shorter talking.

Before:

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

After:

New object ref each render. Inline object prop = new ref = re-render. Wrap in useMemo.

Same answer. 69 tokens becomes 19. Code and accuracy preserved. Verbosity gone.


Does it actually work?

Metric Result
Output tokens saved 65% (range 22-87%)
Technical accuracy 100% preserved
Time to install ~30 seconds
Agents supported 30+
Input token cost +1-1.5k per turn (skill overhead)

How does it work?

  1. A small skill file installs into your agent
  2. It tells the AI: skip the filler, keep tech content, use fragments — but never touch code, commands, or errors
  3. Every reply auto-compresses

Install

Detects every agent on your machine and installs for each:

1
2
3
4
5
# macOS / Linux / WSL
curl -fsSL https://raw.githubusercontent.com/JuliusBrussee/caveman/main/install.sh | bash

# Windows PowerShell
irm https://raw.githubusercontent.com/JuliusBrussee/caveman/main/install.ps1 | iex

Option 2: Single agent

1
2
3
4
5
6
7
8
9
# Claude Code
claude plugin marketplace add JuliusBrussee/caveman
claude plugin install caveman@caveman

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

# Cursor / Windsurf / Cline / Codex
npx skills add JuliusBrussee/caveman -a cursor

See INSTALL.md for the full list.

Note: Claude Code / Codex / Gemini turn on automatically. Other agents need /caveman or say “talk like caveman” to enable. Say “normal mode” to disable.


Command Reference

Command What it does
/caveman [lite|full|ultra|wenyan] Toggle compression level
/caveman-commit Generate <=50-char commit messages
/caveman-review One-line PR comments
/caveman-stats Real-time usage, lifetime savings, USD
/caveman-compress <file> Compress memory files, saves ~46% input tokens every session after

Compression Levels

Level What it does
lite Light trimming, keep basic explanation
full Default — terse where it should be
ultra Cut everything cuttable
wenyan Classical Chinese — maximum meaning per token

The Caveman Family

Project What it compresses
caveman What the agent says (this repo)
caveman-code The whole agent, ~2x less than Codex
cavemem Cross-session memory
cavekit Build loop

Advanced Tips

Rewrite CLAUDE.md or project notes once — every session after starts ~46% smaller:

1
caveman-compress ./CLAUDE.md

Measured results:

File Before After Saved
claude-md-preferences.md 706 285 59.6%
project-notes.md 1145 535 53.3%
claude-md-project.md 1122 636 43.3%
Average 898 481 46%

One compress, every session wins. Code, URLs, paths unchanged.

Live savings tracker

Type /caveman-stats:

  • Current session usage
  • Lifetime tokens saved
  • USD equivalent
  • Add --share for a tweetable one-liner

MCP middleware

1
npm install -g caveman-shrink

Wraps any MCP server, compresses its tool descriptions.


FAQ

Q: Will Caveman make the AI dumber?
A: No. Only output gets compressed. Model reasoning stays the same. Code, errors, and tool returns are untouched.

Q: How much does a whole session save?
A: 65% on output, but +1-1.5k input per turn for the plugin itself. Whole-session savings vary by task.

Q: Which tasks benefit most?
A: Long code explanations, error debugging (up to 87% savings). Short Q&A may go net-negative.

Q: Is there academic backing?
A: Yes. The 2026 ArXiv paper tested 31 models and found forcing brief answers improved accuracy by ~26 points on some benchmarks.