caveman-compress

Compress natural language project memory files while preserving code blocks and structure.

1|Updated Feb 19, 2025
One-click install
npx skills add https://github.com/trystan2k/favoritable-old --skill caveman-compress-trystan2k
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: caveman-compress
Source: https://github.com/trystan2k/favoritable-old/tree/main/.agents/skills/caveman-compress
Command: npx skills add https://github.com/trystan2k/favoritable-old --skill caveman-compress-trystan2k

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Large project memory files like CLAUDE.md, todo lists, and preference documents are loaded into context at the start of every Claude Code session, leading to excessive, recurring token waste that adds up to significant overhead across hundreds of sessions.

Core Features & Use Cases

  • Token-Efficient Compression: Reduces natural language memory file size by an average of 46% while preserving all code blocks, URLs, file paths, commands, and document structure exactly.
  • Safe, Reversible Workflow: Automatically saves a human-readable backup of the original file as FILE.original.md before overwriting, so you can edit the original content and re-run compression at any time.
  • Use Case: For a 1000-token project memory file, this Skill cuts per-session token overhead by nearly half, adding up to 100,000+ tokens saved across 100 sessions with no loss of critical context.

Quick Start

Request compression of your project's CLAUDE.md file using the caveman-compress skill to reduce per-session token costs.

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 consumption for large CLAUDE.md memory files in Claude Code sessions?

To reduce token consumption for CLAUDE.md memory files, compress the natural language content to shrink file size by an average of 46% while preserving code blocks, URLs, and document structure.

Can I compress markdown and text files without losing code blocks or file paths?

Yes, you can compress markdown and text files without losing code blocks or file paths. The compression process automatically skips code and configuration files, preserving all commands and document structure exactly.

Does compressing project memory files create a backup of the original content?

Compressing project memory files automatically saves a human-readable backup of the original content as FILE.original.md before overwriting, ensuring you can edit the original and re-run compression at any time.

What is the best way to cut recurring input token overhead for project preference documents?

The best way to cut recurring input token overhead for preference documents is to compress their natural language text. A 1000-token memory file saves nearly half its tokens per session, accumulating 100,000+ tokens saved across 100 sessions.

When should I not use natural language file compression for my project context?

You should not use natural language file compression for code or configuration files, as the compression process is designed to automatically skip these formats and only targets human-readable project memory documents.