Context Budget
Agent Buildingcontext-budgetContext Budget is an Agent Skill for agent building published in the Archive228/loopkit repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Keep the agent's context lean so accuracy doesn't collapse. Use on long sessions, big files, or when the agent starts hallucinating.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/Archive228/loopkit/blob/HEAD/skills/context-budget/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/context-budget, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Context Budget
More context is not better. Past a threshold, accuracy falls off a cliff (context rot).
- Don't dump whole files — read the relevant function/section, not the 2000-line module.
- Summarize, don't accumulate — replace a 200K-token transcript with a 4K recap of the load-bearing facts.
- Drop dead context — once a sub-task is done, its detail leaves the window. Keep the decision, drop the trace.
- State on disk, not in context — progress goes to a file the next turn re-reads, not into an ever-growing prompt. A bloated standing context (CLAUDE.md) taxes every single turn. Trim weekly. If the agent is confidently wrong, suspect the context before the model.