CB
Context Budget
🔵 Stable🕐 updated 2026-07-19
🔷 SkillSpec L3
pm-tokens
Plan a session's context window like the budget it is — what loads up front, what gets linked instead, what stays fetch-on-demand, and how to keep the stable prefix cache-friendly so repeated turns cost cents instead of dollars. Use when asked my agent keeps blowing its context, plan what to load into the session, why is every turn so expensive, or design the context for this workflow. Produces the load/link/fetch allocation, the cache-aware prefix layout, the per-turn cost shape, and the eviction rules for when the window fills anyway.
What to give it
▸The workflow — what the session does, how many turns it typically runs, what it touches (files, APIs, documents)
▸The candidate context — everything someone wants loaded: instructions, docs, schemas, examples, history — the raw wishlist the budget disciplines
▸The volatility map — which pieces change mid-session (edited files, growing history) and which never do (instructions, schemas) — the cache layout keys off this
▸The window and the pricing — the model's context size, and whether the provider prices cached input differently (most majors do — verify the current terms)
✅ The bar it holds itself to
Every skill in this library self-verifies — these are this skill's own quality checks, straight from its definition.
✓Every resident piece justified per-turn, not per-session
✓Reference material is linked via an index with a fetch route, not loaded wholesale
✓The layout puts nothing volatile above anything stable
✓Compression happens at the borders (crusher in, diet out)
✓The eviction order exists before the window fills, with recovery routes
⚠️ What it refuses to do
Do not load what a link can carry — residency is the most expensive real estate in the system
Do not put a timestamp at the top of a cached prefix — one volatile byte re-prices everything under it
Do not treat the window limit as the budget — the budget is per-turn cost × turns; the limit is just the wall
Do not evict the decisions log — history compresses, decisions don't; losing them re-litigates the session
Do not design for turn one — sessions are priced by their shape over time, and turn one is the cheapest turn there is
Install
npx pm-claude-skills add --agent claude # or codex · cursor · gemini · hermes
# or one-line MCP (every skill, any client):
claude mcp add pm-skills -- npx -y pm-claude-skills-mcp
Related skills
🔌 Embed this skill
Drop this on your blog, docs, or site — it renders a "Run this skill" card:
<div data-pm-skill="context-budget"></div>
<script src="https://mohitagw15856.github.io/pm-claude-skills/embed.js" async></script>
💬 Discussion
Context Budget is one of 750 open-source professional AI agent skills — all SkillSpec L3.
Try them all in the browser · ⭐ Star on GitHub · Browse the full catalog