Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
.claude/skills/loulanyue-strategic-compact/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -6% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -2% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 114% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -7% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -63% | 0% |
在工作流程的策略點建議手動 /compact,而非依賴任意的自動壓縮。
自動壓縮在任意點觸發:
邏輯邊界的策略性壓縮:
suggest-compact.sh 腳本在 PreToolUse(Edit/Write)執行並:
新增到你的 ~/.claude/settings.json:
json{ "hooks": { "PreToolUse": [{ "matcher": "tool == \"Edit\" || tool == \"Write\"", "hooks": [{ "type": "command", "command": "~/.claude/skills/strategic-compact/suggest-compact.sh" }] }] } }
環境變數:
COMPACT_THRESHOLD - 第一次建議前的工具呼叫次數(預設:50)| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 14,376 | 9,861 | -31% | 1 | 1 | 0% | 2,552 | 2,405 | -6% | 0 | 0 | — |
case-02 | fail→pass | 11,055 | 8,175 | -26% | 1 | 1 | 0% | 2,011 | 1,980 | -2% | 0 | 0 | — |
case-03 | pass→pass | 22,177 | 15,880 | -28% | 1 | 1 | 0% | 3,880 | 3,334 | -14% | 0 | 0 | — |
case-04 | fail→pass | 6,003 | 8,268 | +38% | 1 | 1 | 0% | 887 | 1,902 | +114% | 0 | 0 | — |
case-05 | pass→pass | 9,768 | 9,723 | -0% | 1 | 1 | 0% | 1,613 | 2,357 | +46% | 0 | 0 | — |
case-06 | pass→pass | 8,439 | 4,135 | -51% | 1 | 1 | 0% | 1,356 | 1,204 | -11% | 0 | 0 | — |
case-07 | pass→pass | 7,809 | 8,195 | +5% | 1 | 1 | 0% | 1,120 | 1,801 | +61% | 0 | 0 | — |
case-08 | pass→pass | 9,305 | 4,978 | -47% | 1 | 1 | 0% | 1,351 | 1,313 | -3% | 0 | 0 | — |
case-09 | pass→pass | 10,473 | 5,779 | -45% | 1 | 1 | 0% | 1,550 | 1,388 | -10% | 0 | 0 | — |
case-10 | fail→pass | 9,214 | 4,808 | -48% | 1 | 1 | 0% | 1,375 | 1,273 | -7% | 0 | 0 | — |
case-11 | pass→pass | 10,544 | 3,414 | -68% | 1 | 1 | 0% | 1,682 | 1,127 | -33% | 0 | 0 | — |
case-12 | fail→pass | 13,942 | 2,258 | -84% | 1 | 1 | 0% | 2,318 | 866 | -63% | 0 | 0 | — |
case-13 | fail→pass | 9,014 | 2,136 | -76% | 1 | 1 | 0% | 1,284 | 941 | -27% | 0 | 0 | — |
case-14 | pass→pass | 4,612 | 2,008 | -56% | 1 | 1 | 0% | 673 | 821 | +22% | 0 | 0 | — |
case-15 | fail→pass | 11,181 | 5,618 | -50% | 1 | 1 | 0% | 1,637 | 1,423 | -13% | 0 | 0 | — |
case-16 | fail→pass | 16,126 | 11,659 | -28% | 1 | 1 | 0% | 2,182 | 2,313 | +6% | 0 | 0 | — |
case-17 | fail→pass | 16,052 | 1,860 | -88% | 1 | 1 | 0% | 2,677 | 857 | -68% | 0 | 0 | — |
case-18 | fail→pass | 6,117 | 2,834 | -54% | 1 | 1 | 0% | 1,061 | 986 | -7% | 0 | 0 | — |
case-19 | pass→pass | 6,401 | 2,248 | -65% | 1 | 1 | 0% | 1,044 | 936 | -10% | 0 | 0 | — |
case-20 | fail→pass | 12,433 | 1,908 | -85% | 1 | 1 | 0% | 2,033 | 832 | -59% | 0 | 0 | — |
case-21 | fail→pass | 7,895 | 6,175 | -22% | 1 | 1 | 0% | 1,316 | 1,520 | +16% | 0 | 0 | — |
case-22 | fail→pass | 11,511 | 4,902 | -57% | 1 | 1 | 0% | 1,558 | 1,265 | -19% | 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.