context-budget

context-budget is a plugin for Claude Code from melodic-software/claude-code-plugins. Its token cost is not measured, scanned A, original, MIT.

A measurement tool for the fixed startup information that Claude Code loads before working, including the space used by individual built-in tools.

In plain words
What is it for?
Use it to measure context usage, compare settings before and after changes, and keep a record of the measured differences.
Why use it?
It shows which settings or tools consume the available conversation context, so you can make informed configuration changes instead of guessing.

Plugin for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: names the NotebookEdit tool; mentions Claude Code.

Good fit Use it to measure context usage, compare settings before and after changes, and keep a record of the measured differences.

Compare 6 plugins from other repositories ↓
Install in Claude Code
/plugin marketplace add melodic-software/claude-code-plugins
/plugin install 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/melodic-software/claude-code-plugins

Made for: Claude Code.

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/plugins/melodic-software/claude-code-plugins/context-budget/github.svg)](https://agentmods.dev/plugins/melodic-software/claude-code-plugins/context-budget)
Your own site
<a href="https://agentmods.dev/plugins/melodic-software/claude-code-plugins/context-budget"><img src="https://agentmods.dev/badge/plugins/melodic-software/claude-code-plugins/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/plugins/melodic-software/claude-code-plugins/context-budget"><img src="https://agentmods.dev/badge/plugins/melodic-software/claude-code-plugins/context-budget.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session not measured What this adds to a session before it is invoked.
When invoked not measured Not applicable: nothing here is loaded into a session.
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.
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 2d 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.

plugins/context-budget/.claude-plugin/plugin.json · 37 lines

What it actually says

{
  "name": "context-budget",
  "version": "0.12.0",
  "description": "Measures a Claude Code session's fixed startup context payload per item at a pinned binary version, including per-tool attribution of the built-in tool pools that /context reports only as totals, derived by A/B deny differencing. Falls back from an SDK meter to a headless /context parser, then to an error rather than a wrong number. Keeps a before/after ledger per lever. Shows a live context breakdown in a pane or above the prompt. Report-only by default; fix applies one approved project trim.",
  "author": {
    "name": "Melodic Software",
    "email": "[email protected]"
  },
  "license": "MIT",
  "types": "./types/index.d.ts",
  "userConfig": {
    "settings_write_ask_enabled": {
      "type": "boolean",
      "title": "Settings-write-ask hook",
      "description": "Runs the PreToolUse hook that asks before Write, Edit, and NotebookEdit calls aimed at a Claude Code settings file. On by default. Shell writes and files rendered into place are outside its matcher.",
      "default": true
    },
    "live_display": {
      "type": "string",
      "title": "Live context display",
      "description": "Where the live context breakdown shows. pane opens it in a pane when you run /context-budget live; band keeps it above the prompt; off shows nothing and measures nothing. /context-budget live pane, band or off changes it for the session.",
      "default": "pane",
      "options": ["pane", "band", "off"]
    }
  },
  "keywords": [
    "context-window",
    "startup-payload",
    "token-budget",
    "tool-schemas",
    "measurement",
    "attribution",
    "ledger",
    "skill"
  ]
}
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. 2d ago Changed c01fded028bb
  2. 4d ago Changed · +8 lines 7cbd5f74017b
  3. 6d ago Changed 61b219fc28f4
  4. 8d ago Changed 371fdf652396
  5. 11d ago Changed 8842c14b4ae7
  6. 12d ago Changed · -1 lines 1adfdfd76893
  7. 13d ago Changed 60f944950abe
  8. 14d ago Changed d32e02071e8f
  9. 15d ago Changed 02910345ec7d
  10. 16d ago First seen · 30 lines scan A fabeb1837020

Subscribe to this mod's changes

context-budget is a plugin published in the GitHub repository melodic-software/claude-code-plugins (25 stars, last pushed today), licensed MIT. Its token cost is not measured: this kind of file is read by the harness, not the model. 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.