77.5k stars with just one idea: getting an AI agent to talk like a prehistoric person

77.5k stars with just one idea: getting an AI agent to talk like a prehistoric person

Table of Contents

77.5k stars with just one idea: getting an AI agent to talk like a caveman

⛏️ “Why use many tokens when few do the trick.”

The $80 Bookmark

Last April, I was working on several PRs for a service layer refactor at my workplace. Every time I ran Claude Code to review or generate a piece of code, the output would always be:

“Sure! I’d be happy to help you with that. The issue you’re experiencing with the Go context cancellation in your handler is likely caused by…”

Reading it seemed fine, technically correct. But when I opened the API dashboard tab, I was shocked. Each session had 20-50K output tokens, and the Claude API charges $15/1M output tokens. Rough calculation: I ran around 20-30 small tasks a day. A month would easily cost me a bookmark worth $80 just for a few polite sentences from the AI.

Over coffee with a friend, he boasted: “I just found a repo on GitHub, 70K stars. It makes Claude speak like a caveman - saves a ton of tokens.” I thought he was joking, but when I checked it out, I saw the legendary tagline:

“why use many token when few do trick”

The repo is called Caveman, authored by JuliusBrussee. At the time of writing this article, it has 77.5k stars, 4.4k forks, MIT license. The numbers are staggering for a simple skill that only does one thing: making the AI agent speak more concisely. In this article, I will dissect everything from setup, architecture, benchmark, to the ecosystem of Caveman - and why I think it’s a must-have plugin for anyone burning output tokens on unnecessary filler sentences. 🪨

First Look: Installation and Initial Impression

Caveman is a skill/plugin. Essentially, it is a system prompt template. No Docker, no separate API key, no complicated pip installation required.

Installation for Claude Code:

claude mcp add caveman -- npx @caveman/mcp

Or simpler: copy the system prompt into Claude Code CLI config. The GitHub repo provides instructions for each agent: Codex, Gemini, Cursor, Windsurf, Cline, Copilot, OpenClaw, Continue.dev… totaling 40+ agents. This is the first advantage - no vendor lock-in.

After installation, run any query:

claude "Explain Go context.WithCancel vs context.WithTimeout"

Output before Caveman:

“Great question! Let me explain the difference between context.WithCancel and context.WithTimeout in Go. context.WithCancel creates a new context derived from a parent context with a cancel function that you can call to signal cancellation. It’s useful when you want to manually control when a goroutine should stop. On the other hand, context.WithTimeout creates a context that automatically cancels after a specified duration. This is particularly helpful for deadline-based operations…” → ~150 tokens, zero code

Output after Caveman is activated:

WithCancel: manual cancel(). WithTimeout: auto-cancel after N. Use WithCancel for goroutine lifecycle, WithTimeout for ops with deadline. → ~25 tokens, still enough information to work with.

I laughed after reading it the first time. It feels like AI has been brought back to the Stone Age. But it works and saves money. The tagline is not meant to troll - it addresses the correct pain point: LLMs like to talk a lot, developers like to hear exactly what they need to hear.

Architecture Deep Dive: How Does it Work?

Caveman is not a new model. Nor is it an API wrapper. It is a system prompt + a few carefully designed rules to exploit how LLM generates text.

Layer 1: BPE Tokenizer Exploitation

This may seem simple at first, but it’s actually quite profound. The LLM tokenizer (Byte Pair Encoding - BPE) splits text into tokens based on the frequency of sub-word occurrences. Filler sentences like “I’d be happy to help”, “Sure, let me explain that” are extremely common phrases → being tokenized very efficiently into 1-2 tokens per phrase.

But the danger is: once the LLM generates these tokens, it will pull along a series of polite-mode text that follows. This is a self-reinforcing loop - generating “Sure!” at the beginning of a sentence means the probability of it choosing a formal tone for the rest of the paragraph is very high.

Caveman blocks this from the start. The system prompt clearly states: no filler, no greetings, go straight to the point. Each token is not wasted.

