compress

Compress natural language memory files into caveman format while preserving structure.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/wukangcheng2944/claude-skills --skill compress-wukangcheng2944
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compress
Source: https://github.com/wukangcheng2944/claude-skills/tree/main/caveman-compress
Command: npx skills add https://github.com/wukangcheng2944/claude-skills --skill compress-wukangcheng2944

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Compressing large natural language memory files (CLAUDE.md, todos, preferences) into caveman format reduces input tokens, speeding sessions without losing essential content.

Core Features & Use Cases

  • Preserves URLs, headings, code blocks, and file structure while compressing prose.
  • Backups originals as .original.md and overwrites the target with the compressed version.
  • Supports a retry/fix workflow by validating and optionally repairing issues with Claude.

Quick Start

Run caveman:compress <filepath> to compress a memory file and create a backup.

Frequently Asked Questions about compress

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

FAQPage Schema
How do I reduce token usage in large markdown memory files?

To reduce token usage in memory files, you compress natural language markdown into caveman format. This shrinks file content to speed up sessions while preserving essential structure and references like headings and URLs.

Does compressing CLAUDE.md files preserve code blocks and file paths?

Yes, compressing CLAUDE.md files preserves code blocks, file paths, URLs, and headings. The tool compresses prose into caveman format while satisfying strict requirements to maintain the original document's structural elements and references.

How do I compress a markdown memory file and keep a backup?

To compress a markdown memory file, run the compress command on your target filepath. The tool automatically creates a backup of the original as FILE.original.md and overwrites the active file with the compressed version.

What is caveman format for markdown compression?

Caveman format is a compressed syntax for natural language memory files that reduces input tokens. It transforms verbose prose into shortened phrases while preserving essential content, headings, and structure for Claude sessions.

Can I validate and fix issues after compressing a memory file?

Yes, you can validate and fix issues after compressing a memory file. The tool supports a retry and fix workflow by validating the compressed output and optionally repairing issues using Claude.

When should I not use markdown compression for Claude memory?

You should avoid markdown compression when your memory file relies heavily on verbose natural language context that cannot afford loss of descriptive nuance. Compression prioritizes token reduction over preserving detailed prose explanations.