MCPcopy Create free account
hub / github.com/JuliusBrussee/caveman

github.com/JuliusBrussee/caveman

Chat with this repo
repository ↗ · DeepWiki ↗ · release bin-v1.1.7 ↗ · + Follow · compare 15 versions
10,418 symbols 42,986 edges 1,042 files ⚖ MIT 2,370 documented · 23% updated todayv2.7.0 · 2026-09-15★ 105,61960 open issues

Browse by type

Functions 9,380 Types & classes 1,035 Endpoints 3
What it actually does AI analysis from the code graph
loading…
README

Caveman

why use many token when few do trick

Your AI coding agent bills by the word and writes like it knows that.

Caveman make it stop. Brain still big. Mouth small. Bill small.

Caveman - why use many token when few do trick | Product Hunt JuliusBrussee%2Fcaveman | Trendshift

Stars 30+ agents 10 native wrap profiles License

See it · Install · Numbers · Skill · Proxy · Wrap · Docs · Privacy · License


See it

🗣️ Normal agent · 69 tokens Caveman agent · 19 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. > New object ref each render. Inline object prop = new ref = re-render. Wrap in `useMemo`.

Same diagnosis. Same fix. Same useMemo. The only thing that died was the throat-clearing.

Code, commands, file paths, and exact error messages never get cavemanned. Only the prose around them does.

Caveman no make brain smaller. Caveman make mouth smaller.

Install

Caveman come in two sizes.

Small rock: the skill. A rule file that makes your agent answer in caveman. MIT, free forever, works in 30+ agents (Claude Code, Codex, Gemini, Cursor, Windsurf, Cline, Copilot, more). One command:

npx skills add JuliusBrussee/caveman -g

Type /caveman if your agent doesn't wake up on its own. That the whole install. One rock.

Big rock: the proxy. Runs on your machine, between your agent and the AI provider, and shrinks what the agent reads before every call. Everything it squeezes gets a backup on your disk, so the agent can always pull the original back. MIT CLI, BSL-1.1 runtime:

npm install -g @caveman-ai/cli && caveman setup --install
caveman claude        # or codex · gemini · aider · kilo · qwen · opencode · hermes · openclaw · pi

They stack. Most people start with the small rock and graduate.

More doors into the cave · full installer, Windows, single agents, uninstall

The full installer wires up Claude Code hooks and the statusline badge, finds every supported agent on your machine, and skips agents you no have. Safe to re-run. Needs Node.js 22.13+.

curl -fsSL https://raw.githubusercontent.com/JuliusBrussee/caveman/v2.6.0/install.sh | bash

Windows, PowerShell 5.1+:

irm https://raw.githubusercontent.com/JuliusBrussee/caveman/v2.6.0/install.ps1 | iex

Just one agent:

# Claude Code
claude plugin marketplace add JuliusBrussee/caveman && claude plugin install caveman@caveman

# Gemini CLI
gemini extensions install https://github.com/JuliusBrussee/caveman

# Qwen Code CLI, then its Caveman wrapper
npm i -g @qwen-code/qwen-code
caveman qwen

# Codex, Cursor, Windsurf, Cline, and other skills-compatible agents
npx skills add JuliusBrussee/caveman --skill '*' -a codex --yes -g  # replace codex with your agent profile

Install broke? Open your agent in this repo and say: "Read CLAUDE.md and INSTALL.md, install caveman for me." Agent read repo, agent fix own brain. Snake eat tail.

Changed your mind: npx -y github:JuliusBrussee/caveman -- --uninstall

The full 30+ agent matrix, dry runs, flags, and verification live in INSTALL.md.

The numbers

A token is what AI billing counts, roughly three quarters of a word. Your agent pays for every token it writes and every token it reads. Reading is usually the bigger bill. The skill cuts the writing. The proxy cuts the reading.

Skill: writing less

The skill asks for shorter prose. A general output-reduction percentage is not currently supported by reviewed raw results from the API benchmark in this repository. The older ten-prompt table and its fixed 65% claim have been retired.

No reviewed API benchmark result is published here yet. Run uv run python benchmarks/run.py to generate a new result, then review its raw response pairs and quality before publishing the generated table.

A separate committed evaluation snapshot compares skill output with a plain Answer concisely. control. It measures approximate output length, not correctness, billing, or performance of the current skill. Its model, date, tokenizer, and limits are recorded alongside it.

The rules add input tokens; their cost depends on which rules the host loads, when it injects them, and caching. Shorter output alone does not establish net savings. /caveman-stats reports recorded usage with savings unknown. Full accounting and workload limitations: docs/HONEST-NUMBERS.md.

Proxy: reading less

Your agent rereads logs, test output, diffs, and half your repo all day. The proxy shrinks that stream before it reaches the provider. Pinned 54-run Claude Code benchmark, provider-reported input tokens, three runs per case:

