caveman-compress
Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md. Trigger: /caveman:compress <filepath> or "compress memory file"
Best use case
caveman-compress is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md. Trigger: /caveman:compress <filepath> or "compress memory file"
Teams using caveman-compress should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/caveman-compress/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How caveman-compress Compares
| Feature / Agent | caveman-compress | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md. Trigger: /caveman:compress <filepath> or "compress memory file"
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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 `<filename>.original.md`. ## Trigger `/caveman:compress <filepath>` or when user asks to compress a memory file. ## Process 1. The compression scripts live in `caveman-compress/scripts/` (adjacent to this SKILL.md). If the path is not immediately available, search for `caveman-compress/scripts/__main__.py`. 2. Run: cd caveman-compress && python3 -m scripts <absolute_filepath> 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 to run the test suite before pushing any changes to the main branch. This is important because it helps catch bugs early and prevents broken builds from being deployed to production. Compressed: > Run tests before push to main. Catch bugs early, prevent broken prod deploys. Original: > The application uses a microservices architecture with the following components. The API gateway handles all incoming requests and routes them to the appropriate service. The authentication service is responsible for managing user sessions and JWT tokens. Compressed: > Microservices architecture. API gateway route all requests to services. Auth service manage user sessions + JWT tokens. ## Boundaries - ONLY compress natural language files (.md, .txt, extensionless) - NEVER modify: .py, .js, .ts, .json, .yaml, .yml, .toml, .env, .lock, .css, .html, .xml, .sql, .sh - If file has mixed content (prose + code), compress ONLY the prose sections - If unsure whether something is code or prose, leave it unchanged - Original file is backed up as FILE.original.md before overwriting - Never compress FILE.original.md (skip it)
Related Skills
caveman
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
caveman-review
Ultra-compressed code review comments. Cuts noise from PR feedback while preserving the actionable signal. Each comment is one line: location, problem, fix. Use when user says "review this PR", "code review", "review the diff", "/review", or invokes /caveman-review. Auto-triggers when reviewing pull requests.
caveman-help
Quick-reference card for all caveman modes, skills, and commands. One-shot display, not a persistent mode. Trigger: /caveman-help, "caveman help", "what caveman commands", "how do I use caveman".
caveman-commit
Ultra-compressed commit message generator. Cuts noise from commit messages while preserving intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why" isn't obvious. Use when user says "write a commit", "commit message", "generate commit", "/commit", or invokes /caveman-commit. Auto-triggers when staging changes.
baoyu-compress-image
Cross-platform image compression skill. Converts images to WebP by default with PNG-to-PNG support. Uses system tools (sips, cwebp, ImageMagick) with Sharp fallback.
context-compression
This skill should be used when the user asks to "compress context", "summarize conversation history", "implement compaction", "reduce token usage", or mentions context compression, structured summarization, tokens-per-task optimization, or long-running agent sessions exceeding context limits.
azure-quotas
Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: "check quotas", "service limits", "current usage", "request quota increase", "quota exceeded", "validate capacity", "regional availability", "provisioning limits", "vCPU limit", "how many vCPUs available in my subscription".
raindrop-io
Manage Raindrop.io bookmarks with AI assistance. Save and organize bookmarks, search your collection, manage reading lists, and organize research materials. Use when working with bookmarks, web research, reading lists, or when user mentions Raindrop.io.
zlibrary-to-notebooklm
自动从 Z-Library 下载书籍并上传到 Google NotebookLM。支持 PDF/EPUB 格式,自动转换,一键创建知识库。
discover-skills
当你发现当前可用的技能都不够合适(或用户明确要求你寻找技能)时使用。本技能会基于任务目标和约束,给出一份精简的候选技能清单,帮助你选出最适配当前任务的技能。
web-performance-seo
Fix PageSpeed Insights/Lighthouse accessibility "!" errors caused by contrast audit failures (CSS filters, OKLCH/OKLAB, low opacity, gradient text, image backgrounds). Use for accessibility-driven SEO/performance debugging and remediation.
project-to-obsidian
将代码项目转换为 Obsidian 知识库。当用户提到 obsidian、项目文档、知识库、分析项目、转换项目 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入规则(默认到 00_Inbox/AI/、追加式、统一 Schema) 3. 执行 STEP 0: 使用 AskUserQuestion 询问用户确认 4. 用户确认后才开始 STEP 1 项目扫描 5. 严格按 STEP 0 → 1 → 2 → 3 → 4 顺序执行 【禁止行为】: - 禁止不读 SKILL.md 就开始分析项目 - 禁止跳过 STEP 0 用户确认 - 禁止直接在 30_Resources 创建(先到 00_Inbox/AI/) - 禁止自作主张决定输出位置