JavaScript is disabled. Some features may not work.
caveman-compress — ★ 76.2K GitHub Stars — Install Guide | SkillsNav
🇺🇸 English🇨🇳 中文
SkillsNav
Home

caveman-compress

★ 76K repogenerationN/AIntermediateClaude
🤖 AI Summary

Compresses natural language files (like CLAUDE.md or preferences) into caveman-speak to reduce token count, overwriting the original while saving a human-readable backup as `.original.md`. Triggered via `/caveman-compress ` or by user request, it runs `python3 -m scripts ` from the skill's directory, auto-detects file type, uses Claude for compression and validation, and performs targeted error fixes with up to 2 retries.

How to Install

Claude Code:
git clone --depth 1 https://github.com/JuliusBrussee/caveman.git && cp caveman/skills/caveman-compress ~/.claude/skills/caveman-compress -r
# 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 `.original.md`. ## Trigger `/caveman-compress ` or when user asks to compress a memory file. ## Process 1. The compression scripts live in `scripts/` (adjacent to this SKILL.md). If the path is not immediately available, search for `scripts/__main__.py` next to this SKILL.md. 2. From the directory containing this SKILL.md, run: python3 -m scripts 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 t

Details

Category Coding → generation
SourceJuliusBrussee/caveman
SKILL.mdView on GitHub →
Repo Stars★ 76.2K
Est. per Skill~10.9K (shared across 7 skills from this repo)
DifficultyIntermediate
Risk LevelN/A

Related Skills

Works Well With

Skills from the same repository — often designed to work together