ccdwyer/budget-governor

セッションと日次の支出上限を強制する Claude Code mod です。プロンプト上にライブゲージを表示し、80% で締めくくりを促し、上限に達すると新しいプロンプトを拒否します。
ccdwyer/budget-governor

Budget Governor は支出を表示するだけでなく、支出上限を強制します。プロンプトの上にフィルバーを描画し、セッションと日次の支出、直近 1 時間の $/hr の消費ペース、ターンごとのコストスパークラインを表示します。上限の 80% を超えると、各プロンプトにモデルへ簡潔な完了を求める通知を付けます。100% では新しいプロンプトを拒否します(スケジュール済み、リレー済み、バックグラウンドタスクのプロンプトも含む)が、/budget のような実際のスラッシュコマンドは使用できます。上限を超えたターンでは、停止して要約するよう求めるツール呼び出しを 1 回拒否し、ツール呼び出しを続けるとターンを終了します。日次支出は共有ストアを通じてセッション間で集計し、上限ごとに永続化します。チェックまたは上限の読み取りに失敗した場合、mod は fail closed になります。コマンド:/budget、/budget session 5、/budget day 20、/budget raise 5、/budget off。ccdwyer/claude-mods マーケットプレイスからインストールします。ネットワークアクセスもテレメトリもなく、完全にローカルで動作します。MIT ライセンスです。
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add ccdwyer/budget-governor claude plugin install budget-governor

A Claude Code mod that enforces spending caps instead of just showing them.
$3.20 / $10 today · $1.10 / $5 session, the burn rate in $/hr over the last hour of turns, and a sparkline of what each recent turn cost./budget stays available. That includes skills and /compact, which do cost money. Text that only starts with a / is gated like any other prompt./clear starts a new session with its own count, but its spend still adds to today's total. Resuming a session that began on an earlier day doesn't count its earlier spend against today. That earlier spend does still count toward its session cap. Session totals are kept for a year, so resuming an old conversation doesn't earn it a fresh session allowance.| Command | Effect |
|---|---|
| /budget | Show session and daily spend against the caps |
| /budget session 5 | Cap this session (and later ones) at $5 |
| /budget day 20 | Cap all sessions combined at $20 per local day |
| /budget raise 5 | Raise whichever cap is blocking by $5 |
| /budget off | Remove all caps |
Caps are saved and carry over to later sessions. Costs are what Claude Code's /cost reports. They're booked as they're observed (at every prompt and turn end, and once a minute), so a turn that runs past midnight counts toward the new day. If the host stops reporting cost, the gauge says so, and caps keep being enforced against the last recorded spend.
/plugin marketplace add ccdwyer/claude-mods
/plugin install budget-governor@ccdwyer-mods
/reload-plugins
claude plugin validate .
claude plugin test .
Events this mod hooks, as claude plugin validate reads the module:
session.startsession.endcommand.run{command=budget}turn.startturn.completeprompt.submittool.callui.render{component=AbovePrompt}Engine calls it makes: $.clock.after, $.clock.every (via setUp), $.clock.now, $.clock.sleep, $.command.list (via isCommand), $.command.register (via setUp), $.session.id (via refresh, settled), $.session.usage (via refresh, settled), $.state.get, $.state.set, $.store.delete, $.store.get, $.store.keys, $.store.set (via refresh, setCap), $.turn.abort, $.ui.resolve, $.ui.toast.
A tool.call hook sits in the middle of every tool call: it can see the call, refuse it, or add context to its result. This mod uses that only for the behaviour described above.
It runs entirely on your machine. It sends nothing over the network. It reads the session's cost from Claude Code and keeps a daily ledger in Claude Code's local plugin store.
The mod collects no analytics or telemetry, and its author receives no data from it.
Full policy: PRIVACY.md.
MIT