Case Direct Claude Code Through caveman Change
CSV outlier hunt 165,823 74,484 -55.1%
Log needle in haystack 148,807 74,068 -50.2%
YAML config drift 132,124 71,027 -46.2%
Test output failure 150,377 108,514 -27.8%
Deployment JSON drift 147,975 108,939 -26.4%
Dashboard HTML alert 140,687 154,641 +9.9%
Total 885,793 591,673 -33.2%

All 18 of 18 fixture answer checks passed. This does not establish quality on other tasks. These are pinned reported results; the raw harness and run artifacts are not in this checkout. Method, confidence intervals, and limits: docs/WRAP-BENCHMARK.md.

Maintainer note. The HTML row is red and it stays red. That case had no compression transform, so caveman paid its own overhead and won nothing back. The day I hide a red row is the day you should stop trusting the green ones.

Browsing too: a focused question against a 200-row table costs 121 tokens through caveman's view of the page, against 15,704 for the Playwright ARIA baseline. That's 129.8× smaller (browse/BENCHMARK.md).

The skill, unpacked

One rule file, one talking style, plus a small toolbox. /caveman lite|full|ultra|wenyan-lite|wenyan-full|wenyan-ultra sets intensity. /caveman off or normal mode turns it off.

Everything in the box · commit messages, reviews, subagents, work patterns

Tool / command What you get
/caveman [lite\|full\|ultra\|wenyan-lite\|wenyan-full\|wenyan-ultra\|off] Shorter replies at the intensity you choose.
cavecrew-investigator, cavecrew-builder, cavecrew-reviewer Compressed subagent presets for locating, editing, and reviewing code.
/caveman-commit Terse Conventional Commit messages.
/caveman-review One-line, actionable review findings.
/caveman-compress <file> Smaller Markdown memory files, with the original backed up.
/caveman-stats Recorded Claude Code token usage; savings unknown without a measured comparison.
/caveman-help One-screen reminder of every mode and command.
investigate-first, lean-build, surgical-patch, safe-refactor, migration, verify-and-stop Work patterns that write less code, so the agent bills fewer tokens. Your agent picks these up on its own when a task fits.
/caveman-setup, /caveman-discover, /caveman-learn, /caveman-manage, /caveman-optimize, /caveman-explore, /caveman-evidence-review Drive the caveman engine and proxy: set it up, find where tokens go, act on what it finds.

The proxy, unpacked

One local process. Your agent talks to it, it talks to your provider. No Caveman server in the path, and your Claude Pro/Max login passes through to Anthropic untouched. Originals of everything it compresses sit in a SQLite file on your machine with a recovery handle, so the agent can always ask for the full version back.

Whole team? One container. Same proxy in your VPC, one shared token, keys stay on server. Deploy it →

Terminal demo: caveman compress reads a large JSON payload and emits a much smaller compressed version, byte-exact recoverable

What the engine keeps, by payload type · and the wrap stack diagram

coding agent talks to a local caveman proxy that forwards upstream to the provider with auth passed through byte-exact; a CCR store below the proxy keeps the original bytes and returns a recovery handle to the agent; an MCP toolkit side-channel gives the agent caveman_retrieve, toon encode/decode, and browse

detect() types each payload and routes it to a compressor that keeps what answers depend on:

Detected type Keeps Target savings
json keys, structure, error/message subtrees; collapses repetitive arrays 70-90%
log errors, stack traces, first/last lines; drops INFO and progress noise 85-95%
code imports, signatures, types; elides function bodies, syntax stays valid 40-70%
diff file/hunk headers and changed lines; elides repeated context 60-80%
search-result top/bottom hits plus diagnostic/security hits 80-95%

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 7,721
Method 1,659
Struct 625
Class 202
Interface 178
TypeAlias 21
FuncType 9
Route 3

Languages

Go55%
TypeScript32%
Python13%

Modules by API surface

packages/cli/src/index.ts928 symbols
packages/sdk/python/caveman_cloud/core.py162 symbols
packages/agent/src/runtime.ts161 symbols
packages/sdk/typescript/src/index.ts133 symbols
proxy/providers/adapter.go97 symbols
packages/middleware/python/caveman_middleware/llama_index.py97 symbols
packages/sdk/python/tests/test_runtime_policy.py70 symbols
engine/pixel/transform_anthropic.go65 symbols
packages/agent/src/budget.ts64 symbols
proxy/internal/store/learn.go59 symbols
proxy/internal/nativeruntime/runtime.go55 symbols
bin/install.js52 symbols

Dependencies from manifests, versioned

github.com/chromedp/cdprotov0.0.0-2026032100182 · 1×
github.com/chromedp/sysutilv1.1.0 · 1×
github.com/go-json-experiment/jsonv0.0.0-2026021400441 · 1×
github.com/gobwas/poolv0.2.1 · 1×

Datastores touched

caveDatabase · 1 repos
appDatabase · 1 repos
mydbDatabase · 1 repos

For agents

$ claude mcp add caveman \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page