Skip to content

Caveman Compress

Shrinks memory files like CLAUDE.md into terse caveman-style text to cut input tokens.

Stars
116,835
Licence
Apache-2.0
Files
8 files

What it does

Once installed, when you ask the agent to compress a memory or notes file (such as CLAUDE.md or a todo list), it runs a bundled Python script that rewrites the prose in a terse 'caveman' style with articles, filler and hedging removed, while keeping code, commands, URLs, paths and version numbers exactly as written. The original is saved to a backup folder outside the project, and the compressed file overwrites the original, which is validated and retried if it breaks. Note that the file's text is sent to an AI model provider (the claude CLI, the Anthropic API, or an OpenAI-compatible endpoint) to do the rewriting.

Great for

  • Developers with long CLAUDE.md or memory files who want to lower the tokens loaded into each session
  • Users who understand and accept that the file content is sent to their configured model provider

Skip it if

  • Files containing secrets, credentials or private data you would not share with the model provider, since the content is sent over the network
  • Anyone needing a readable, polished document, because the output is deliberately terse and the original file is overwritten

Try asking

  • “/caveman-compress ./CLAUDE.md”
  • “Compress my todo list at /home/me/notes/todo.md into caveman format”
  • “Shrink my preferences file ~/memory/preferences.txt to save tokens”
Step-by-step guide: how to use Caveman CompressInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 8 original files, the Apache-2.0 licence and an attribution note.

    caveman-compress.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip caveman-compress.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip caveman-compress.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Pass an explicit absolute filepath; the skill refuses to guess from pasted text
  • Keep a copy of important files under version control before compressing, since the original is overwritten (a backup is also kept outside the project)
  • Review the compressed output for lost nuance before relying on it

What's inside

  • scripts/__init__.py
  • scripts/__main__.py
  • scripts/benchmark.py
  • scripts/cli.py
  • scripts/compress.py
  • scripts/detect.py
  • scripts/validate.py
  • SKILL.md

Redistributed unmodified from JuliusBrussee/caveman under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.