caveman-compress

Compress natural language memory files into a compact caveman format.

2|1|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/huangzida/skills --skill caveman-compress-huangzida
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: caveman-compress
Source: https://github.com/huangzida/skills/tree/main/caveman-compress
Command: npx skills add https://github.com/huangzida/skills --skill caveman-compress-huangzida

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Caveman-compress reduces per-session token costs by compressing natural language memory files (CLAUDE.md, todos, preferences) into a compact caveman format while preserving all essential content and structure. The compressed file overwrites the original and a human-readable backup is saved as <filename>.original.md.

Core Features & Use Cases

  • Remove filler and compress natural language content using deterministic steps.
  • Preserve code blocks, URLs, headings, file paths, and commands exactly.
  • Create backups and support validation/retries to ensure safety and data integrity.
  • Use across Claude-based workflows to minimize token usage in memory files, enabling faster session startups and lower costs.

Quick Start

Run caveman:compress on the target memory file to produce a compressed version and a backup.

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 usage in Claude memory files like CLAUDE.md?

To reduce token usage in Claude memory files, compress natural language content in CLAUDE.md and todos into a compact caveman format. This removes filler text while preserving essential content, code blocks, URLs, and structure to lower per-session token costs.

What is the best way to compress markdown memory files without losing code blocks and URLs?

The best way to compress markdown memory files without losing code blocks and URLs is using deterministic compression steps that strip filler text while preserving headings, file paths, commands, and structural elements exactly as they appear in the original document.

Does compressing project memory files create a backup of the original content?

Compressing project memory files creates a human-readable backup saved as <filename>.original.md before the compressed version overwrites the original, ensuring data integrity and safe rollback if needed.

Can I use Claude CLI or API to validate memory file compression and retry on failure?

You can use Claude CLI or API to validate memory file compression and retry on failure. The compression process requires validation checks and retries through Claude to ensure safe, deterministic compression of memory payloads.

Do I need tiktoken and anthropic dependencies to run caveman compression on memory payloads?

You need tiktoken and anthropic dependencies to run caveman compression on memory payloads. These libraries support token counting and Claude-based validation checks required for deterministic compression and retries.

Why does my Claude session startup consume too many tokens from memory files?

Claude session startup consumes too many tokens when memory files contain verbose natural language. Compressing these files into a compact format minimizes token consumption, enabling faster startups and lower costs while preserving readability.