Install any skill in seconds. Free to start, no credit card required.
Get Started Free →When conversation context is getting long, when approaching token limits, when the user says "compress," "summarize context," "too long," "running out of context," "compact," or when you notice degraded performance due to context length. Implements a 3-layer compression pipeline (MicroCompact, AutoCompact, Full Compact).
.claude/skills/irfad7-context-compression/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 50% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -11% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 37% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 57% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 134% | 0% |
You are a context compression engine. When conversations grow long, you systematically reduce context size while preserving all decision-critical information.
Goal: Remove noise without losing any information.
Do this:
Compression ratio: ~30-40% reduction Information loss: Zero
Goal: Restructure retained information for density.
Do this:
## What We Know
## Decisions Made
## Current Task
Compression ratio: ~60-70% reduction Information loss: Minimal — details available via file re-reads
Goal: Maximum compression. Only essential state survives.
Do this:
## State What exists right now — files created/modified, current branch, build status]
## Intent What the user wants to achieve — the goal, not the steps]
## Constraints Critical decisions, patterns, rules that must be followed]
Compression ratio: ~85-90% reduction Information loss: Moderate — but all recoverable from codebase
When triggered, assess which layer is appropriate:
| Situation | Layer | |-----------|-------| | "Getting long but still fine" | Layer 1 | | "Losing context, need clarity" | Layer 2 | | "About to hit limits, need maximum headroom" | Layer 3 | | User says "compact" or "compress" | Layer 2 (default) | | User says "hard compress" or "nuke context" | Layer 3 |
After compression, present the compressed context to the user:
Context compressed (Layer [N]):
- Before: ~[X] turns, ~[Y]k tokens (estimated)
- After: ~[Z]k tokens (estimated)
- Preserved: [list key items kept]
- Dropped: [list what was removed]
Compressed context follows:
---
[compressed context block]
---
Does this capture everything important? Anything I should keep that I dropped?| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-22 | pass→pass | 17,014 | 6,838 | -60% | 1 | 1 | 0% | 2,338 | 2,294 | -2% | 0 | 0 | — |
case-01 | fail→pass | 7,932 | 5,837 | -26% | 1 | 1 | 0% | 1,300 | 1,953 | +50% | 0 | 0 | — |
case-02 | fail→pass | 12,325 | 5,017 | -59% | 1 | 1 | 0% | 2,044 | 1,821 | -11% | 0 | 0 | — |
case-03 | fail→pass | 10,130 | 7,084 | -30% | 1 | 1 | 0% | 1,618 | 2,217 | +37% | 0 | 0 | — |
case-04 | fail→pass | 8,467 | 7,090 | -16% | 1 | 1 | 0% | 1,443 | 2,262 | +57% | 0 | 0 | — |
case-05 | fail→pass | 6,054 | 7,149 | +18% | 1 | 1 | 0% | 912 | 2,131 | +134% | 0 | 0 | — |
case-06 | fail→pass | 4,197 | 6,372 | +52% | 1 | 1 | 0% | 575 | 2,092 | +264% | 0 | 0 | — |
case-07 | fail→fail | 5,116 | 4,517 | -12% | 1 | 1 | 0% | 699 | 1,580 | +126% | 0 | 0 | — |
case-08 | fail→fail | 12,167 | 8,667 | -29% | 1 | 1 | 0% | 1,822 | 2,238 | +23% | 0 | 0 | — |
case-09 | pass→pass | 7,040 | 3,731 | -47% | 1 | 1 | 0% | 1,134 | 1,634 | +44% | 0 | 0 | — |
case-10 | fail→pass | 11,321 | 6,475 | -43% | 1 | 1 | 0% | 1,806 | 2,084 | +15% | 0 | 0 | — |
case-11 | pass→pass | 12,215 | 5,874 | -52% | 1 | 1 | 0% | 2,141 | 2,048 | -4% | 0 | 0 | — |
case-12 | pass→pass | 12,505 | 5,304 | -58% | 1 | 1 | 0% | 2,119 | 1,791 | -15% | 0 | 0 | — |
case-13 | pass→pass | 5,690 | 2,918 | -49% | 1 | 1 | 0% | 914 | 1,457 | +59% | 0 | 0 | — |
case-14 | fail→pass | 8,842 | 5,829 | -34% | 1 | 1 | 0% | 1,346 | 1,864 | +38% | 0 | 0 | — |
case-15 | fail→pass | 9,461 | 4,449 | -53% | 1 | 1 | 0% | 1,488 | 1,714 | +15% | 0 | 0 | — |
case-21 | pass→pass | 13,323 | 10,928 | -18% | 1 | 1 | 0% | 2,846 | 3,114 | +9% | 0 | 0 | — |
case-16 | fail→pass | 7,435 | 2,076 | -72% | 1 | 1 | 0% | 1,210 | 1,237 | +2% | 0 | 0 | — |
case-17 | fail→pass | 10,832 | 1,594 | -85% | 1 | 1 | 0% | 1,480 | 1,156 | -22% | 0 | 0 | — |
case-18 | fail→pass | 8,945 | 2,339 | -74% | 1 | 1 | 0% | 1,532 | 1,336 | -13% | 0 | 0 | — |
case-19 | fail→pass | 12,600 | 2,757 | -78% | 1 | 1 | 0% | 643 | 1,441 | +124% | 0 | 0 | — |
case-20 | pass→pass | 10,698 | 5,412 | -49% | 1 | 1 | 0% | 2,175 | 1,981 | -9% | 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. 22 cases were attempted. The headline lift of +59 percentage points is the difference between those two pass rates over the 22 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.