caveman-compress

Compress natural-language memory files into caveman format while preserving code blocks, URLs, and headings.

199|41|Updated Oct 25, 2020
One-click install
npx skills add https://github.com/rvdbreemen/OTGW-firmware --skill caveman-compress-rvdbreemen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: caveman-compress
Source: https://github.com/rvdbreemen/OTGW-firmware/tree/main/.agents/skills/caveman-compress
Command: npx skills add https://github.com/rvdbreemen/OTGW-firmware --skill caveman-compress-rvdbreemen

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Large project memory files like CLAUDE.md cost tokens every session, slowing you down and increasing usage costs.

Core Features & Use Cases

  • Compress natural-language memory into a shorter “caveman-speak” style while keeping technical meaning intact.
  • Preserve critical regions exactly including fenced code blocks, inline code, URLs, headings, and file paths.
  • Validate and repair the compressed output against the original, using targeted fixes only when validation fails.
  • Safety guardrails reject files that look like they may contain secrets or sensitive credentials, and keep a human-readable backup as FILE.original.md.

Quick Start

Ask your AI to run /caveman-compress CLAUDE.md to compress your session memory and automatically create CLAUDE.original.md as 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 when loading large CLAUDE.md memory files in Claude?

To reduce token usage for large CLAUDE.md memory files, compress natural-language text into a shorter caveman-speak format while preserving technical meaning. This cuts input-token overhead for files read at every session start, lowering recurring context costs.

Does compressing markdown memory files preserve code blocks, URLs, and file paths?

Compressing markdown memory files preserves critical regions exactly, including fenced code blocks, inline code, URLs, headings, and file paths. Validation runs against the original with targeted repair up to two retries to ensure technical meaning remains intact.

How do I compress CLAUDE.md context while keeping a backup of the original file?

Compress CLAUDE.md context by asking your AI to run the compression command, which automatically creates a human-readable backup as FILE.original.md. This ensures you retain the full original natural-language memory file before applying the shorter format.

Can I safely compress memory files that might contain secrets or sensitive credentials?

Safety guardrails reject files that look like they may contain secrets or sensitive credentials using filename and path heuristics. This prevents the compression process from processing likely sensitive files in your repository.

What is the best way to optimize context tokens for large repositories without losing technical meaning?

The best way to optimize context tokens for large repositories is compressing natural-language memory into caveman format while preserving meaning. This targets large project memory files like CLAUDE.md, todos, and preferences that drive recurring context size costs.

Why does my markdown memory compression fail validation and how is it repaired?

Markdown memory compression validation fails when compressed output loses meaning or breaks critical regions. The process applies targeted fixes only when validation fails, retrying up to two times to ensure code blocks, URLs, and file paths remain exactly preserved.