Skip to content
Skill

Context budget

Routes context-window checks to native Codex or Claude Code meters; optional static audit

Context budget is an open-source agent skill for developer tools. It is available on Claude Code and Codex.

Scripts
None
Platforms
Claude Code, Codex
GitHub stars
66
Last commit
License
MIT
Listing updated

Similar skills

About Context budget

This skill answers questions about remaining context capacity or token usage by pointing the agent to the native live-context command of the active harness, such as /status in Codex or /context in Claude Code. It deliberately avoids scanning files or running shell commands for ordinary requests, since a skill cannot read live provider state itself.

When the user explicitly asks for an audit, the skill runs a bounded, read-only static inspection of a named plugin or install root and that harness's configuration files. It focuses on eager discovery metadata such as agent, skill and command descriptions, always-loaded instruction files and MCP tool schemas already present in a bounded manifest. Inventory output is capped, temporary logs are not written, and all figures are labelled as estimates of static configuration overhead rather than live usage.

The skill also documents an optional diagnostic that reports aggregate byte counts for a user-selected local JSONL file. It needs a harness that exposes these native commands and, for audits, access to the named configuration paths.

When your agent uses it

Routes live context checks to the native Codex or Claude Code meter without scanning files, and performs a bounded static component audit only when explicitly requested. Use for context-budget requests about remaining capacity or installed context overhead.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 2 files (6 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the rea-skills plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add smartworldarafath/REA_Skill
/plugin install rea-skills@smartworldarafath

Or copy only this skill to ~/.claude/skills/context-budget:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/context-budget &&
cp -R "$tmp/.agents/skills/context-budget" ~/.claude/skills/context-budget &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/context-budget inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/context-budget to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/context-budget &&
cp -R "$tmp/.agents/skills/context-budget" ~/.agents/skills/context-budget &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/context-budget inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/context-budget to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/context-budget &&
cp -R "$tmp/.agents/skills/context-budget" ~/.cursor/skills/context-budget &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/context-budget inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/smartworldarafath/REA_Skill.git --path .agents/skills/context-budget

Or copy the folder to ~/.gemini/skills/context-budget yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/context-budget:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/context-budget &&
cp -R "$tmp/.agents/skills/context-budget" ~/.copilot/skills/context-budget &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/context-budget inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git

Then copy REA_Skill/.agents/skills/context-budget into your agent's skills folder as context-budget. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Live context routing
Directs the agent to the native status or context command for the active harness rather than estimating usage.
Explicit static audit
Runs a read-only inspection of named install roots only when the user opts in.
Eager overhead estimates
Estimates token overhead from agent, skill and command descriptions loaded at discovery time.
Bounded inventory output
Caps listings at 50 entries per component class and summarizes the remainder.
Selected JSONL byte breakdown
Reports aggregate byte counts for a user-chosen session file without reading conversation text into output.
Optimization suggestions
Offers up to three recommendations to reduce static configuration overhead.

Good for

  • How much context window is left in my current Codex session?
  • Show my Claude Code context breakdown.
  • Audit the components installed in my Claude Code plugin root for heavy metadata.
  • Estimate how much eager discovery overhead my installed skills add.
  • Break down the attachment record size in a session JSONL file I select.

Context budget FAQ

Does the skill scan my files to measure context usage?

No. For ordinary context requests it does not call tools, read files or run shell commands; it replies with the native command for the active harness. File inspection happens only for an explicit audit or a file the user selects for the diagnostic.

What triggers the installation audit?

An explicit request such as the --audit flag or wording like 'audit installed components'. Phrases like 'context is heavy' do not trigger it, and --verbose only changes report detail.

Which harnesses are supported?

The routing table covers Codex CLI, the Codex app and Claude Code. For other or unknown harnesses the skill states that live state cannot be read and asks which harness is active.

Are the audit numbers exact token counts?

No. They are estimates of static configuration overhead, not provider-reported or live session context.

How do I install Context budget in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/context-budget to use it in all your projects, or to .claude/skills/context-budget in one project. Or install the rea-skills plugin, which includes it: /plugin marketplace add smartworldarafath/REA_Skill, then /plugin install rea-skills@smartworldarafath.

Does Context budget run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Context budget?

Claude Code and Codex. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Context budget?

The closest alternatives to Context budget are Principle guard the context window, Context strategy, Automation audit ops, Config gc and Vercel optimize.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from smartworldarafath/REA_Skill

  1. Guides building and auditing UI to WCAG 2.2 AA across web, iOS and Android

    • Open source
    • 66 GitHub stars
    • Developer tools
  2. Diagnoses agent and LLM stacks for hidden failures and ranks the fixes by severity

    • Open source
    • 66 GitHub stars
    • Developer tools
  3. Compare coding agents head-to-head on your own tasks by pass rate, cost and time

    • Open source
    • 66 GitHub stars
    • Developer tools
  4. Guides an agent to design tool sets, observations and error recovery for better completion

    • Open source
    • 66 GitHub stars
    • Developer tools
  5. Lets an AI agent make x402 payments within per-task budgets and spending policies

    • Open source
    • 66 GitHub stars
    • Finance and payments