caveman-compress

Compress Markdown memory files into caveman format with .original.md backups.

1|Updated Feb 13, 2018
One-click install
npx skills add https://github.com/g-lok/gs-dotfiles --skill caveman-compress-g-lok
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: caveman-compress
Source: https://github.com/g-lok/gs-dotfiles/tree/main/install.d/dotfiles/ai_skills/.agents/skills/caveman-compress
Command: npx skills add https://github.com/g-lok/gs-dotfiles --skill caveman-compress-g-lok

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Compress natural language memory files into caveman format to reduce per-session input tokens and associated costs, while preserving content integrity.

Core Features & Use Cases

  • Compresses Markdown memory files like CLAUDE.md, todos, and preferences into caveman format to minimize context length.
  • Backups originals as .original.md and validates results with retryable quality checks to ensure fidelity.
  • Works locally via a CLI workflow (cd caveman-compress && python3 -m scripts) or through programmatic tooling.

Quick Start

Run caveman compress on a target memory file to produce a compressed version and 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 input tokens for Claude memory files like CLAUDE.md?

You can compress natural language memory files into caveman format to reduce Claude session input tokens. The process creates a .original.md backup and validates output with retries to ensure content fidelity.

What is caveman compression for markdown memory files?

Caveman compression shrinks markdown memory files into a caveman format to minimize context length and per-session costs. It performs type detection and safe compression while preserving URLs, headings, and file structure.

Do I need Python and specific dependencies to compress markdown memory files?

Yes, compressing markdown memory files requires Python and the anthropic and tiktoken dependencies. You can operate the compression locally via a CLI workflow or through a programmatic API fallback.

How do I run caveman compression on local project notes and todos?

To compress local project notes, run the CLI workflow by navigating to the caveman-compress directory and executing python3 -m scripts. This produces a compressed version of your target memory file alongside a backup.

Will compressing markdown memory files break my URLs or file structure?

Compressing markdown memory files applies targeted fixes that preserve URLs, headings, and file structure. It validates results with retryable quality checks to ensure content fidelity is maintained.

What is the best way to back up markdown files before reducing context tokens?

The best way to back up markdown files during token reduction is automatic .original.md backup creation. The compression process safely generates this backup before applying any caveman format changes to your memory files.