compresr-context-compressorlisted
Install: claude install-skill riteshkew/yc-skills
# Workflow
When this skill triggers, follow these steps in order.
## Step 1 — Receive the long context
Accept the text to compress. This can be:
- A pasted document (design doc, chat transcript, code file, meeting notes, etc.)
- A file path the user provides
- Any large blob the user wants to fit into a tighter context window
If the user provides a file path, confirm it exists before proceeding.
## Step 2 — Run the compressor
From the skill root directory, run:
```bash
node scripts/compress.mjs <inputFile> <outputFile>
```
The engine applies four deterministic passes in order:
1. **Paragraph dedup** — Finds paragraphs (blank-line-delimited blocks) that
appear more than once and replaces every repeat with a `_(repeated Nx, deduped)_`
annotation on the first occurrence.
2. **Boilerplate stripping** — Removes lines matching known low-salience patterns:
`Lorem ipsum`, legal confidentiality notices, copyright lines, "for internal
use only" footers, and similar content.
3. **Line dedup** — Removes exact duplicate non-blank lines within the remaining text.
4. **Blank-line collapse** — Collapses runs of two or more consecutive blank lines
into a single blank line, and strips trailing whitespace from each line.
The compressed text is written to the output file. Token estimates are printed to
stderr for inspection.
## Step 3 — Compute before/after token estimates
The skill uses `scripts/count-tokens.mjs` to estimate token counts before and
after compression.