caveman-compress

Compress Claude Code memory files into caveman format with backup.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/domattioli/DomI --skill caveman-compress-domattioli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: caveman-compress
Source: https://github.com/domattioli/DomI/tree/main/plugins/caveman/caveman-compress
Command: npx skills add https://github.com/domattioli/DomI --skill caveman-compress-domattioli

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to reduce per-session token costs. The compressed version overwrites the original file and a human-readable backup is saved as FILE.original.md.

Core Features & Use Cases

  • Compress memory files into caveman format to dramatically lower token usage during Claude Code sessions.
  • Preserve the original content in a .original.md backup and overwrite the working file with the compressed version.
  • Validate output and retry up to two times to recover from partial failures, with clear prompts shown to the user.

Quick Start

Run caveman-compress on a memory file to overwrite it with a caveman-compressed version and save the original as a .original.md 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 when loading CLAUDE.md memory files in Claude Code sessions?

To reduce token usage for memory files, you can compress natural language documents like CLAUDE.md into a caveman format. This overwrites the working file with a smaller version to lower per-session token costs while preserving the original content in a .original.md backup.

What is caveman format compression for markdown memory files?

Caveman format compression is a technique that condenses markdown memory files, such as todos and preferences, into a highly abbreviated syntax. This minimizes the token count loaded into Claude Code sessions, dramatically lowering per-session token costs.

How do I compress markdown memory files without losing the original content?

You can compress markdown memory files while preserving original content by using a tool that saves a human-readable backup. The compression process overwrites the active file with the compressed version and automatically stores the original as a .original.md backup file.

Does memory file compression work safely with sensitive filenames?

Memory file compression enforces safety by refusing to process sensitive filenames. It also enforces a strict size limit and performs a two-step compression with validation, retrying up to two times to recover from partial failures and ensure safe file processing.

What is the best way to optimize Claude Code memory files for token limits?

The best way to optimize memory files for token limits is to compress them into caveman format before loading. This approach overwrites the working file with a compressed version and preserves a human-readable backup, ensuring you stay within size limits while retaining original data.