Caveman: The AI Coding Agent Skill That Cuts 65% of Tokens With 85K+ GitHub Stars
Learn how Caveman, the most-starred AI coding agent skill on GitHub, reduces output tokens by 65% without losing technical accuracy. Works with Claude Code, Codex, Gemini, Cursor, and 30+ agents.
What Is Caveman and Why Is It Trending?
Caveman is the most-starred AI coding agent skill on GitHub right now, with over 85,000 stars and counting. Created by Julius Brussee, it solves a problem every developer using AI coding assistants faces: verbose, repetitive responses that burn through tokens and slow down your workflow.
The concept is simple but brilliant. Instead of your AI agent responding with:
Sure! I'd be happy to help you with that. The issue you're experiencing is most likely caused by your authentication middleware not properly validating the token expiry. Let me take a look and suggest a fix.
Caveman makes it say:
Bug in auth middleware. Token expiry check use < not <=. Fix:
Same technical content. Same fix. One-third the tokens.
How Caveman Works: Compression Without Losing Quality
Caveman isn't a model fine-tune or a wrapper API. It's a skill file that drops into your agent's configuration and teaches it to communicate in compressed language. The skill instructs the agent to:
- Drop filler words and pleasantries
- Use sentence fragments instead of complete sentences
- Preserve all code, commands, error messages, and technical terms exactly
- Keep the same technical accuracy and problem-solving ability
The result? Real benchmark data shows an average 65% reduction in output tokens across 10 common development tasks, ranging from 22% to 87% savings depending on the task type.
Real Token Savings from Caveman Benchmarks
| Task | Normal Tokens | Caveman Tokens | Saved |
|---|---|---|---|
| Explain React re-render bug | 1,180 | 159 | 87% |
| Fix auth middleware token expiry | 704 | 121 | 83% |
| Set up PostgreSQL connection pool | 2,347 | 380 | 84% |
| Explain git rebase vs merge | 702 | 292 | 58% |
| Implement React error boundary | 3,454 | 456 | 87% |
The biggest savings come from explanatory tasks where agents tend to be most verbose. Refactoring and code review tasks see smaller (but still significant) reductions because they're already more technical.
Six Compression Levels: Pick Your Grunt
Caveman isn't one-size-fits-all. It offers six compression levels you can switch between anytime during your session:
- Normal agent: "You should wrap the object in useMemo, since a new reference is created on every render."
- Lite: "Wrap object in useMemo. New ref created every render."
- Full (default): "New ref each render. Wrap object in useMemo."
- Ultra: "New ref/render. useMemo it."
- Wenyan: Same concept rendered in classical Chinese, which packs more meaning per token
Switch levels with a simple command: /caveman lite or /caveman ultra. The level sticks for your entire session until you change it.
Importantly, Caveman preserves your language. If you write in Portuguese, your agent responds in compressed Portuguese. Spanish, French, German — all work. The skill compresses the style, never translates the language (wenyan mode is the intentional exception).
Installation: One Command, Every Agent
Caveman's installation process is remarkably simple. One command detects every AI coding agent on your machine and installs the skill for each:
# macOS, Linux, WSL, Git Bash
curl -fsSL https://raw.githubusercontent.com/JuliusBrussee/caveman/main/install.sh | bash
# Windows PowerShell 5.1+
irm https://raw.githubusercontent.com/JuliusBrussee/caveman/main/install.ps1 | iex
The installer takes about 30 seconds, requires Node.js 18 or higher, and skips agents you don't have installed. It's safe to re-run anytime.
Agent-Specific Installation
For specific agents, you can use their native plugin systems:
# Claude Code plugin
claude plugin marketplace add JuliusBrussee/caveman && claude plugin install caveman@caveman
# Gemini CLI extension
gemini extensions install https://github.com/JuliusBrussee/caveman
# Cursor, Windsurf, Cline, Codex, and 30+ more via skills registry
npx skills add JuliusBrussee/caveman -a cursor
Once installed, Caveman is automatically active on Claude Code, Codex, and Gemini from your first message. On other agents, activate it by typing /caveman or saying "talk like caveman." Deactivate with "normal mode."
Real-World Example: Debugging a React Performance Issue
Let's see Caveman in action with a realistic development scenario. You're debugging a React component that's re-rendering unnecessarily:
Your question: "Why is my UserProfile component re-rendering every time the parent updates, even though the user data hasn't changed?"
Without Caveman (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.
With Caveman (19 tokens):
New object ref each render. Inline object prop = new ref = re-render. Wrap in useMemo.
Same diagnosis. Same solution. 72% fewer tokens. When you're paying per-token API costs or hitting rate limits, this adds up fast across hundreds of interactions per day.
Beyond Output: Compressing Memory Files Too
Caveman doesn't just shrink what your agent says — it can also compress your agent's memory files to reduce input tokens permanently.
The /caveman-compress command rewrites files like CLAUDE.md (your agent's preferences and context) into caveman-speak. This cuts about 46% of input tokens every single session going forward, because the agent loads a smaller context file each time it starts.
Real compression results from typical memory files:
- claude-md-preferences.md: 706 tokens → 285 tokens (59.6% saved)
- project-notes.md: 1,145 tokens → 535 tokens (53.3% saved)
- claude-md-project.md: 1,122 tokens → 636 tokens (43.3% saved)
- todo-list.md: 627 tokens → 388 tokens (38.1% saved)
Code, URLs, and file paths remain byte-for-byte exact. Only the natural language gets compressed.
The Full Caveman Ecosystem
Caveman is part of a larger ecosystem of tools built around the same principle: do more with less.
- caveman-code: A complete terminal coding agent, caveman from top to bottom. Uses approximately 2x fewer tokens than Codex on identical tasks.
- cavemem: Compresses what your agent remembers across sessions, reducing persistent context size.
- cavekit: Spec-driven build loop that eliminates guessing and redundant iterations.
- cavegemma: A Gemma model fine-tune that bakes caveman compression directly into the model weights.
There's also caveman-shrink, an MCP middleware that wraps any MCP server and compresses its tool descriptions, and cavecrew-* subagents that use about 60% fewer tokens than vanilla subagents.
Key Benefits of Using Caveman
- 65% average output token reduction without losing technical accuracy
- Works with 30+ AI coding agents including Claude Code, Codex, Gemini, Cursor, Windsurf, Cline, and Copilot
- One-command installation that auto-detects your agents
- Six compression levels from lite to ultra to wenyan (classical Chinese)
- Permanent input token savings via memory file compression (~46% reduction)
- Zero telemetry or network calls after installation — completely private
- MIT licensed and free forever — no accounts, no backend, no tracking
- Preserves your language — compresses style, not translation
- Research-backed — a March 2026 paper found brief answers improved accuracy by ~26 points on some benchmarks
Honest Numbers: What Caveman Doesn't Save
Caveman's creator is refreshingly transparent about the tool's limitations. The skill only shrinks output tokens. Input tokens and reasoning tokens remain untouched, and the skill itself adds approximately 1,000-1,500 input tokens per turn.
This means whole-session savings run smaller than the output-only numbers suggest. On already-terse workloads (short code snippets, simple commands), you might even go net-negative. The real win is readability and speed. Cost savings are the bonus.
The project includes detailed documentation on when Caveman wins, when it loses, and how to measure your own savings with /caveman-stats.
Frequently Asked Questions
Is Caveman really free?
Yes. Caveman is MIT licensed and free forever. There are no premium tiers, no accounts required, and no hidden costs. The project is sustained by sponsors and GitHub stars.
Does Caveman work with my AI coding agent?
Caveman supports 30+ agents including Claude Code, OpenAI Codex, Gemini CLI, Cursor, Windsurf, Cline, GitHub Copilot, and many more. If your agent supports skills or plugins, Caveman probably works with it. Check the INSTALL.md file in the repository for the complete compatibility matrix.
Will Caveman make my agent dumber?
No. Caveman compresses what your agent says, not what it knows. Technical accuracy remains 100% — all code, commands, error messages, and technical terms are preserved byte-for-byte. The agent still understands your full question and provides complete solutions, just with fewer filler words.
Does Caveman send my code anywhere?
No. After installation, Caveman makes zero network calls. It's a local skill file with local scripts. Your code, conversations, and token statistics never leave your machine. The install process fetches from GitHub and your agent's registry, but nothing is uploaded or tracked.
Can I use Caveman in my native language?
Yes. Caveman preserves your language and only compresses the style. If you write in Portuguese, Spanish, French, German, or any other language, your agent responds in compressed versions of that same language. The only exception is wenyan mode, which intentionally uses classical Chinese for maximum compression.
How do I measure my actual token savings?
Use the /caveman-stats command to see real session token usage, lifetime savings, and estimated cost reduction in USD. You can share your stats on social media with the --share flag. On Claude Code, the statusline shows your lifetime tokens saved in real-time.
What if I want to turn Caveman off temporarily?
Simply say "normal mode" or type /caveman normal to switch back to standard responses. You can switch between any of the six compression levels anytime during your session. The level persists until you change it or the session ends.