caveman-compress

Compress natural-language memory files like CLAUDE.md into shorter Markdown-preserving format.

Updated Feb 12, 2021
One-click install
npx skills add https://github.com/echowaves/WiSaw.cdk --skill caveman-compress-echowaves
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: caveman-compress
Source: https://github.com/echowaves/WiSaw.cdk/tree/main/.agents/skills/caveman-compress
Command: npx skills add https://github.com/echowaves/WiSaw.cdk --skill caveman-compress-echowaves

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Compressing Claude project memory files like CLAUDE.md and todos can become expensive because large inputs are loaded every session start, increasing token usage and slowing each interaction.

Core Features & Use Cases

  • Token-saving memory compression: Converts natural-language memory files into a shorter “caveman” style while preserving meaning.
  • Structure-safe validation: Checks that headings, code blocks, URLs, and file paths remain correct and retries with targeted fixes when validation fails.
  • Data safety via backups: Overwrites the original compressed file only after creating a human-editable backup at FILE.original.md.
  • Security guardrails: Refuses to compress files likely to contain secrets or credentials based on filename and path heuristics.

Quick Start

Run the caveman-compress skill to compress CLAUDE.md by issuing /caveman:compress CLAUDE.md.

Frequently Asked Questions about caveman-compress

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce token costs for Claude memory files loaded every session?

Compressing markdown memory files like CLAUDE.md into a caveman format reduces token costs by shortening natural-language text. The tool preserves meaning while cutting repeated session context tokens loaded at startup.

Does markdown compression preserve code blocks, URLs, and file paths?

Markdown compression preserves headings, code blocks, URLs, and file paths through structure-safe validation. It verifies exact-structure preservation constraints and retries with targeted fixes when validation fails.

What is the best way to compress CLAUDE.md without losing project preferences?

Compressing CLAUDE.md into caveman format retains essential meaning while creating a human-editable backup at FILE.original.md before overwriting. This ensures project preferences are preserved safely during token reduction.

Can I use caveman-compress on files containing secrets or credentials?

You should not compress files containing secrets or credentials. Security guardrails refuse to process files likely to contain sensitive data based on filename and path heuristics to prevent accidental exposure.

How do I restore the original markdown file after compression?

To restore the original markdown file after compression, retrieve the FILE.original.md backup. The tool creates this human-editable backup before overwriting the original file with the compressed caveman format.