How to Reduce Claude Code Token Usage with Caveman: A Complete Setup Guide
For a simple task like:
Fix the authentication bug.
Claude may explain the issue, describe its plan, provide progress updates, and finish with a long summary - even when you only need the result.
That's where Caveman comes in.
Caveman is an open-source skill/plugin that makes AI coding agents communicate more concisely while preserving important technical information such as code, commands, file paths, and errors.
Instead of:
I've identified the issue with the authentication middleware. I'll update the implementation and run the relevant tests."
You get something closer to:
Auth middleware issue. Fix implementation. Run tests.
Same work. Fewer unnecessary words.
Why Use Caveman?
A Claude Code session can involve prompts, repository context, files, tool results, conversation history, and model responses. As the session grows, so does the context.
Caveman primarily helps by reducing output verbosity. Newer Caveman Proxy functionality can also compress some input/context before it reaches the model.
Important: A claimed 65% reduction mainly refers to output tokens. It does not automatically mean your total Claude bill will be 65% lower.
Your actual savings depend on your workload, context size, tool calls, caching, reasoning, and number of iterations.
Install Caveman with Claude Code
Prerequisites
You need:
- Claude Code
- Node.js 18+
- npm
- macOS, Linux, WSL, or supported Windows environment
Check your installation:
node --version
npm --version
claude --version
Install the Caveman plugin
Add the marketplace:
claude plugin marketplace add JuliusBrussee/caveman
Then install Caveman:
claude plugin install caveman@caveman
Start Claude Code:
claude
Then activate Caveman:
/caveman
You can select a compression level:
/caveman lite
/caveman full
/caveman ultra
The available modes can vary depending on the installed version.
Which Mode Should You Use?
My recommended setup:
| Task | Mode |
|---|---|
| Normal development | full |
| Debugging | full |
| Running tests | full |
| Repetitive tasks | ultra |
| Learning | Off |
| Documentation | Off |
| Architecture discussions | Off |
Aggressive compression isn't ideal when you need detailed explanations, documentation, tutorials, or architectural discussions.
Measure Your Actual Savings
Don't rely only on the headline percentage.
Run the same type of workload before and after enabling Caveman and compare:
- Input tokens
- Output tokens
- Total tokens
- Number of turns
- Completion time
You can also check Caveman's statistics:
/caveman-stats
This lets you see estimated and session-level savings rather than simply assuming Caveman is helping.
Compress CLAUDE.md
Caveman can also compress context files such as:
CLAUDE.md
using:
/caveman-compress <file>
This is useful when your CLAUDE.md contains a lot of repetitive instructions. The project says its compression preserves important elements such as code, URLs, and paths.
Caveman vs Normal Claude Code
The basic idea is simple:
Normal Claude Code
User → Claude Code → Claude → Detailed response
With Caveman
User → Claude Code → Claude → Compressed response
Newer proxy functionality can go further by compressing supported input/context as well as output.
Does Caveman Reduce Claude's Intelligence?
No. Caveman primarily changes how Claude communicates, rather than replacing the underlying model.
Think:
"Let me explain the issue in detail..."
becoming:
"Root cause: DB timeout."
The goal is to remove unnecessary communication—not reduce the actual coding work.
Conclusion
For repetitive Claude Code workflows, Caveman can make the experience much cleaner:
Root cause: connection timeout.
Changed:
src/db/pool.ts
Timeout:
1s → 5s
Tests:
14/14 passed.
That's often all a developer needs.
The key takeaway is simple:
Don't assume "65% fewer output tokens" means 65% lower cost.
Test Caveman on your own workload, measure the difference, and decide whether the savings are meaningful for your workflow.
Few words. Same work. More context. Less token waste.
Comments
Post a Comment