context-budget

context-budget is a command for Claude Code from felvieira/claude-skills-fv. It costs 41 tokens per session (463 once invoked), scanned A, original, Apache-2.0.

A command that estimates how much of the conversation's context window is used by instructions, tools, rules, skills, and session history. It reports the estimated size of each part and available room.

In plain words
What is it for?
Use it to inspect context usage in a coding-agent session, especially before parallel or multi-agent work. It is also useful after installing tools or starting work in a repository with many agent instructions.
Why use it?
It helps explain slow or degraded responses caused by too much loaded context. It can also reveal the cost of adding a new tool or instruction set before running larger workflows.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md.

Part of the dev-team-kit-fv plugin — 72 skills, 45 commands, 16 agents, 5 hooks shipped together

Good fit Use it to inspect context usage in a coding-agent session, especially before parallel or multi-agent work. It is also useful after installing tools or starting work in a repository with many agent instructions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/felvieira/claude-skills-fv/context-budget
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.

Clone the repo
git clone --depth 1 https://github.com/felvieira/claude-skills-fv

Made for: Claude Code.

Or install dev-team-kit-fv, the plugin that ships this one along with the rest of its 72 skills, 45 commands, 16 agents, 5 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/felvieira/claude-skills-fv/context-budget/github.svg)](https://agentmods.dev/commands/felvieira/claude-skills-fv/context-budget)
Your own site
<a href="https://agentmods.dev/commands/felvieira/claude-skills-fv/context-budget"><img src="https://agentmods.dev/badge/commands/felvieira/claude-skills-fv/context-budget/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

Your own site · 80×15
<a href="https://agentmods.dev/commands/felvieira/claude-skills-fv/context-budget"><img src="https://agentmods.dev/badge/commands/felvieira/claude-skills-fv/context-budget.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 463 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.00041 $0.00463
Opus 5 $0.00020 $0.00231
Sonnet 5 $0.00008 $0.00093
Haiku 4.5 $0.00004 $0.00046

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

Security

Grade A, and why

context-budget 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 12d ago.

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.

commands/context-budget.md · 57 lines

What it actually says

/context-budget

Audita o overhead de contexto fixo e dinâmico da sessão atual.

Diferença do /savings: savings mostra tokens economizados pelo kit em runtime; context-budget mostra o que já está carregado no context window antes de qualquer completion.

O que faz

  1. Varre componentes fixos: CLAUDE.md (global + projeto), GLOBAL.md, agents/*.md, descrições de MCP ativos
  2. Varre componentes dinâmicos: rules ativadas nesta sessão, skills invocadas, histórico acumulado
  3. Estima tokens por componente (bytes ÷ 4, aproximação BPE)
  4. Reporta tabela com % do budget e headroom disponível
  5. Emite alertas se algum componente está inchado ou se o total ultrapassa 80% do context window

Quando usar

  • Sessão lenta ou com respostas degradadas (possível context overflow)
  • Após instalar novo MCP server — ver impacto real
  • Antes de /swarm ou /loop --parallel — garantir headroom suficiente
  • Repo novo com .bot/ — verificar o que foi instalado

Invocação

/context-budget

Skill carregada: dev-team-kit-fv:49-context-budget

Output esperado

## Context Budget — [repo] — [data]

### Fixo (~14.400 tokens, 72% do subtotal)
- CLAUDE.md global: ~2.400 tokens
- agents/ (16): ~8.000 tokens
- MCP servers (N): ~X tokens
...

### Dinâmico (esta sessão)
- rules/common/: ~3.200 tokens
- skills invocadas: ~N tokens
- histórico: ~N tokens

### Status: ✅ Saudável | ⚠️ Atenção | 🚨 Overflow iminente
### Headroom: X tokens (Y%)

### Recomendações (se houver)
...
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. 12d ago First seen · 57 lines · 41 tokens per session scan A f3e2132327e5

Subscribe to this mod's changes

context-budget is a command published in the GitHub repository felvieira/claude-skills-fv (23 stars, last pushed yesterday), licensed Apache-2.0. It adds 41 tokens to every session and 463 once invoked, about $0.0002 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-30.