Layer 2: Self-Reinforcing Generation

This is an interesting observation. The first token determines the tone of the entire paragraph:

First tokenSystem prompt activationExpected length
“Sure!”Polite, explanatory modeLong
“Bug”Direct, factual modeShort
“The”Neutral, could go either wayMedium
“Actually”Defensive/correcting modeShort-medium

Caveman exploits this by forcing the first word to be a noun or verb directly. Once the first token is content rather than procedure, the rest of the sentence will maintain that tone.

Layer 3: System Prompt Privilege

The system prompt in LLM has the highest priority. The user message can say whatever it wants, but the instructions in the system prompt are almost impossible to override by user context (unless the user specifically jailbreaks it). Caveman takes advantage of this: the “no filler” rule is placed at the end of the system prompt, where the LLM attention tends to focus the most.

Combining these 3 layers, the mechanism is:

User query → System prompt rules (no filler, be direct) + context 
          → Tokenizer (first token forced to be content, not greeting)
          → Generation loop (self-reinforcing: short → short → short)
          → Output (65% fewer tokens, same information density)

No internet, no fine-tuning the model, no proxy. Just a few lines of system prompt, but it takes advantage of how LLM works. Good design.

Feature Walkthrough: Caveman Ecosystem

Initially, Caveman was just a system prompt. However, the community and author have expanded it into a full toolchain.

