
Compress
Shrink bloated CLAUDE.md, todos, and preference files into caveman format to cut agent input tokens without dropping technical substance.
Overview
Compress is a journey-wide agent skill that shrinks natural-language agent memory files into caveman format—usable whenever a solo builder needs to cut input tokens before committing to long agent sessions.
Install
npx skills add https://github.com/juliusbrussee/caveman --skill compressWhat is this skill?
- Overwrites originals with compressed caveman text; saves human-readable backup as FILE.original.md
- Python CLI: detect type, compress via Claude, validate, cherry-pick fixes, up to 2 retries
- Preserves code, URLs, and structure while stripping articles, filler, and hedging
- Trigger via /caveman:compress FILEPATH or natural-language compress memory file
- Leaves source untouched if validation fails after retries
- Up to 2 validation retries before leaving the original untouched
- Human-readable backup saved as filename.original.md
Adoption & trust: 46.2k installs on skills.sh; 70k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your CLAUDE.md and memory files balloon with polite prose and hedging, wasting input tokens on every agent turn.
Who is it for?
Builders running daily agent workflows with large CLAUDE.md, todos, or preference files who want automatic lossless-style compression.
Skip if: Replacing thoughtful curation of rules you should delete, or compressing non-memory source code and config where caveman rules do not apply.
When should I use this skill?
/caveman:compress FILEPATH or when the user asks to compress a memory file.
What do I get? / Deliverables
You get a denser memory file in place of the original plus a .original.md backup, with validation and limited auto-retry before the source is left unchanged on failure.
- Compressed memory file overwriting the original
- FILE.original.md backup
- CLI validation result reported to the user
Recommended Skills
Journey fit
Useful at every journey phase - explore requirements and options before committing to a direction.
Where it fits
Compress an overgrown CLAUDE.md before a multi-hour implementation session with your coding agent.
Trim verbose ship checklists in memory so review and test agents ingest less context per run.
Re-compress updated preference files after each release when new rules stack on old prose.
Shrink long content-workflow notes in agent memory before batch SEO or lifecycle tasks.
How it compares
Token-shaving skill for agent memory files, not a generic summarizer or documentation formatter.
Common Questions / FAQ
Who is compress for?
Solo and indie builders using Claude Code-style memory files who need lower input-token burn without losing technical content.
When should I use compress?
Use before heavy Build or Ship agent runs when CLAUDE.md grew verbose; during Operate when iterating context; or anytime you trigger /caveman:compress on a memory file path.
Is compress safe to install?
It runs shell and filesystem writes on paths you specify; check the Security Audits panel on this page and review the scripts package before letting an agent overwrite project memory.
SKILL.md
READMESKILL.md - Compress
# Caveman Compress ## Purpose Compress natural language files (CLAUDE.md, todos, preferences) into caveman-speak to reduce input tokens. Compressed version overwrites original. Human-readable backup saved as `<filename>.original.md`. ## Trigger `/caveman:compress <filepath>` or when user asks to compress a memory file. ## Process 1. This SKILL.md lives alongside `scripts/` in the same directory. Find that directory. 2. Run: cd <directory_containing_this_SKILL.md> && python3 -m scripts <absolute_filepath> 3. The CLI will: - detect file type (no tokens) - call Claude to compress - validate output (no tokens) - if errors: cherry-pick fix with Claude (targeted fixes only, no recompression) - retry up to 2 times - if still failing after 2 retries: report error to user, leave original file untouched 4. Return result to user ## Compression Rules ### Remove - Articles: a, an, the - Filler: just, really, basically, actually, simply, essentially, generally - Pleasantries: "sure", "certainly", "of course", "happy to", "I'd recommend" - Hedging: "it might be worth", "you could consider", "it would be good to" - Redundant phrasing: "in order to" → "to", "make sure to" → "ensure", "the reason is because" → "because" - Connective fluff: "however", "furthermore", "additionally", "in addition" ### Preserve EXACTLY (never modify) - Code blocks (fenced ``` and indented) - Inline code (`backtick content`) - URLs and links (full URLs, markdown links) - File paths (`/src/components/...`, `./config.yaml`) - Commands (`npm install`, `git commit`, `docker build`) - Technical terms (library names, API names, protocols, algorithms) - Proper nouns (project names, people, companies) - Dates, version numbers, numeric values - Environment variables (`$HOME`, `NODE_ENV`) ### Preserve Structure - All markdown headings (keep exact heading text, compress body below) - Bullet point hierarchy (keep nesting level) - Numbered lists (keep numbering) - Tables (compress cell text, keep structure) - Frontmatter/YAML headers in markdown files ### Compress - Use short synonyms: "big" not "extensive", "fix" not "implement a solution for", "use" not "utilize" - Fragments OK: "Run tests before commit" not "You should always run tests before committing" - Drop "you should", "make sure to", "remember to" — just state the action - Merge redundant bullets that say the same thing differently - Keep one example where multiple examples show the same pattern CRITICAL RULE: Anything inside ``` ... ``` must be copied EXACTLY. Do not: - remove comments - remove spacing - reorder lines - shorten commands - simplify anything Inline code (`...`) must be preserved EXACTLY. Do not modify anything inside backticks. If file contains code blocks: - Treat code blocks as read-only regions - Only compress text outside them - Do not merge sections around code ## Pattern Original: > You should always make sure to run the test suite before pushing any changes to the main branch. This is important because it helps catch bugs early and prevents broken builds from being deployed to production. Compressed: > Run tests before push to main. Catch bugs early, prevent broken prod deploys. Original: > The application uses a microservices architecture with the following components. The API gateway handles all incoming requests and routes them to the appropriate service. The authentication service is responsible for managing user sessions and JWT tokens. Compressed: > Microservices architecture. API gateway route all requests to services. Auth service manage user sessions + JWT tokens. ## Boundaries - ONLY com