Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/mohitagw15856-context-crusher/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 165% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 24% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 130% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 48% | 0% |
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.
Ask for these if not provided:
bashpython3 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
Deterministic, stdlib-only, no API. JSON arrays → {count, schema, head samples, tail, numeric min/max/mean} · logs → consecutive-duplicate collapse + first-occurrence dedupe + an always-preserved error/warning section · text → whitespace normalization + head/tail window with an elision marker. Inputs too small to gain are returned unchanged with an honest header.
tool | crush | context), not in cleanup. Retroactive crushing saves nothing already paid for.The crushed artifact, script header included]
Kept raw: what wasn't crushed and why] · Original: where it lives, how to fetch] Pipeline note: where the crush step now sits in this workflow]
The context-compression layer pattern — structural compression of tool outputs before the LLM (as in Headroom) — rebuilt here as a keyless, deterministic, stdlib skill.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 18,387 | 17,013 | -7% | 1 | 1 | 0% | 3,826 | 4,836 | +26% | 0 | 0 | — |
case-02 | pass→pass | 15,700 | 15,511 | -1% | 1 | 1 | 0% | 2,712 | 3,903 | +44% | 0 | 0 | — |
case-03 | pass→pass | 17,635 | 44,138 | +150% | 1 | 1 | 0% | 3,203 | 4,630 | +45% | 0 | 0 | — |
case-04 | fail→pass | 4,896 | 7,616 | +56% | 1 | 1 | 0% | 913 | 2,423 | +165% | 0 | 0 | — |
case-05 | pass→pass | 11,637 | 10,354 | -11% | 1 | 1 | 0% | 1,996 | 3,065 | +54% | 0 | 0 | — |
case-06 | fail→pass | 11,842 | 9,899 | -16% | 1 | 1 | 0% | 2,089 | 2,586 | +24% | 0 | 0 | — |
case-07 | fail→pass | 4,952 | 5,074 | +2% | 1 | 1 | 0% | 840 | 1,933 | +130% | 0 | 0 | — |
case-08 | fail→pass | 22,271 | 11,928 | -46% | 1 | 1 | 0% | 3,562 | 3,026 | -15% | 0 | 0 | — |
case-09 | fail→pass | 12,851 | 13,144 | +2% | 1 | 1 | 0% | 2,240 | 3,315 | +48% | 0 | 0 | — |
case-10 | fail→pass | 10,656 | 46,096 | +333% | 1 | 1 | 0% | 2,027 | 2,882 | +42% | 0 | 0 | — |
case-11 | pass→pass | 6,010 | 8,819 | +47% | 1 | 1 | 0% | 1,105 | 2,960 | +168% | 0 | 0 | — |
case-12 | pass→pass | 6,755 | 6,518 | -4% | 1 | 1 | 0% | 1,214 | 2,268 | +87% | 0 | 0 | — |
case-13 | fail→pass | 12,651 | 10,189 | -19% | 1 | 1 | 0% | 2,034 | 2,654 | +30% | 0 | 0 | — |
case-14 | fail→pass | 6,230 | 2,726 | -56% | 1 | 1 | 0% | 1,044 | 1,562 | +50% | 0 | 0 | — |
case-15 | fail→pass | 9,795 | 3,143 | -68% | 1 | 1 | 0% | 1,738 | 1,685 | -3% | 0 | 0 | — |
case-16 | pass→pass | 5,074 | 3,516 | -31% | 1 | 1 | 0% | 892 | 1,647 | +85% | 0 | 0 | — |
case-22 | fail→pass | 7,448 | 65,682 | +782% | 1 | 1 | 0% | 1,096 | 1,663 | +52% | 0 | 0 | — |
case-17 | pass→pass | 13,394 | 7,666 | -43% | 1 | 1 | 0% | 2,150 | 2,434 | +13% | 0 | 0 | — |
case-18 | fail→pass | 11,758 | 6,345 | -46% | 1 | 1 | 0% | 2,025 | 2,335 | +15% | 0 | 0 | — |
case-19 | pass→pass | 11,759 | 7,716 | -34% | 1 | 1 | 0% | 1,831 | 2,319 | +27% | 0 | 0 | — |
case-20 | fail→pass | 17,483 | 13,307 | -24% | 1 | 1 | 0% | 2,486 | 3,685 | +48% | 0 | 0 | — |
case-21 | pass→pass | 12,692 | 9,851 | -22% | 1 | 1 | 0% | 2,106 | 2,647 | +26% | 0 | 0 | — |
case-23 | pass→pass | 11,295 | 5,921 | -48% | 1 | 1 | 0% | 1,789 | 2,089 | +17% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +52 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.