compress

Compress natural language markdown files into a concise format while preserving code blocks.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/achmf/KostaHub --skill compress-achmf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compress
Source: https://github.com/achmf/KostaHub/tree/main/.agents/skills/compress
Command: npx skills add https://github.com/achmf/KostaHub --skill compress-achmf

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the issue of high input token consumption by compressing natural language memory files into a concise, caveman-style format while preserving technical integrity.

Core Features & Use Cases

  • Intelligent Compression: Automatically strips filler words and pleasantries from markdown files while keeping code blocks, URLs, and technical structures intact.
  • Safety Guardrails: Includes built-in heuristics to prevent the compression of sensitive files like credentials or private keys, ensuring data security.
  • Validation & Recovery: Employs a multi-step validation process with automated retries and original file backups to ensure no data is lost during the transformation.

Quick Start

Use the compress skill to reduce the token size of the CLAUDE.md file in the current directory.

Frequently Asked Questions about compress

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

FAQPage Schema
How do I reduce input token usage for markdown memory files?

To reduce input token usage for markdown memory files, compress natural language documentation into a concise format. This process strips filler words while preserving technical structures like code blocks to optimize LLM context consumption.

Does markdown compression preserve code blocks and technical metadata?

Yes, markdown compression preserves code blocks and technical metadata. The compression mechanism operates strictly on natural language text, ensuring that URLs, code snippets, and technical structures remain fully intact during the token optimization process.

What is the best way to compress CLAUDE.md files for token optimization?

The best way to compress CLAUDE.md files for token optimization is using automated scripts that convert text to a concise format. This approach safely reduces file size while maintaining the core technical integrity required by the LLM.

Can I safely compress documentation files without losing data?

You can safely compress documentation files without losing data by using automated validation and backup mechanisms. Original files are backed up before transformation, and multi-step validation with automated retries ensures content integrity throughout the compression process.

Are there limitations on compressing sensitive files like credentials?

Yes, a key limitation is that sensitive files like credentials or private keys should not be compressed. Built-in safety heuristics automatically detect and prevent the compression of these sensitive files to ensure data security and avoid accidental exposure.

Do I need tiktoken to optimize LLM input tokens for markdown?

Yes, you need tiktoken along with anthropic dependencies to optimize LLM input tokens for markdown. These libraries provide the necessary token counting and language model integrations to accurately measure and reduce file sizes.