All shelves / Mods / Usage
context-budget
By melodic-software
context-budget is a Claude Code usage mod by melodic-software.
Draws the session's context by category, in a pane or a band above the prompt, and asks before a settings file is written.
DrawsHolds a command
Install
The marketplace name is melodic-software.
/plugin marketplace add melodic-software/claude-code-plugins /plugin install context-budget@melodic-software
It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.
- Version
- 0.12.1
- License
- MIT
- Repo stars
- 26
- Last change
- 2026-10-18
What it can reach
- Draws in the session
- Reads usage or context figures
- Holds a command
- Sees tool calls
- Calls another program on this machine
Needs node, and Claude Code 2.1.287 or later for the live breakdown. Tested on 2.1.296. The hook launches node by bare name, and the audit measures against the claude CLI. /context-budget live opens a pane, or a band of up to 5 rows above the prompt, with each category's tokens and share of the window. Off shows nothing and measures nothing. The mod reads Claude Code's local estimate of the breakdown, with no network call. A PreToolUse checkpoint asks when Write, Edit, or NotebookEdit targets a Claude Code settings file, so those edits prompt even in auto mode. It is a checkpoint, not a guarantee: it does not refuse the write. Shell writes and files rendered into place are not seen. With the fix argument, a guided walkthrough may edit project settings after you approve each diff. User-global settings are only ever printed. An optional Agent SDK install needs network, and that is the operator's call. The README does not say the breakdown leaves the machine.
The marketplace name is melodic-software, the same marketplace as display-redaction. The settings checkpoint holds the edit for your answer. It does not refuse it.
Demo

What it hooks into
session.startWhen a session startssession.endWhen a session endsprompt.submitWhen you send a promptcommand.runWhen you run its slash commandsession.measureWhen usage is measuredui.renderDraws into the sessionPaneAbovePrompt
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Hooks 2
SessionStart · startup|resume|clear|forksh "${CLAUDE_PLUGIN_ROOT}/lib/prerequisites.sh" node-notice /context-budget:check; ${PPID:+exit}; powershell -NoProfile -ExecutionPolicy Bypass -File "${CLAUDE_PLUGIN_ROOT}/lib/prerequisites.ps1" node-notice /context-budget:checkPreToolUse · Write|Edit|NotebookEditnode
Files
The author's README and source, 4 files. They load when you open them.
Facts
- Author
- melodic-software
- Category
- Usage
- Marketplace
- melodic-software
- Folder
- plugins/context-budget
- Version
- 0.12.1
- License
- MIT
- Repo stars
- 26
- Last change
- 2026-10-18
- Language
- Shell
- Files
- 80