caveman-compress

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

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/marketiv-id/marketiv-web --skill caveman-compress-marketiv-id
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: caveman-compress
Source: https://github.com/marketiv-id/marketiv-web/tree/main/.qwen/skills/caveman-compress
Command: npx skills add https://github.com/marketiv-id/marketiv-web --skill caveman-compress-marketiv-id

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-style 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 words, hedging, and redundant phrasing while keeping meaning intact. - Strict Preservation Rules: Code blocks, inline code, URLs, file paths, commands, headings, and YAML frontmatter are preserved exactly and verified by automated validation. - Safe Backup & Retry Workflow: The original file is backed up as FILE.original.md outside the source tree, validation failures trigger targeted fixes with up to 2 retries, and the original is restored if compression fails. - Use Case: A developer with a 1000-token CLAUDE.md runs the skill once, and every subsequent session loads the compressed version, saving hundreds of tokens per session permanently. ## 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, or execute python3 -m scripts <filepath> from the skill directory. The compressed version overwrites the original, and a human-readable backup is saved as FILE.original.md.

What file types can be compressed with caveman-compress?

Natural language files with .md, .txt, .markdown, .rst, .typ, .typst, and .tex extensions are compressible, along with extensionless prose files. Code and config files like .py, .js, .json, and .yaml are automatically skipped.

Does compression preserve code blocks and URLs?

Yes. Code blocks, inline code, URLs, file paths, commands, headings, and YAML frontmatter are preserved exactly. An automated validator compares the original and compressed versions and triggers targeted fixes if anything is lost.

What happens if compression fails validation?

The skill sends only the specific validation errors back to Claude for targeted fixes, retrying up to 2 times without recompressing. If it still fails, the original file is restored and the backup is removed.

Can I compress files containing credentials or secrets?

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