caveman-compress

Compress natural language memory files into terse caveman format to reduce input tokens.

Updated Sep 19, 2026
One-click install
npx skills add https://github.com/Ab0umar/selrs.cc.BU --skill caveman-compress-ab0umar
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: caveman-compress
Source: https://github.com/Ab0umar/selrs.cc.BU/tree/main/.agents/skills/caveman-compress
Command: npx skills add https://github.com/Ab0umar/selrs.cc.BU --skill caveman-compress-ab0umar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires anthropic, tiktoken, and includes scripts (resource) components.

What problem does it solve? Project memory files like CLAUDE.md, todos, and preference notes are loaded into context on every session, and large files waste input tokens repeatedly. This Skill compresses those natural language files into a terse caveman style while preserving all technical substance, cutting token usage by roughly 46% on average. ## Core Features & Use Cases - Token-reducing compression: Rewrites prose by removing articles, filler, hedging, and redundant phrasing while keeping meaning intact. - Structure preservation: Keeps code blocks, inline code, URLs, file paths, commands, headings, tables, and YAML frontmatter exactly as written, verified by an automated validation pass. - Safe backup and retry workflow: Saves the original as FILE.original.md in an out-of-tree backup directory, validates the compressed output, applies targeted fixes instead of recompressing, and restores the original if validation fails after retries. - Use Case: A developer with a 1000-token CLAUDE.md runs the compression once, and every subsequent session loads the compressed version, saving hundreds of tokens per session while keeping all coding rules intact. ## Quick Start Ask the AI to run /caveman-compress on your CLAUDE.md file to produce a compressed version with a human-readable backup.

Frequently Asked Questions about caveman-compress

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compress a CLAUDE.md file to save tokens?▼

Run /caveman-compress followed by the file path, or invoke the CLI with python3 -m scripts <filepath>. The skill compresses the prose, validates the output, writes the compressed version in place, and saves the original as FILE.original.md in a backup directory.

What file types can be compressed with caveman-compress?▼

Natural language files are supported: .md, .txt, .markdown, .rst, .typ, .typst, .tex, and extensionless prose files. Code and config files like .py, .js, .ts, .json, .yaml, and .env are detected and skipped automatically.

Does compression preserve code blocks and URLs?▼

Yes. Fenced code blocks, inline backtick code, URLs, file paths, commands, headings, and YAML frontmatter are preserved exactly. A validation step compares the original and compressed output and triggers targeted fixes if anything was altered.

What happens if compression validation fails?▼

The skill sends only the listed validation errors back to Claude for a targeted fix, without recompressing the whole file. After two failed retries it restores the original file and deletes the backup, leaving your content untouched.

Can I compress files containing secrets or credentials?▼

No. The skill refuses files whose names or paths suggest secrets, credentials, keys, or private directories like .ssh or .aws, because compression sends file contents to the Anthropic API. Files over 500KB are also rejected.

Where is the original file backup stored?▼

Backups are stored outside the source directory in a platform-aware location: %LOCALAPPDATA%\caveman-compress\backups on Windows, or $XDG_DATA_HOME/caveman-compress/backups (defaulting to ~/.local/share) elsewhere, so auto-loaders do not re-ingest them.