caveman-compress

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

1|Updated Jun 6, 2026
One-click install
npx skills add https://github.com/karuhun-developer/ecommerce --skill caveman-compress-karuhun-developer
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: caveman-compress
Source: https://github.com/karuhun-developer/ecommerce/tree/main/.ai/skills/caveman-compress
Command: npx skills add https://github.com/karuhun-developer/ecommerce --skill caveman-compress-karuhun-developer

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Large project memory files like CLAUDE.md, todos, and preference notes are loaded into context on every session, consuming input tokens repeatedly. This Skill compresses those natural language files into a terse caveman format 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 words, hedging, and redundant phrasing while keeping meaning intact. - Strict preservation rules: Code blocks, inline code, URLs, file paths, commands, headings, and version numbers are preserved exactly and validated automatically. - Safe backup workflow: The original file is saved as FILE.original.md before overwriting, and the original is restored automatically if validation fails after retries. - Use Case: Run it on a 1000-token CLAUDE.md once, and every subsequent session loads the compressed version, saving hundreds of tokens per session permanently. ## Quick Start Ask the AI to compress your CLAUDE.md memory file into caveman format using the caveman-compress skill.

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 the command /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 be compressed with caveman-compress?▼

Compressible files are natural language formats: .md, .txt, .markdown, .rst, and extensionless prose files. Code and config files like .py, .js, .json, .yaml, and .html are automatically detected and skipped.

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 versions and triggers targeted fixes if any of these elements are altered.

What happens if compression validation fails?▼

The skill retries with targeted fixes up to two times, patching only the reported errors without recompressing. If validation still fails, the original file content is restored and the backup is removed, so no data is lost.

Can I recover the original file after compression?▼

Yes, the original is always saved alongside as FILE.original.md before any overwriting happens. You can read or edit that backup at any time and re-run the compression after making edits.

Why is caveman-compress flagged as high risk by Snyk?▼

The rating comes from static analysis detecting subprocess usage and file I/O. The subprocess call uses a fixed argument list with no shell interpolation, and the skill only reads and writes the user-specified file path, making it a false positive.