Agent skill · Data & Analytics

context-crusher

Compress tool outputs, logs, and JSON before they enter the context window — structural compression via a deterministic stdlib script (schema + samples + stats instead of 300 raw rows), no API, no summarization loss. Use when asked shrink this tool output, my context is full of JSON, compress these logs before analysis, or stop wasting tokens on raw data. Produces the crushed artifact with its token math shown, the crush-or-keep decision rules, and the fetch-the-original escape hatch.

mohitagw15856github.com/mohitagw15856GitHub ↗
claude-codecursorships scriptsMIT
Install
npx skills add mohitagw15856/pm-claude-skills --skill context-crusher --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 5 KB
Bundled scripts: yes
Path: skills/context-crusher/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,255
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Context Crusher Skill The most expensive tokens in agent work are the ones nobody reads: 300 identical JSON rows when the schema plus three samples would do, a log where one error hides among four hundred heartbeats, a file pasted whole for one relevant section. This skill crushes those *structurally* — schema + head/tail samples + numeric stats for JSON arrays, dedupe-with-counts plus guaranteed error-line survival for logs, head/tail windowing for text — with a deterministic stdlib script, no model call, no summarization risk. The information that defines meaning survives; the repetition that defines cost doesn't. ## What This Skill Produces - **The crushed artifact** — the compressed version, with its token math in the header (~6,000 → ~130 is typical for uniform JSON) - **The crush decision** — what to crush, what to keep raw, and what to *link instead of load* - **The escape hatch** — every crush names how to fetch the original when a detail turns out to matter - **The pipeline habit** — where in the agent's workflow the crush step belongs (between tool and context, always) ## Required Inputs Ask for these if not provided: - **The payload** — the JSON/log/text (or its path),

What's inside
Steps it walks through
  1. What This Skill Produces
  2. Required Inputs
  3. Programmatic Helper
  4. Framework: The Crush Rules
  5. Output Format
  6. Quality Checks
  7. Anti-Patterns
  8. Based On
Ships with 1 file
  • scripts/context_crush.py
Commands it runs
python3 scripts/context_crush.py --mode json --file response.json
python3 scripts/context_crush.py --mode log --file build.log --keep 40
cat data.json | python3 scripts/context_crush.py --mode json
More from pm-claude-skills
All skills →
About this skill
What does the context-crusher skill do?

Compress tool outputs, logs, and JSON before they enter the context window — structural compression via a deterministic stdlib script (schema + samples + stats instead of 300 raw rows), no API, no summarization loss. Use when asked shrink this tool output, my context is full of JSON, compress these logs before analysis, or stop wasting tokens on raw data. Produces the crushed artifact with its token math shown, the crush-or-keep decision rules, and the fetch-the-original escape hatch.

How do I install it?

Run `npx skills add mohitagw15856/pm-claude-skills --skill context-crusher --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From mohitagw15856/pm-claude-skills, a repository with 1,255 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going