caveman-compress

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

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/kaitoartz/dotfiles --skill caveman-compress-kaitoartz
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: caveman-compress
Source: https://github.com/kaitoartz/dotfiles/tree/main/dot_gemini/config/skills/caveman-compress
Command: npx skills add https://github.com/kaitoartz/dotfiles --skill caveman-compress-kaitoartz

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 preferences load on every AI session start, and large files consume input tokens repeatedly. This Skill compresses those natural language files into a terse caveman format, cutting token usage by roughly 46% on average while preserving all technical substance. ## Core Features & Use Cases - Token-reducing compression: Rewrites prose by removing articles, filler, hedging, and redundant phrasing while keeping meaning intact. - Strict preservation rules: Code blocks, inline code, URLs, file paths, commands, headings, and technical terms are preserved exactly, with automated validation and targeted retry fixes. - Safe backup workflow: The original file is saved as FILE.original.md before the compressed version overwrites it, and compression aborts if a backup already exists. - Use Case: Run the skill on a 700-token CLAUDE.md preferences file to shrink it to about 285 tokens, so every subsequent session loads fewer tokens automatically. ## Quick Start Ask the AI to run /caveman:compress on your CLAUDE.md file to compress it and create 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, such as /caveman:compress CLAUDE.md. The skill compresses the prose, validates the output, writes the compressed version to the original path, and saves a human-readable backup as CLAUDE.original.md.

What file types can caveman-compress handle?▼

It compresses natural language files with .md, .txt, .markdown, and .rst extensions, plus extensionless prose files. Code and config files like .py, .js, .json, and .yaml are detected and skipped, as are .original.md backup files.

Does compression preserve code blocks and URLs?▼

Yes, code blocks, inline backtick code, URLs, file paths, commands, and headings are preserved exactly. A validation step compares the original and compressed output, and any mismatch triggers a targeted fix retry up to two times.

What happens if compression validation fails?▼

The skill sends only the specific validation errors back to Claude for a targeted fix without recompressing the whole file. If it still fails after two retries, the original file is restored and the backup is removed.

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 content to the Anthropic API. Files over 500KB are also rejected before any API call.

How do I edit the file after it has been compressed?▼

Edit the human-readable FILE.original.md backup, then run the compress command again to regenerate the compressed version. The skill aborts if a backup already exists, so remove or rename the old backup first.