compress

Compress markdown memory files while preserving code, URLs, and headings.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/oElberte/dotfiles --skill compress-oelberte
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compress
Source: https://github.com/oElberte/dotfiles/tree/main/private_dot_factory/skills/compress
Command: npx skills add https://github.com/oElberte/dotfiles --skill compress-oelberte

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Compresses natural-language memory markdown files to reduce input tokens while preserving all technical content, structure, and references.

Core Features & Use Cases

  • Token-saving caveman compression: Rewrites prose into shorter language while keeping headings, lists, tables, and markdown structure.
  • Strict preservation of code and technical artifacts: Leaves fenced code blocks, inline code, URLs, file paths, and commands unchanged.
  • Guardrailed validation + targeted recovery: Validates the compressed output against the original, retries, and if needed asks for a fix without recompressing.

Quick Start

Ask the AI: /caveman:compress path/to/CLAUDE.md.

Frequently Asked Questions about compress

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

FAQPage Schema
How do I reduce input token usage in markdown memory files without losing technical substance?

Compressing markdown memory files rewrites natural language prose into shorter text while strictly preserving code blocks, inline code, URLs, file paths, and document structure to retain technical substance and reduce input tokens.

Can I shorten a CLAUDE.md file without altering its code regions and commands?

Yes, you can shorten a CLAUDE.md file by rewriting the surrounding prose while leaving fenced code blocks, inline code, commands, and file paths completely unchanged and structurally intact.

Does markdown compression validate the output against the original file?

Yes, markdown compression validates the compressed output against the original file, uses retries to correct issues, and applies targeted error fixing without recompressing the entire file to ensure technical accuracy.

What is the best way to compress workflow notes and preference documents for Claude integration?

The best way to compress workflow notes for Claude integration is to apply caveman compression, which shortens prose safely while keeping headings, lists, tables, and technical artifacts fully intact for accurate processing.

Are there limitations on what markdown elements should be modified during token reduction?

Yes, limitations during token reduction require strict preservation of fenced code blocks, inline code, URLs, file paths, and commands; only natural language prose, headings, and standard markdown structures should be modified.