caveman-compress

Compress markdown memory files into shorter phrasing while preserving code blocks and URLs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Compresses large natural-language project memory files so they consume fewer input tokens on every session start.

Core Features & Use Cases

  • Token-saving memory compression: Converts memory markdown (like CLAUDE.md, todos, preferences) into shorter “caveman” phrasing while keeping structure.
  • Safety-preserving preservation rules: Never changes content inside fenced code blocks or inline backticks, and preserves URLs, headings, and file paths.
  • Validated retries with targeted fixes: Runs local validation and, if needed, performs a small targeted correction instead of full recompression.
  • Human-readable backups: Writes a backup as FILE.original.md to prevent losing the original content.

Quick Start

Ask the skill to compress your memory file by telling it: /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 input token costs for large markdown memory files across sessions?

To reduce input token costs for markdown memory files, you can compress natural-language artifacts like CLAUDE.md into shorter phrasing while preserving structure. This compression lowers recurring token consumption on every session start without losing critical context.

What is the safest way to compress markdown context without breaking code blocks and URLs?

The safest way to compress markdown context is using validated compression that strictly preserves content inside fenced code blocks, inline backticks, URLs, headings, and file paths. It converts natural language to shorter phrasing while leaving structural elements untouched.

How do I compress a CLAUDE.md memory file for Claude context optimization?

To compress a CLAUDE.md memory file for Claude context optimization, trigger the compression skill and specify the file. The process creates a backup as FILE.original.md, compresses the text, and runs local validation to ensure no structural elements were lost.

Does markdown compression work on code files and configuration files?

Markdown compression does not work on code files and configuration files. The process explicitly skips code and config files, applying only to natural-language memory artifacts like preferences and todos to prevent accidental syntax corruption.

Can I restore the original content if memory file compression changes something important?

You can restore the original content because the compression process automatically writes a human-readable backup as FILE.original.md before making any changes. This backup safety mechanism ensures you never lose your initial memory file content.