Smarter, cheaper, faster AI responses with caveman token compression.


The Problem: Your AI Talks Too Much

Every time you ask an AI assistant a question, you pay for the words it produces. Most of those words are noise: polite preamble, hedging, filler, restated context you already know. On long coding sessions the cost compounds — and the signal gets buried.

What if the assistant just said what it meant?

The Solution: Caveman Token Compression

opencode-caveman is a plugin for OpenCode that makes the AI respond in terse, caveman-style language. No filler. No fluff. Full technical accuracy.

It is an adaptation of JuliusBrussee/caveman — a wildly popular Claude Code plugin (50k+ stars) built on one philosophy:

Why use many token when few token do trick.

The results are hard to argue with:

  • ~65% output token reduction (ranging 22–87% depending on the task)
  • 100% technical accuracy — the substance is preserved, only the padding is cut

Benefits of Using It

1. Cheaper Bills

Fewer output tokens means lower API costs. On heavy usage — long coding sessions, code reviews, documentation tasks — the savings add up quickly. A 65% reduction is not a rounding error.

2. Faster Responses

Less prose to generate means less latency. The model spends its effort on the answer, not on introducing the answer.

3. Signal Over Noise

Terse responses force clarity. When you cannot bury the point in filler, the point has to be made directly. Code symbols stay exact, error strings stay exact — the compression targets style, not substance.

4. Zero Configuration

Install once. The plugin activates automatically on every session. No manual activation, no per-session ceremony.

5. Style That Persists

The caveman rules are injected into every model turn — not just the first prompt — so the style does not drift mid-session. The mode also survives session compaction (/compact), and persists across sessions via a state file.

6. Flexible Intensity Levels

Not every task wants maximum terseness:

Level Style
lite No filler, full sentences. Professional but tight.
full Drop articles, fragments OK. Classic caveman.
ultra Maximum compression, arrows for causality.

Plus a bonus: wenyan-* levels for a classical-Chinese (文言文) register, and off to return to normal prose.

7. Extra Slash Commands

Beyond communication style, the plugin ships helpful commands:

  • /caveman-commit — terse conventional commit messages for staged changes
  • /caveman-review — one-line code review of the current diff
  • /caveman:compress — shrinks natural-language memory files (like CLAUDE.md) with backup, validation, and restore-on-failure

How It Works

The @mumme-it/opencode-caveman variant uses three enforcement layers:

Layer Mechanism
Always-on rules Injected at session init; survives /clear
Per-turn enforcement Rules injected into every LLM call — the model sees them each turn, no drift
Compaction survival Rules injected into the compaction prompt, so the mode survives /compact

Live mode switching is intercepted before it reaches the model and written to a state file that persists across sessions.

Choosing a Variant

Several opencode-caveman variants exist, and they differ in mechanism, features, and maintenance. Full comparison:

  opencode-caveman caveman-opencode-plugin @mumme-it/opencode-caveman @al-bashkir/opencode-caveman Official caveman (upstream)
Author / source Third-party (npm) Third-party (npm) Third-party, mumme-it (npm) Third-party, al-bashkir (npm) JuliusBrussee/caveman (in-repo plugin)
Install opencode plugin opencode-caveman opencode plugin caveman-opencode-plugin --global add to plugin array in opencode.json add to plugin array in opencode.json node bin/install.js --only opencode
Mechanism Activates caveman on every session Hook-based plugin (session.created + prompt intercept) Rules injected every LLM turn + compaction prompt DCP pattern: self-registers commands via config() hook session.created + tui.prompt.append hooks; AGENTS.md ruleset
Config required None caveman.json (enabled, defaultMode, features) None None Written by installer (AGENTS.md + opencode.json patch)
Default mode full full (from caveman.json) full per /caveman configured at install
Intensity levels lite/full/ultra + wenyan-lite/full/ultra lite/full/ultra + wenyan-lite/full/ultra + off lite/full/ultra lite/full/ultra/wenyan-lite/wenyan/ultra six levels via slash commands
Survives /compact not stated not stated Yes (rules into compaction context) Yes (compaction context hook) partial (flag-file reinforcement)
Mode persists across sessions not stated via caveman.json Yes (.caveman-active file) Yes Yes (.caveman-active file)
Slash commands /caveman, /caveman-commit, /caveman-review /caveman, /caveman-commit, /caveman-review /caveman (+ skill picker) /caveman, /caveman-commit, /caveman-review, /caveman:compress /caveman, /caveman-commit, /caveman-review, /caveman-compress
NL triggers ("talk like caveman") not stated no no yes yes
Memory-file compression no no no yes (/caveman:compress with backup/validate/repair) yes (/caveman-compress)
Extra skills use skill caveman caveman-lite/full/ultra skills skill/agent/command files
Risk notes simplest, least documented persistence config file adds a knob; hook-based most aggressive enforcement (per-turn transform) feature-rich; DCP pattern upstream-maintained; run via official installer

