ClaudeCodeMod

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.

In Claude Code
/plugin marketplace add melodic-software/claude-code-plugins
/plugin install context-budget@melodic-software
Open the repo

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

The context-budget section on the author's GitHub page
Screenshot of the author's GitHub page.

What it hooks into

  • session.startWhen a session starts
  • session.endWhen a session ends
  • prompt.submitWhen you send a prompt
  • command.runWhen you run its slash command
  • session.measureWhen usage is measured
  • ui.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:check
  • PreToolUse · 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
Repo
melodic-software/claude-code-plugins
Folder
plugins/context-budget
Version
0.12.1
License
MIT
Repo stars
26
Last change
2026-10-18
Language
Shell
Files
80

Same repo on other shelves

Skills

  1. 20728design-thinkingmelodic-software/claude-code-plugins264
  2. 22318plantuml-syntaxmelodic-software/claude-code-plugins212
  3. 23438architecture-documentationmelodic-software/claude-code-plugins181

Marketplaces

  1. 658melodic-software/claude-code-pluginsmelodic-software/claude-code-pluginsClaude Code plugin marketplace: repo-agnostic skills, hooks, agents, and MCP servers.32

Other mods in Usage

extra-modsJhonatan-de-SouzaDraws a menu for Zen, themes, model and effort, and a status line of context, plan limits, and cache.jevNasrallah-ALHas Jev drop stale tool calls at compaction and keep the rest word for word, toasts what it kept, and adds slash commands for the jev CLI.decknvr0x5Draws a collapsible panel above the prompt for the plan, context, the 5-hour and 7-day limits, and a small pet.desktop-statuslinecentminmodDraws a status band above the prompt in the Desktop app's Code tab, with context, plan limits, and the last turn.pixel-buddyhamymarnieDraws the 5-hour and 7-day usage above the prompt, with what each window cost, a cache timer, and a pixel creature.account-rotatorivokundDraws each account's usage under the prompt, and can move the session to another account as a limit fills.usage-bandJetsonChanDraws one line above the prompt for the 5-hour and 7-day limits, the context, and the last turn's cache hit.burn-meterOneWave-AIDraws session spend as a fuse above the prompt, with the plan limits and a cost in burritos and McDoubles.cache-warmerpaulbkim-devResends the last request to keep the prompt cache warm when that saves at least $0.05, and draws a band with Clawd while it runs.token-weather-usageaugiefraDraws a band above the prompt for context size, the 5-hour and weekly limits, cache warmth, session cost, and running agents.agent-dietVedantAndhaleStarts Explore subagents, and other agent types you list, on Haiku or a model you pick instead of the main model, and counts how many it moved.budget-guardVedantAndhaleKeeps a prompt from being sent while the 5-hour or weekly usage is at or over your limit, until you send it again, and shows the limit with /budget.
All 183 in Usage