
JuliusBrussee /
caveman
Makes coding agents answer tersely and shrinks the logs and output they read
- 114.4k stars
- 5.7k stars since 3 Oct
- Go
- Updated yesterday
- Beginner friendly
- Token & cost savings
AI coding agents are billed by the token. They write long, polite answers and read huge logs, test output and diffs. Caveman goes after both sides. The skill is a rule file that tells the agent to drop the filler and answer in short, caveman-style prose. Code, commands, file paths and error messages are left alone, and security warnings come back in full sentences.
The proxy runs on your machine between the agent and the AI provider. It compresses logs, JSON, test output and diffs before the model sees them, and keeps a backup of every original so the agent can fetch it back. A middleware package does the same inside your own app, wrapping LangChain, Vercel AI SDK, OpenAI or Anthropic calls.
The README is frank about the numbers. A JetBrains test of the skill alone on 86 coding tasks found about 8.5% fewer output tokens with no detectable quality change. The repo's own eval shows only about 3% on top of a plain 'answer concisely' instruction, and 35% at the ultracave level. The authors say most of an agent's bill is reading, which is why the proxy exists.
What it does
Skill for shorter answers
One rule file makes the agent drop preamble and talk tersely. The README says it works in 30+ agents, including Claude Code, Codex, Gemini, Cursor and Cline. Say 'stop caveman' to return to normal prose.
Proxy that shrinks what agents read
A local proxy compresses logs, test output, JSON and diffs before each call. Originals stay on disk so the agent can pull them back. You wrap an agent with a command like
caveman claude.Spend analysis
caveman learnreads agent history already on your disk and ranks where your tokens go, with a one-line fix for each.caveman trialruns a session with and without caveman so you can compare.Small helper commands
/caveman-commit writes a one-line Conventional Commit. /caveman-review gives one finding per line. /caveman-compress shrinks memory files like CLAUDE.md and backs up the original.
Middleware for your own app
npm and Python packages wrap a model call you already make. Tool results are shrunk before the model sees them, and the model can fetch the original.
What you could build
- Install the skill to get shorter answers from Claude Code or Codex.
- Wrap an agent with the proxy so long test output and logs cost fewer tokens.
- Find out which habits in your agent history use the most tokens.
- Add the middleware to a LangChain or Vercel AI SDK app to shrink tool results.
- Run an A/B trial to measure whether it saves tokens on your own work.
Get started
Start with the skill: run the one command, then ask your agent a coding question, or type /caveman if it doesn't switch on by itself. If you want to shrink what the agent reads too, install the CLI and wrap your agent.
npx skills add JuliusBrussee/caveman -gnpm install -g @caveman-ai/cli && caveman setup --installcaveman claudeCommands are copied from the project's README. Read it on GitHub for the full setup.
Anything better than caveman?
Caveman is the only pick here that covers both sides: terse agent replies plus a proxy that shrinks what the agent reads. It's easy to adopt and very popular. Look at Headroom if input compression is the main goal.
-
headroomAlternative Your token cost comes mostly from what the agent reads (tool output, logs, JSON, RAG chunks) and you want a dedicated library, proxy or wrapper for that. Trade-off: It does nothing to make the agent's own answers shorter, and it is more involved to set up than a rule file.
-
i-have-adhdAlternative You only want shorter, scannable replies (action first, numbered steps) and don't need a proxy or any input compression. Trade-off: It targets readability rather than token cost and has no proxy to shrink input.
-
billion-contextUse alongside
You run very long agent sessions that hit context limits; it folds old conversation into restorable summaries, on top of Caveman's per-message savings.
Trade-off: It adds a second proxy layer and is less mature, with far fewer stars.
-
claude-memUse alongside You also want past sessions summarized and fed back automatically so you stop re-explaining your project. Trade-off: It solves memory rather than token cost, and the injected context adds tokens.
More in Token & cost savings
billion-context
A proxy that compresses long coding-agent chats so one session can run for weeks