compress

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

1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/darkmatter/skills --skill compress-darkmatter
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: compress
Source: https://github.com/darkmatter/skills/tree/main/docs/00-inbox/skills/compress
Command: npx skills add https://github.com/darkmatter/skills --skill compress-darkmatter

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill turns long project memory files into shorter caveman-style text so they cost fewer tokens every time an agent loads a workspace.

Core Features & Use Cases

  • Compresses natural language notes, preferences, and CLAUDE.md files in place.
  • Preserves code blocks, inline code, URLs, paths, headings, and structured tables exactly.
  • Automatically creates a human-readable backup and validates the result with retry-based fixes.
  • Useful when you want to keep long-running project instructions accurate without paying full context cost on every session.

Quick Start

Ask the skill to compress your memory file and save a backup for later editing.

Frequently Asked Questions about compress

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

FAQPage Schema
How do I reduce token usage in CLAUDE.md project memory files?▼

To reduce token usage in CLAUDE.md memory files, compress natural language notes into a shorter caveman format. This preserves essential meaning while lowering context costs on every session load.

Does markdown compression preserve code blocks, URLs, and file paths?▼

Markdown compression preserves code blocks, inline code, URLs, paths, headings, and structured tables exactly. It only shortens surrounding natural-language text, ensuring technical references remain intact.

What is the best way to compress markdown notes without losing context?▼

The best way to compress markdown notes without losing context is applying caveman-style compression with validation. It automatically creates a human-readable backup and uses retry-based repair to fix errors.

Can I automate compression for recurring project context and preference notes?▼

You can automate compression for recurring project context, preferences, and todos. The process modifies files in place while retaining essential meaning for long-running project instructions.

What happens to my original markdown file after token reduction?▼

After token reduction, your original markdown file is saved as a human-readable backup. The compressed version replaces the active file, allowing you to restore the full text later for editing.

When should I not use caveman-style text compression for my memory files?▼

Avoid caveman-style text compression when your memory files require standard sentence grammar for external tool parsing, or when token costs are not a concern for your workspace sessions.