# Context budget

> Context budget is an open-source agent skill for developer tools. Routes context-window checks to native Codex or Claude Code meters; optional static audit. It is available on Claude Code and Codex.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex
- **Website:** https://github.com/smartworldarafath/REA_Skill/tree/main/.agents/skills/context-budget
- **Repository:** https://github.com/smartworldarafath/rea_skill
- **GitHub stars:** 66
- **License:** MIT
- **Skill name:** context-budget
- **Collection:** https://github.com/smartworldarafath/REA_Skill
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

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.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/smartworldarafath/REA_Skill/tree/HEAD/.agents/skills/context-budget)
- [License: MIT](https://github.com/smartworldarafath/REA_Skill/tree/HEAD/.agents/skills/context-budget)

## Features

- **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.

## Install

### Claude Code

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

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

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

```sh
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.

### Codex

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

```sh
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.

### Cursor

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

```sh
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.

### Gemini CLI

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

```sh
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.

### VS Code

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

```sh
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.

### Other agents

Get the folder:

```sh
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.

## 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.

## Alternatives

- [Principle guard the context window](https://ai-powered.com/skills/principle-guard-the-context-window): Principle guard the context window is an open-source agent skill for developer tools.
- [Context strategy](https://ai-powered.com/skills/context-strategy): Context strategy is an open-source agent skill for developer tools.
- [Automation audit ops](https://ai-powered.com/skills/automation-audit-ops): Automation audit ops is an open-source agent skill for developer tools.
- [Config gc](https://ai-powered.com/skills/config-gc): Config gc is an open-source agent skill for developer tools.
- [Vercel optimize](https://ai-powered.com/skills/vercel-optimize): Vercel optimize is an open-source agent skill for cloud and infrastructure.
- [Lifecycle audit](https://ai-powered.com/skills/lifecycle-audit): Lifecycle audit is an open-source agent skill for developer tools.
- [Context map](https://ai-powered.com/skills/context-map): Context map is an open-source agent skill for developer tools.
- [Autonomous agent harness](https://ai-powered.com/skills/autonomous-agent-harness): Autonomous agent harness is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/context-budget
