agentsclimarketplace

Compresr context compressor

Skill riteshkew/yc-skills/skills/compresr-context-compressor

Catalog of all 198 YC Winter 2026 companies + 18 working Claude Code Skills inspired by the ones an open-source tool can replicate. Inspired by, not affiliated with.

Install
npx -y skills add riteshkew/yc-skills --skill compresr-context-compressor

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Compress a long context blob to reduce LLM token usage — deduplicates repeated lines and paragraphs, strips boilerplate, collapses blank-line runs, and reports before/after token estimates so you can see exactly how much context was saved.

SKILL.md

3.6 KB, as published. Nobody here has run it

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:

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. The estimator uses a word + punctuation heuristic (~4 chars per alphanumeric run, 1 token per punctuation character). It is an approximation — see the caveat note below.

node scripts/count-tokens.mjs <file>

Step 4 — Report results to the user

Report the following:

  • Tokens before (estimated)
  • Tokens after (estimated)
  • Percentage reduction
  • The compressed context (inline or as a file reference)
  • The caveat that counts are estimates

Output format

Compression complete.

  Tokens before: ~<N> (estimated)
  Tokens after:  ~<M> (estimated)
  Reduction:     <X>%

Note: token counts are heuristic estimates (word+punctuation splitter).
For exact BPE counts, use tiktoken (OpenAI) or LLMLingua (Microsoft).

Compressed context:
---
<compressed text here>
---

If the reduction is below 5%, tell the user the context is already compact and compression had minimal impact.

Example

See examples/input.md for a 200+ line design document with intentional redundancy (duplicated sections, repeated boilerplate, blank-line runs).

Run the example yourself:

cd skills/compresr-context-compressor
bash examples/run.sh

The output is written to examples/output.md with the full before/after report and the compressed context in a fenced block.

Caveats

  • Lossy-but-safe: Compression removes genuinely redundant content. It does not summarize or paraphrase — unique content is always preserved.
  • Estimate caveat: Token counts are heuristic estimates, not real BPE counts. For production use, replace count-tokens.mjs with tiktoken or LLMLingua.
  • Boilerplate is deterministic: The boilerplate patterns are regex-based and documented in the source. If a pattern incorrectly strips content, remove or adjust it in scripts/compress.mjs.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.