/caveman [lite|full|ultra|wenyan - 4 levels of compression

  • lite: Only drop filler words, keep the sentence structure intact. Similar to writing work emails but omitting unnecessary sentences. Reduces ~40%.
  • full (default): Caveman style. “Why use many tokens when few do the trick”. Removes articles and unnecessary prepositions. Reduces ~65%.
  • ultra: Telegraphic. Note-like, almost only keywords remain. “context.WithCancel: manual cancel. context.WithTimeout: auto timeout.” Reduces ~80%.
  • wenyan: Classical Chinese - ancient Chinese literature. Because classical Chinese is extremely condensed (each character implies multiple meanings). Reduces ~85%. I haven’t tried this yet, as reading it requires a dictionary. 😅

/caveman-commit - Conventional Commits ≤50 characters

This is useful. When you git log, you see messages like:

feat: add user authentication middleware with JWT token validation and role-based access control

Caveman-commit turns it into:

feat: auth middleware + JWT + RBAC

50 characters, sufficient meaning. And it follows the Conventional Commits spec. I’m using this for minor refactor commits - saves time thinking of a message.

/caveman-review - PR review in “bullet point” style

AI review of pull requests is too long? Each comment is 3-4 lines? Caveman-review gives you 1 line per comment.

LGTM except: line 42 nil check missing → add guard

If the code actually has issues, it still detects them. It just removes all the “This is a good attempt but I think there’s a potential issue here…”.

/caveman-stats - Token tracking

> /caveman-stats

[CAVEMAN ⛏ 12.4k tokens saved
───────────────────────────────
Total saved output: 12,472 tokens
Total saved input:  3,180 tokens
Total saved:        $0.21 USD
Session lifetime:   47 calls
Active since:       2026-06-25

It’s been running, and in just 2 days, it’s saved $0.21. If scaled up to a team of 10 people, it’s easy to save $200+ per month. It may not seem like a lot, but $200/month is the cost of a cloud database.

/caveman-compress <file> - Memory compression tool

I like this feature the most. Memory files are what AI agents use to remember context between sessions. Over time, each memory file can grow to 5-10K tokens. The more tokens, the more expensive and slower it becomes.

Caveman-compress compresses memory files, reducing 46% of input tokens on average. Each time the agent reads the compressed memory file, its context is almost half as heavy.

# Before: 2,134 tokens
/caveman-compress ~/.claude/memory-context.md

The mechanism: it parses memory → detects what’s filler and what’s real context → re-writes in caveman style → overwrites the file. It still keeps the structure and information intact, only dropping redundant phrasing.

caveman-shrink - MCP middleware

This is new, and I think it’s the most applicable in teams. It’s MCP middleware that automatically compresses tool descriptions before sending them to LLM.

Tool descriptions are often written too long: “This tool enables you to search through the codebase for files matching a specific pattern. It uses ripgrep under the hood…” Each description sentence can cost 10-15 tokens, multiplied by 20-30 tools in MCP → 300-500 tokens per request.

Caveman-shrink compresses tool descriptions into:

Tool: search_files. Uses ripgrep. Pattern + path params.

Saves ~70% of tool description tokens. In a devops team with 5-10 MCP servers, the number of tokens saved per day is significant.

cavecrew-* - Multi-agent orchestration

This is new in the recent release. cavecrew allows you to create a team of sub-agents, all speaking in caveman style. Junior agents receive tasks, break them down into subtasks, and assign them to other agents. The author claims 60% fewer tokens compared to similar crewAI.


Genshijin (原始人) - Japanese Version

This one is quite amusing after a quick read. A developer named InterfaceX forked Caveman into a Japanese version called Genshijin (原始人, which translates to “caveman” or “primitive person”).

Why is this necessary? The Japanese language inherently contains many redundant structures: 敬語 (keigo - honorific language), 冗長助詞 (zyocho joshi - lengthy particles), and various types of ぼかし (bokashi - softening or mitigating expressions). A polite sentence in Japanese can be twice as long as a sentence with the same meaning in English.

Genshijin eliminates all of these. The result: 80% savings (compared to 65% in the English version). This figure shows that LLMs (Large Language Models) not only speak at length in English but also in every language, and languages with more structural redundancy waste even more.

Genshijin has 3 modes:

ModeExplanationSavings
丁寧 (Teinei)Polite - removes honorific language to the maximum extent while still being polite~60%
通常 (Tsuujou)Default - caveman style~80%
極限 (Kyokugen)Extreme - telegraphic style + removes all particles~90%

The lesson learned: if you work with LLMs in Japanese, you are being overcharged for all the honorific language. 😂

Benchmark: 65% - Anyone who speaks must have numbers

The repo has a fairly comprehensive benchmark across 10 different engineering tasks. Each task runs 3 times with a temperature of 0.3, taking the average token count.

TaskTypeBefore (tokens)After (tokens)Savings
Explain React re-renderExplanation3504687%
Fix auth middlewareDebug + code4808283%
PostgreSQL connection poolExplanation2904684%
Git rebase vs mergeComparison2209258%
Refactor callback to asyncCode generation38029622%
Architecture comparisonAnalysis51035730%
PR review security auditReview89052541%
Docker multi-stageExplain + code41011572%
Debug race conditionDebug + explain56010681%
React error boundaryExplain + code3804987%
Average-1,21429465%

Some observations from the benchmark:

  • Explaining concepts (React re-render, PostgreSQL pool, Docker multi-stage): the highest savings, 72-87%. Because these tasks often use long explanation patterns.

  • Code generation (refactor callback): the lowest savings, 22%. Code is already short - can’t remove code lines, or it will be a syntax error.

  • Analysis/architecture (comparison, review): average, 30-41%. LLM still needs analysis depth.

  • Are there tasks with negative savings? The repo doesn’t report, but personally, I’ve seen that sometimes code-heavy tasks that force ultra mode can cause LLM to skip details → need to run again. That’s a hidden cost.

Bottom line: if your task is “explanation”, Caveman is a good choice. If your task is “writing code”, the effect is lower - but it’s not a loss either.

DX (Developer Experience): Is it a pleasure to use?

Good:

  • Zero config setup. Copy-paste a system prompt file. Run it immediately. Takes 30 seconds.
  • Statusline badge. CLI agent displays badge [CAVEMAN ⛏ 12.4k - look at it to know how much you’re saving.
  • Auto-activation. With Claude Code and Codex, it auto-activates based on config. No need to type commands every time.
  • Safety valve. If a query is related to destructive operations (delete, drop, force push), it automatically reverts to normal tone. No “death” due to overly brief answers.
  • Quick mode switching. /caveman ultra if you need optimization, /caveman lite if you need easier reading. No need to restart.

Not good:

  • Sometimes too brief. This is the most obvious trade-off. With full mode, occasionally the output is only 1-2 lines, lacking context to understand. You have to ask again “explain more” - which wastes another request.
  • English-centric. The system prompt is optimized for English. Using it with Vietnamese or Japanese, you have to adjust it yourself. (Unless you use Genshijin for Japanese.)
  • No blocking guard. It can silently fail in some edge cases. For example, a few times I saw it keep the original output as if there was no Caveman - probably due to LLM attention not catching the rules. You have to run the command again to get it right.
  • Codex integration is incomplete. With Claude Code and Gemini, it’s seamless, but with Codex (Amazon), the config is a bit roundabout.
  • Ultra mode is dangerous. If you use ultra for code generation tasks, it can omit import statements or write function signatures with missing parameters. Check carefully.

The overall friction is very low. With a 65% savings in output tokens, these minor pains are completely acceptable.

Weaknesses: Bug và Edge Case

I don’t praise one-sidedly. Here are a few things I encountered when using it in real-life scenarios:

1. Context-dependent instructions bị mất

Caveman rules can make LLM “forget” to explain the context. For example, the prompt “Explain the auth middleware in this code” - the output is only “Middleware checks JWT in header. Returns 401 if invalid.” But it doesn’t explain why the middleware is needed here. For junior devs in the team, this answer is not enough.

Fix: Add explicit_context: true to the prompt when a full explanation is needed. Caveman has this flag. But most people don’t know about it.

2. Inconsistent formatting

Sometimes the output lacks closing backticks, or the code block doesn’t have a language specifier. It’s usually fine in the panel, but a few times I copied the code out and it had syntax errors due to missing line breaks.

3. Non-English struggle

When used with Vietnamese, the output of Caveman in full mode is a bit weird. “Fix bug user không login được → check token trong header, nếu không có trả 401.” Vietnamese is not a “caveman-friendly” language - it omits all the connecting words, making the sentence hard to read.

Gợi ý: Create “Caveman for Vietnamese” - that’s probably a good idea for someone who wants to contribute.

4. LLM hallucination tăng nhẹ

This hasn’t been officially benchmarked, but I have the impression that shorter outputs are more prone to hallucination. When LLM writes longer, it has the opportunity to self-correct - it can write a wrong sentence, then correct it in the next two sentences. With Caveman, the output is short, so each sentence must be correct, or it’s wrong altogether.


Comparison: Versus Alternatives

Caveman is not the only tool in the token optimization village.

ToolApproachSavingsSetup complexityAgent support
CavemanSystem prompt + rules65% outputExtremely low (30s)40+ agents
GPT-4o MiniModel replacement~10x cheaper APIMediumOnly OpenAI
Prompt compression (LLMLingua)Input compression~40% inputHigh (requires separate model)Limited
Manual prompt engineeringManual prompt writingVariableLowUniversal
Claude 3.5 HaikuCheaper model~5x cheaper than SonnetLowOnly Claude
Skeleton-of-ThoughtOutput template~30%MediumExperimental

Caveman vs using a cheaper model:

If you’re using Claude Sonnet and switch to Haiku, you save ~5x. But the quality decreases significantly. Caveman keeps the original model, only compressing the output - you still use Sonnet but pay 65% less.

Caveman vs LLMLingua (prompt compression):

LLMLingua compresses input tokens, not output. The two tools complement each other. If you combine both: 40% input compression + 65% output compression → total savings can reach 70-75% depending on the workload.

Caveman vs manual prompt writing:

Manually writing “please answer briefly” also works, but it’s not as optimized as Caveman because it exploits the BPE tokenizer mechanism and self-reinforcing generation. The effectiveness difference is around 20-30%.

Bottom line: Caveman does not replace cheaper models. It is a supplementary layer on top of the model you’re already using. Combine with a cheaper model + input compression → the optimal combination.

Verdict: Who Should Use It? When Not to Use It?

Should Use If:

  • 🟢 You are using Claude Code, Codex, Cursor, Windsurf, Cline, or any agent with output costs. If you pay for output tokens, Caveman is a no-brainer.
  • 🟢 Your team has more than 5 users of AI agents. Costs add up quickly. Each developer at $20/month token → 5 people already $100. Caveman reduces it to $35.
  • 🟢 You are doing automated code review. Traditional PR reviews cost 500-800 tokens. Caveman-review reduces it to 100-200. Still catches bugs.
  • 🟢 You use automatic Git commit messages. Caveman-commit gives you messages under 50 characters, following Conventional Commits standards.
  • 🟢 You want minimal output. Some people prefer reading short answers. Caveman is for you.

Should Not Use If:

  • 🔴 You are a junior dev who needs AI to explain things in depth. Short output may skip context that you are not familiar with. Learning through AI with Caveman is not effective.
  • 🔴 You write content (blog, docs, email) using AI. Caveman is designed for code, not content writing. Output has a “stone age” vibe.
  • 🔴 You use non-English languages frequently. Vietnamese, Thai, Arabic - Caveman requires additional custom prompts. The original version is only optimized for English.
  • 🔴 Your task requires in-depth analysis. Architecture comparison, trade-off analysis, security audit - tasks that require depth. Caveman has a lite mode for this, but it’s not as optimized as handwritten prompts.

Conclusion

77.5k stars is not random. A repo that does one thing, does it well, and solves a real pain point for developers. “Why use many tokens when few do trick” - a simple tagline that anyone can understand, but to implement a tool with a benchmark of 65% savings, with an ecosystem of commit/review/compress/shrink, and with multi-language support - that’s a significant engineering effort behind it.

I’ve been using Caveman for almost 2 months, on Claude Code and Codex. The total savings for me personally is around $8-10/month in output tokens. Not much, but $10/month can buy a hot pot dinner on the weekend. 🦞

And then there’s the feeling. Each time Claude responds with a concise answer like:

Bug: line 42. ctx cancelled before DB query. Move query before select {}.

…I feel like I’m pair programming with a senior dev who is strict but extremely effective. No small talk, no courtesy, just code.

Try it out, it takes 30 seconds to install. If you don’t like it, it takes 30 seconds to uninstall. 🔥


Repo link: github.com/JuliusBrussee/caveman

Genshijin (Japanese version): github.com/InterfaceX/genshijin

Caveman for Claude Code: Claude Code + Caveman setup guide


Has anyone used Caveman in their team? What do you think? Or are there any better alternatives? Comment or DM me. 🪨⛏️

Share :

Related Posts

Trellis: Training wheels for your AI coding agent

Trellis: Training wheels for your AI coding agent

On the first day of Tet, I sat undoing the commit that Claude Code had automatically pushed to main at 2am.

Read More
9Router: A Lifesaver for Devs as AI Coding Becomes Increasingly Expensive

9Router: A Lifesaver for Devs as AI Coding Becomes Increasingly Expensive

9Router: A Lifesaver for Devs as AI Coding Becomes Increasingly Expensive Introduction: Why is the “AI Summer” Making Your Wallet Cry? In recent months, the AI coding community has received some unpleasant news:

Read More
Claude Code has superpowers, but nobody tells you how to unlock them, this plugin does that.

Claude Code has superpowers, but nobody tells you how to unlock them, this plugin does that.

When I first started using Claude Code, I opened the terminal, typed claude, and then… sat staring at the blinking cursor. I knew it had hooks, MCP servers, skills, subagents, plugins - an entire ecosystem of extension points that Anthropic had been heavily promoting. But where to start? Which ones were actually useful for my project? How do I configure them after installation?

Read More