$npx -y skills add Archive228/loopkit --skill context-budgetKeep the agent's context lean so accuracy doesn't collapse. Use on long sessions, big files, or when the agent starts hallucinating.
| 1 | # Context Budget |
| 2 | More context is not better. Past a threshold, accuracy falls off a cliff (context rot). |
| 3 | - **Don't dump whole files** — read the relevant function/section, not the 2000-line module. |
| 4 | - **Summarize, don't accumulate** — replace a 200K-token transcript with a 4K recap of the load-bearing facts. |
| 5 | - **Drop dead context** — once a sub-task is done, its detail leaves the window. Keep the decision, drop the trace. |
| 6 | - **State on disk, not in context** — progress goes to a file the next turn re-reads, not into an ever-growing prompt. |
| 7 | A bloated standing context (CLAUDE.md) taxes every single turn. Trim weekly. If the agent is confidently wrong, suspect the context before the model. |