context-budget-planner

context-budget-planner is a skill for Codex from Eliyce/paqad-ai. It costs 29 tokens per session (787 once invoked), scanned A, original, MIT.

A planning check that estimates how much model context an implementation will need from the specification, tests, documentation, and changed files. Model context is the amount of project information an agent can work with in one session.

In plain words
What is it for?
Use it between planning and implementation in larger work to estimate the token load and decide whether the session needs compaction.
Why use it?
It warns when a task may exceed the available context, helping the team shorten or reorganize material before important decisions are lost.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it between planning and implementation in larger work to estimate the token load and decide whether the session needs compaction.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/eliyce/paqad-ai/context-budget-planner
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Eliyce/paqad-ai --skill context-budget-planner
Clone the repo
git clone --depth 1 https://github.com/Eliyce/paqad-ai

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for context-budget-planner

README.md
[![agentmods](https://agentmods.dev/badge/skills/eliyce/paqad-ai/context-budget-planner/github.svg)](https://agentmods.dev/skills/eliyce/paqad-ai/context-budget-planner)
Your own site
<a href="https://agentmods.dev/skills/eliyce/paqad-ai/context-budget-planner"><img src="https://agentmods.dev/badge/skills/eliyce/paqad-ai/context-budget-planner/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for context-budget-planner

Your own site · 80×15
<a href="https://agentmods.dev/skills/eliyce/paqad-ai/context-budget-planner"><img src="https://agentmods.dev/badge/skills/eliyce/paqad-ai/context-budget-planner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 787 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.00787
Opus 5 $0.00015 $0.00394
Sonnet 5 $0.00006 $0.00157
Haiku 4.5 $0.00003 $0.00079

Measured 11d ago against content hash 4e7c0307f277, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

context-budget-planner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/estimate-tokens.sh, scripts/lint-output.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

runtime/base/skills/context-budget-planner/SKILL.md · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

Use this 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_path first.
  • Read test_plan_path when supplied.
  • Read each module doc in affected_module_doc_paths only enough to compute its line count.
  • Read references/budget-heuristics.md before applying any threshold so the per-line weights and tier boundaries stay consistent across runs.

Procedure

  1. Determine the project's model context window (from project profile) and committed tokens (default 200000 / 30000 if not declared).
  2. Pick per-line weights from references/budget-heuristics.md (or assets/weights.default.txt if the project has none yet).
  3. Pipe <weight> <path> rows into scripts/estimate-tokens.sh --available <N> --committed <N> — it line-counts, multiplies, sums, picks the tier, and emits the markdown block.
  4. When the script reports Amber or Red, fill the compaction list using the priority order from references/budget-heuristics.md.
  5. Validate the final output with scripts/lint-output.sh.

Output Contract

  • Match assets/output.template.md: ## Context Budget, single Summary: line, ### Per-Artifact Estimate table, ### Recommended Compactions.
  • Green/Yellow → Recommended Compactions: none exactly. Amber/Red → ordered list with one-line reasons.
  • Output must pass scripts/lint-output.sh (exit 0).

Read the full file on GitHub · 76 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 76 lines · 29 tokens per session scan A 4e7c0307f277

Subscribe to this mod's changes

context-budget-planner is a skill published in the GitHub repository Eliyce/paqad-ai (8 stars, last pushed today), licensed MIT. It adds 29 tokens to every session and 787 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.