Key trade-offs

  1. Enforcement strength@mumme-it and @al-bashkir inject rules into every model turn and into the /compact prompt, so caveman style survives long sessions. Hook-based variants only reinforce at prompt-time, so style can drift on long, compacted conversations.
  2. Setup frictioncaveman-opencode-plugin needs a caveman.json; the others are zero-config. The official upstream wants its installer script but is the best-maintained path.
  3. Extras — only @al-bashkir and the official upstream ship memory-file compression (CLAUDE.md shrinking); @mumme-it adds pickable intensity skills.
  4. Trust / maintenance — third-party forks can lag opencode API changes (plugin lifecycle hooks evolve); the upstream repo matches current Claude Code/Gemini CLI cadence.

For most users, @mumme-it/opencode-caveman offers the best balance: zero config, per-turn enforcement that survives long compacted sessions, and live mode switching.

Installation

Install globally with one command:

opencode plugin @mumme-it/opencode-caveman -g

That adds the plugin to your opencode.jsonc:

{
  "plugin": ["@mumme-it/opencode-caveman"]
}

Restart OpenCode. Caveman mode is active from the next session — no configuration required.

Switching Modes

/caveman lite      # no filler, full sentences
/caveman full      # classic caveman (default)
/caveman ultra     # maximum compression
stop caveman       # back to normal prose

You can also use the skill picker (ctrl+p → Skills → caveman-*).

Trade-Offs to Consider

Caveman mode is not for every conversation:

  • Loss of context — terse answers assume the reader brings background knowledge. For novices or complex nuanced topics, fuller prose can be more useful.
  • Coding tasks — for quick fixes, reviews, and diffs, terseness is a win. For architectural discussion or teaching, you may want lite or normal mode.
  • Third-party maintenance — forks can lag OpenCode API changes. The upstream caveman repo is the most actively maintained.

The good news: switching levels is a single command. Use full for heavy work, lite for nuanced discussions, off when you want the AI to be verbose.

One Prompt to Rule Them All: Caveman Mode for Any AI CLI

Everything above is the OpenCode-specific route. But caveman-brain output isn't an OpenCode-only itch — if you're bouncing between Claude Code, Gemini CLI, GitHub Copilot CLI, Xiaomi's MiMo Code, or whatever terminal agent you've got open this week, you probably want the same terseness everywhere, not just in one tool.

Here's the shortcut: every one of those tools is itself an agent with file and shell access. Instead of hand-copying a style-mimicry prompt into each tool's memory file, just point the agent at the official repo and let it install itself. One prompt, dropped into whichever CLI you're currently sitting in:

Visit https://github.com/JuliusBrussee/caveman and read the README and
install docs in full before doing anything else.

Then install caveman for yourself, using whatever install path the repo
documents for the AI CLI you're currently running as (check for a
tool-specific flag or section — Claude Code, OpenCode, Gemini CLI, Copilot
CLI, or similar). If the repo ships an installer script, run it. If it only
documents manual steps for your tool, follow them exactly — creating or
editing whatever config, rules, or memory file it specifies.

Once installed:
- Tell me what changed: files created or modified, hooks or rules added.
- Verify it's active by switching to "full" mode and giving me one terse
  test reply.
- Tell me which install path you used, and flag anything the docs left
  ambiguous for this tool.

If the repo does not document support for your specific CLI, stop and tell
me — don't improvise an install method that isn't in the docs.

That last line matters more than it looks. Agentic CLIs are generally happy to guess their way to a working config, and a guessed install (wrong file, wrong hook, half-applied rules) is worse than no install — it's the kind of thing that quietly breaks on the next update and leaves you debugging a "plugin" that was never really installed. Making the agent report its own install path also means you get a paper trail for free: if caveman mode ever misbehaves, you already know which file to go check.

One honest caveat: this only works because the CLI you're running has enough autonomy to fetch a URL, read it, and edit its own config or run a local script. If you're in a locked-down or read-only session, you'll need to do the install manually yourself, straight from the repo's docs.

Verdict

If you live in a terminal and spend long hours in coding sessions, opencode-caveman is a genuine quality-of-life upgrade. Cheaper, faster, and clearer responses — the AI still does all the thinking, it just stops narrating.