What problem does it solve?
Large project memory files like CLAUDE.md, todos, and preferences are reloaded on every AI session, repeatedly consuming input tokens and increasing cost. Caveman-compress shrinks natural language sections into compact caveman-style text while preserving all technical substance so sessions load fewer tokens without losing important information.
Core Features & Use Cases
- Compresses markdown and plain-text memory files to reduce per-session token usage and cost.
- Preserves code blocks, inline code, URLs, file paths, headings, tables, frontmatter, and numeric values exactly.
- Creates a human-readable backup named <filename>.original.md before overwriting, validates output with deterministic checks, retries up to two targeted fixes via Claude, and restores the original on failure.
- Supports Anthropic SDK when ANTHROPIC_API_KEY is present and falls back to the local claude CLI for desktop-authenticated users; enforces a 500KB file limit to avoid unsafe processing.
- Use cases: speed up agent startup, cut recurring token bills for long-running projects, and maintain compact yet accurate project memories.
Quick Start
Run the caveman compression on your project memory file by issuing the agent command /caveman:compress CLAUDE.md