Illustration of what caveman does: Makes coding agents answer tersely and shrinks the logs and output they read
AI-generated illustration

JuliusBrussee /

caveman

Makes coding agents answer tersely and shrinks the logs and output they read

AI coding agents are billed by the token. They write long, polite answers and read huge logs, test output and diffs. Caveman goes after both sides. The skill is a rule file that tells the agent to drop the filler and answer in short, caveman-style prose. Code, commands, file paths and error messages are left alone, and security warnings come back in full sentences.

The proxy runs on your machine between the agent and the AI provider. It compresses logs, JSON, test output and diffs before the model sees them, and keeps a backup of every original so the agent can fetch it back. A middleware package does the same inside your own app, wrapping LangChain, Vercel AI SDK, OpenAI or Anthropic calls.

The README is frank about the numbers. A JetBrains test of the skill alone on 86 coding tasks found about 8.5% fewer output tokens with no detectable quality change. The repo's own eval shows only about 3% on top of a plain 'answer concisely' instruction, and 35% at the ultracave level. The authors say most of an agent's bill is reading, which is why the proxy exists.

What it does

  • Skill for shorter answers

    One rule file makes the agent drop preamble and talk tersely. The README says it works in 30+ agents, including Claude Code, Codex, Gemini, Cursor and Cline. Say 'stop caveman' to return to normal prose.

  • Proxy that shrinks what agents read

    A local proxy compresses logs, test output, JSON and diffs before each call. Originals stay on disk so the agent can pull them back. You wrap an agent with a command like caveman claude.

  • Spend analysis

    caveman learn reads agent history already on your disk and ranks where your tokens go, with a one-line fix for each. caveman trial runs a session with and without caveman so you can compare.

  • Small helper commands

    /caveman-commit writes a one-line Conventional Commit. /caveman-review gives one finding per line. /caveman-compress shrinks memory files like CLAUDE.md and backs up the original.

  • Middleware for your own app

    npm and Python packages wrap a model call you already make. Tool results are shrunk before the model sees them, and the model can fetch the original.

What you could build

  • Install the skill to get shorter answers from Claude Code or Codex.
  • Wrap an agent with the proxy so long test output and logs cost fewer tokens.
  • Find out which habits in your agent history use the most tokens.
  • Add the middleware to a LangChain or Vercel AI SDK app to shrink tool results.
  • Run an A/B trial to measure whether it saves tokens on your own work.

Get started

Start with the skill: run the one command, then ask your agent a coding question, or type /caveman if it doesn't switch on by itself. If you want to shrink what the agent reads too, install the CLI and wrap your agent.

npx skills add JuliusBrussee/caveman -g
npm install -g @caveman-ai/cli && caveman setup --install
caveman claude

Commands are copied from the project's README. Read it on GitHub for the full setup.

More in Token & cost savings

    ↑↓ to move, Enter to open, Esc to close