Context Budget Manager
Claude Code doesn't fail gracefully near the context limit — it fails *suddenly*, dropping uncommitted work and quietly re-litigating decisions. The Context Budget Manager plans the work around the budget *before* it runs out, so a forced /compact never lands mid-thought.
What this skill does
This skill exists because of one specific failure mode: Claude Code quality doesn't degrade smoothly as context fills — it collapses suddenly. Instructions from early in the session fall out of view. Decisions get silently re-litigated. Uncommitted work gets forgotten. A forced auto-/compact can land in the middle of a half-finished change, dropping exactly the state you needed.
The fix isn't heroics near the limit — it's budgeting. The skill operates in three zones (green/amber/red) and gives different instructions for each. Green is normal work, but you're front-loading durable state — the plan, decisions, and constraints captured in a place that survives compaction. Amber is "stop starting things you can't finish before the next clean boundary." Red is "no new multi-step work, drive to a committed boundary fast, plan the compact on your terms."
Honest scope first. A markdown skill is instructions, not instrumentation. It can't read your true token count and the skill explicitly says so — anyone claiming a skill alone gives live telemetry is wrong. It acts on the signals that are available: your own reports, structural self-estimation (long transcript, many large file reads), and — if installed — injected <system-reminder> lines from the free open-source context-window-awareness plugin (MIT). The plugin supplies the signal; this skill supplies the judgement. Either works standalone; together they compose.
The skill is opinionated about durable state: every important decision, every plan, every "we're going to do X next" gets written to a place that survives a compact — usually a file, sometimes a commit message, sometimes a comment in code. The rule is: if losing this session would lose this fact, the fact isn't durable yet. That single discipline is what makes the difference between "compact and continue" and "compact and start over."
When this triggers
- ·You're starting a task you can already tell won't fit in one clean stretch
- ·The session has been running long and outputs are 'getting worse' or 'forgetting things'
- ·A forced /compact just happened mid-task and dropped work you needed
- ·You want to plan compaction at a committed boundary instead of having one forced on you
- ·You're pairing this skill with the free context-window-awareness plugin (which provides real signals)
Example
Trigger
User: 'we're at maybe 75% context, big refactor still ahead. how do we not lose this?'
Output
OK, we're Amber. Operating model: 1. STOP starting things we can't finish before the next clean boundary. 2. Land what's already in-flight — commit it, push it, capture state. 3. Write the durable handoff NOW (not after the compact): - what's done, with commit hashes - what's open, with file paths and the exact next action - any non-obvious decisions made this session 4. Plan a clean /compact at a committed boundary — your terms, not a forced one mid-edit. Specific next steps for *this* refactor: · Finish the file we're in (no new files) · Commit with a message that documents the partial state · Write the handoff doc to .claude/state/session-N.md · Then /compact — and the next session starts on durable state, not a guess at what we were doing
Get this skill + 15 more
Included in the The Solopreneur Stack — run a one-person empire. Save $110+ vs buying individually.
Get The Solopreneur Stack — $129What you get
- 110-line SKILL.md, ready to drop into ~/.claude/skills/
- Tested through 3 Karpathy-loop iterations (versions v1.0.0 → v1.3.0)
- Triggers automatically when relevant — no command to remember
- Lifetime updates as the skill is refined further
More from AI Foundations
Generates optimised CLAUDE.md project files that configure Claude Code for your specific workflow.
Step-by-step guidance for connecting any MCP server to Claude Code.
Recommends the right MCP servers for your use case from the full registry.
Takes vague prompts and rewrites them into precise, high-performing ones using a 6-layer framework.
Build your own Claude Code skills from scratch with guided templates.
Design multi-step AI workflows that chain tools and skills together.
Browse the full library
297 skills across 31 categories. One purchase, lifetime updates.
See all bundles