compress-skill

Compress SKILL.md files with deterministic cleanup and optional LLM rewrites.

4|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/leocosta/octopus --skill compress-skill-leocosta
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compress-skill
Source: https://github.com/leocosta/octopus/tree/main/skills/compress-skill
Command: npx skills add https://github.com/leocosta/octopus --skill compress-skill-leocosta

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Compress-Skill reduces verbosity in a SKILL.md file by performing deterministic cleanup and, if necessary, a careful LLM-based rewrite to preserve semantics. It helps keep SKILL.md concise for efficient loading in context without losing meaning or test anchors.

Core Features & Use Cases

  • Deterministic cleanup: collapse blank lines, trim trailing whitespace, and remove meta prose.
  • Optional LLM rewrite: engage only when necessary to meet target compression while preserving semantics.
  • Invariants: preserve frontmatter, anchors, headings, and fenced code blocks.
  • Safe workflow: supports dry-run and explicit --apply for controlled changes.

Quick Start

Compress the SKILL.md in place using deterministic cleanup, then apply the optional LLM rewrite only if needed to preserve semantics.

Frequently Asked Questions about compress-skill

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

FAQPage Schema
How do I compress markdown documentation to reduce verbosity without changing meaning?

To compress markdown documentation without losing semantics, apply deterministic cleanup to remove blank lines and meta prose, then use optional LLM-based rewrites to shrink text while preserving meaning.

What is the best way to shrink a SKILL.md file for efficient LLM context loading?

The best way to shrink a SKILL.md file is to run deterministic cleanup followed by an optional LLM rewrite, which reduces token usage while keeping the document concise for efficient context loading.

How do I reduce markdown verbosity while preserving frontmatter and code blocks?

You can reduce markdown verbosity while preserving frontmatter and code blocks by using invariants checks that ensure anchors, headings, and fenced code blocks remain completely intact during the compression process.

Can I test markdown compression changes before applying them to the source file?

Yes, you can test markdown compression changes safely by running a dry-run, which previews the deterministic cleanup and LLM rewrite results without modifying the original file until you explicitly use the apply command.

How does LLM-based markdown compression maintain semantic integrity?

LLM-based markdown compression maintains semantic integrity by engaging only when necessary to meet target compression limits, ensuring the original meaning is preserved while reducing text length.

What are the limitations of using deterministic cleanup for markdown compression?

Deterministic cleanup is limited to collapsing blank lines, trimming trailing whitespace, and removing meta prose, meaning it cannot rewrite sentences or reduce text length semantically without the optional LLM component.