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. Cuts redundancy with semantic and statistical analysis, and strips self-corrections plus the passages they supersede when the author pivoted (transcripts, dictation, drafts, chat). Preserves template tags (Handlebars/Jinja/Mustache/shell/ERB and explicit keep/drop markers) verbatim and can emit the result into a user-supplied template with named slots. Offers a dense LLM-oriented mode and a readable human-oriented mode. Use it to shrink, compress, trim, deduplicate, restructure, optimize, or clean up any text or transcript, reduce its token/context footprint, compress a template while keeping its tags, merge related docs and dedupe across them, 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, and removes only explicit, unambiguous self-corrections; aggressive also merges related groups, freely rewrites verbose passages, drops implicitly superseded restatements, shortens repeated long noun phrases to a short form after first mention, and cuts scope-setting context that states no distinct rule, fact, number, or constraint — never dropping a load-bearing qualifier (a condition, exception, scope, unit, name, or number that changes meaning).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.Four complementary lenses. Apply whichever the text rewards; they reinforce each other and feed the Procedure below.
<!-- keep --> span, plus its position. Compression changes how briefly these are expressed, never whether they exist. Note the text type — polished doc vs transcript, dictation, draft, or chat; the latter often carries self-corrections, where only the superseding version is load-bearing (see Compression techniques → Supersession). 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. When the input spans multiple documents or sections that belong together, group across all of them at once as one key-point tree over the whole context (Structural lens), so a point repeated in several places maps to a single node and a shared sub-point can hoist to a common parent — never one grouping per document in isolation.w/, &, →, #, >=) when clear; readable: complete fluent sentences, no cryptic abbreviations.After ## Compressed text: <title or first line>, start with compressed content; do not repeat the source title as an extra #/## body heading. For split/merged structural outputs, prefer compact branch-delta bullets (- Branch: actions...) over nested copied headings or numbered lists when order is not load-bearing.
## 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>
- Redundancy removed: <count of duplicate/near-duplicate sentences consolidated> (omit line if none)
- Pyramid rephrasing: <key-point-first rewrites and tightening>
- Resolved pivots: <self-corrections/superseded passages removed, final version kept> (omit line if none)
- 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, semantic dedup, entailment, statistical redundancy, n-gram redundancy, near-duplicate sentences, information density, deduplicate, summarize, optimize, bloated content, self-correction, pivot, supersede, superseded content, transcript cleanup, dictation cleanup, clean up chat, dense mode, readable mode, template, template tags, placeholders, handlebars, mustache, jinja, liquid, keep tag, drop tag, output slots, key-point tree, context tree, cross-document dedup, cross-section dedup, merge documents, split document, hoist shared content, shared core plus deltas, deduplicate across documents
Guides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Dispatches multiple subagents concurrently for independent tasks without shared state. Use when facing 2+ unrelated failures or subsystems that can be investigated in parallel.
npx claudepluginhub martinforreal/compress-text-skill --plugin compress-text