eliyce/paqad-ai/context-budget-planner
Claude Code and agent skill by eliyce/paqad-ai
- community
Checking that the SKILL.md file is still in the repository.
Estimates the implementation phase's token footprint from spec, test plan and affected files, and recommends compaction before context runs out. Use when a graduated or full lane change moves from planning to implementation.
Install
npx vskill@latest install eliyce/paqad-ai/context-budget-plannerSKILL.md
The same SKILL.md was published earlier as eliyce/paqad-ai/context-budget-planner.
What It Does
Predicts the token footprint of the upcoming implementation phase before it starts. Reads spec size, test plan size, affected module docs, and known changed files; sums their token cost using the per-line weights in the heuristics reference; compares against the available budget; and recommends compaction when the estimate would push the session into the Amber or Red tier.
The point is to catch starvation before it happens, not after compaction has already evicted decisions mid-task.
Use This When
Once at the boundary between planning and implementation in the graduated and full lanes: after acceptance criteria and test plan exist, before the first source file is opened. Skip in the fast lane; the overhead is not justified for low-complexity work.
Inputs
- Read the active spec at
spec_pathfirst. - Read
test_plan_pathwhen supplied. - Read each module doc in
affected_module_doc_pathsonly enough to compute its line count. - Read
references/budget-heuristics.mdbefore applying any threshold so the per-line weights and tier boundaries stay consistent across runs.
Procedure
- Determine the project's model context window (from project profile) and committed tokens (default 200000 / 30000 if not declared).
- Pick per-line weights from
references/budget-heuristics.md(orassets/weights.default.txtif the project has none yet). - Pipe
<weight> <path>rows intoscripts/estimate-tokens.sh --available <N> --committed <N>: it line-counts, multiplies, sums, picks the tier, and emits the markdown block. - When the script reports Amber or Red, fill the compaction list using the priority order from
references/budget-heuristics.md. - Validate the final output with
scripts/lint-output.sh.
Output Contract
- Match
assets/output.template.md:## Context Budget, singleSummary:line,### Per-Artifact Estimatetable,### Recommended Compactions. - Green/Yellow →
Recommended Compactions: noneexactly. Amber/Red → ordered list with one-line reasons. - Output must pass
scripts/lint-output.sh(exit 0).
Escalate / Stop Conditions
- Ask when the project profile declares no model context window and the default would clearly overcommit.
- Warn when
Tier: redis reached even after applying every available compaction: implementation should be split into smaller stories rather than starting with no headroom. - Do not recommend evicting the active spec, the rules constitution, the project profile, or the active decision packet under any tier.
Resources
references/budget-heuristics.mdscripts/estimate-tokens.shscripts/lint-output.shassets/output.template.mdassets/weights.default.txtagents/openai.yaml
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingruntime/base/skills/context-budget-planner/SKILL.md
Popularity
- Repository stars
- 8
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/eliyce/paqad-ai/context-budget-planner)