compress

Compress prose in Markdown files while preserving code blocks and structure.

1|1|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/svssdeva/agentic-skills --skill compress-svssdeva
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compress
Source: https://github.com/svssdeva/agentic-skills/tree/main/utils/compress
Command: npx skills add https://github.com/svssdeva/agentic-skills --skill compress-svssdeva

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill reduces input tokens by compressing natural-language Markdown files into a shorter caveman-style version while preserving code, paths, commands, and structural elements.

Core Features & Use Cases

  • Token-saving compression for Markdown: Compresses prose in supported text/markdown files to lower prompt size without losing operational meaning.
  • Safe preservation of critical regions: Keeps code blocks, inline code, URLs/links, file paths, commands, technical terms, dates/numbers, and markdown structure unchanged.
  • Workflow backup and recovery: Writes a human-readable backup as FILE.original.md and avoids recompressing the backup if it exists, with limited retries on failure.

Quick Start

Use the compress skill to compress your CLAUDE.md by running /caveman:compress 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 Claude input tokens for large markdown memory files?

You can reduce Claude input tokens for markdown memory files by compressing natural-language prose into a shorter version while preserving code blocks, commands, and file paths. This lowers prompt size without losing operational meaning.

Does markdown compression alter code blocks and YAML frontmatter?

Markdown compression does not alter code blocks, inline code, YAML frontmatter, URLs, or file paths. It enforces strict preservation boundaries to keep technical elements and structural formatting completely unchanged.

What is the best way to compress CLAUDE.md to save context window space?

The best way to compress CLAUDE.md to save context space is to run a compression skill that overwrites the original file with a shorter prose version and saves a backup as FILE.original.md for recovery.

How do I backup my markdown files before token optimization processing?

To backup markdown files before token optimization, the compression process automatically writes a human-readable copy as FILE.original.md before overwriting the original. It also avoids recompressing this backup if it already exists.

Can I compress extensionless text artifacts and todo files for Claude Code?

Yes, you can compress extensionless text artifacts and todo files for Claude Code. The compression applies to prose-heavy .md or extensionless text artifacts where token budgets matter, such as memories, preferences, and todos.