From Compress Text
Reads text in any format and produces a leaner, better-structured version via MECE semantic grouping and the Pyramid Principle. Generates multiple candidate groupings, scores each on size reduction and meaning-fidelity, and selects the best while preserving the original meaning, instructions, key points, references, and examples. Preserves template tags (Handlebars/Jinja/Mustache/shell/ERB and explicit keep/drop markers) verbatim and can emit the result into a user-supplied output template with named slots. Offers a dense LLM-oriented mode and a readable human-oriented mode. Use it to shrink, compress, trim, deduplicate, restructure, or optimize any text, reduce its token/context footprint, compress a template while keeping its tags, or measure compression effectiveness.
How this skill is triggered — by the user, by Claude, or both
Slash command
/compress-text:compress-text Paste or reference the text to compress; optionally set mode (dense/readable), aggressiveness, candidates, or an output templatePaste or reference the text to compress; optionally set mode (dense/readable), aggressiveness, candidates, or an output templateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Produce a leaner, better-structured version of any text that costs less context without losing meaning. Method: group content MECE (mutually exclusive, collectively exhaustive), rephrase each group with the Pyramid Principle (key point first, detail beneath), drop anything off-purpose. When multiple groupings fit, generate candidates, measure, keep the best. Preserve original meaning and every ...
Produce a leaner, better-structured version of any text that costs less context without losing meaning. Method: group content MECE (mutually exclusive, collectively exhaustive), rephrase each group with the Pyramid Principle (key point first, detail beneath), drop anything off-purpose. When multiple groupings fit, generate candidates, measure, keep the best. Preserve original meaning and every distinct instruction, key point, requirement, reference, and example. Works on any format: prose, docs, notes, prompts, code comments, transcripts, Markdown.
dense (LLM-oriented) maximizes info per token — telegraphic, abbreviations and symbols ok, readability secondary; readable (human-oriented) keeps fluent prose, no cryptic fragments. Default readable; use dense when the target is an LLM prompt/context.conservative (default) consolidates and tightens clear cases only; aggressive also merges related groups and freely rewrites verbose passages.1 to skip comparison.<!-- slot:NAME --> slots to emit into instead of the default Output template (see below).Two tag families are always honored, in any format:
{{…}}/{{#…}}/{{/…}} (Handlebars/Mustache), {%…%} (Jinja/Liquid), ${…}/$NAME (JS/shell), <%…%> (ERB/EJS), {0}/{name} (format strings). Reproduce each exactly and in original order; never reorder, merge, or de-duplicate control-flow pairs ({% for %}…{% endfor %}, {{#each}}…{{/each}}) even when the text between them looks repetitive.<!-- keep -->…<!-- /keep --> = reproduce verbatim; <!-- drop -->…<!-- /drop --> = always remove. Comment delimiters are invisible in rendered Markdown and never collide with engine tags. Strip the delimiters from the output unless the user asks to keep them.<!-- keep --> span, plus its position. Compression changes how briefly these are expressed, never whether they exist. Remove <!-- drop --> spans up front and exclude them from the baseline.candidates groupings (default 2-3): every idea in exactly one group (mutually exclusive), every preserved element mapped to a group (collectively exhaustive). Make candidates genuinely different by varying the grouping axis (topic, reader task, section, or content type) — different axes expose different redundancies and reveal the leanest structure.w/, &, →, #, >=) when clear; readable: complete fluent sentences, no cryptic abbreviations.## Compressed text: <title or first line>
<full rephrased text of the selected candidate>
---
### Candidate comparison
| Candidate | Grouping axis | Size reduction | Fidelity | MECE clean? |
|-----------|---------------|----------------|----------|-------------|
| A | <axis> | ~<percent>% | <n/n> | yes/no |
| B | <axis> | ~<percent>% | <n/n> | yes/no |
Selected: <candidate> - <why it won>
### Preserved intact
- <count> instructions/requirements, <count> references, <count> verbatim spans/examples, structure
### How it was compressed
- MECE grouping: <ideas consolidated; duplicates removed>
- Pyramid rephrasing: <key-point-first rewrites and tightening>
- Removed as unrelated: <what was dropped and why>
### Estimated size reduction
~<before> tokens/words -> ~<after> (~<percent>% smaller)
If a template parameter is supplied, emit it instead: fill each <!-- slot:NAME --> with the matching value (compressed, title, reduction, candidate_table, preserved), pass unknown text through verbatim, and drop slots with no value.
<!-- drop --> spans removed; output template (if given) filled<!-- keep --> span); compress only the prose around them.compress text, shrink content, trim text, restructure, reduce tokens, save context window, measure effectiveness, pyramid principle, MECE, candidate grouping, semantic grouping, deduplicate, summarize, optimize, bloated content, dense mode, readable mode, template, template tags, placeholders, handlebars, mustache, jinja, liquid, keep tag, drop tag, output slots
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub martinforreal/compress-text-skill