caveman-compress

Compress natural-language Markdown memory files into shorter caveman style.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Compressing large natural-language memory files (like CLAUDE.md and todos) can waste input tokens on every session start, increasing cost and slowing interactions.

Core Features & Use Cases

  • Token-saving compression: Transforms natural-language Markdown into a shorter “caveman” style while preserving technical substance and structure.
  • Safety guardrails: Refuses to compress empty files, large files (>500KB), and files heuristically flagged as sensitive (secrets/credentials/keys) to avoid unsafe exfiltration.
  • Structure-preserving validation: Validates that headings, code blocks, URLs, inline code, and structure are preserved, and performs targeted fixes if validation fails.
  • Non-destructive workflow: Writes a backup as FILE.original.md before overwriting the compressed target.

Quick Start

Run the caveman-compress skill on your memory file by telling the assistant to compress CLAUDE.md.

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 token usage for large CLAUDE.md memory files?

To reduce input token usage for large CLAUDE.md memory files, you can compress the natural-language Markdown into a shorter "caveman" style. This rewrite preserves technical substance, Markdown structure, and code blocks while shrinking the repeated per-session token cost and speeding up interactions.

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

Yes, markdown compression preserves code blocks, URLs, inline code, file paths, commands, and headings. It validates the output structure against the original file and performs targeted repair retries up to two times if any structural element is missing from the shortened text.

What is the best way to shorten todo lists and preferences without losing meaning?

The best way to shorten todo lists and preferences without losing meaning is to apply a prose rewriting technique that trims natural language into a condensed style. The text is shortened while keeping all technical substance and Markdown formatting intact for repeated note-taking workflows.

Can I compress context files that contain secrets, credentials, or API keys?

You cannot compress context files that contain secrets, credentials, or API keys. The compression process includes safety guardrails that heuristically flag sensitive files and refuse to process them, preventing unsafe exfiltration of sensitive data during the token-saving rewrite.

What happens to my original memory file when context optimization is applied?

When context optimization is applied, your original memory file is preserved through a non-destructive workflow. The system writes a backup as FILE.original.md before overwriting the target file with the compressed version, ensuring you can always revert to the full text.

Are there file size limits for token saving on memory markdown files?

Yes, there are file size limits for token saving on memory markdown files. The compression refuses to process empty files or large files exceeding 500KB, and it skips files heuristically flagged as sensitive to avoid unsafe operations and maintain processing efficiency.