ccdwyer/budget-governor

세션 및 일일 지출 상한을 강제하는 Claude Code mod입니다. 프롬프트 위에 실시간 게이지를 표시하고 80%에서 마무리를 재촉하며 상한에 도달하면 새 프롬프트를 거부합니다.
ccdwyer/budget-governor

Budget Governor는 지출을 표시하기만 하지 않고 지출 상한을 강제합니다. 프롬프트 위에 채움 막대를 그려 세션 및 일일 지출, 지난 1시간의 $/hr 소모 속도, 턴별 비용 스파크라인을 보여 줍니다. 상한의 80%를 넘으면 각 프롬프트에 모델이 간결하게 마무리하도록 요청하는 알림이 붙고, 100%가 되면 새 프롬프트를 거부합니다(예약, 릴레이, 백그라운드 작업 프롬프트 포함). 단 /budget 같은 실제 슬래시 명령은 계속 사용할 수 있습니다. 상한을 넘은 턴에는 중지하고 요약하라는 도구 호출을 한 번 거부하며, 계속 도구를 호출하면 턴을 끝냅니다. 일일 지출은 공유 저장소를 통해 세션 간에 집계되고 상한별로 유지됩니다. 검사나 상한 읽기에 실패하면 mod는 안전하게 거부합니다. 명령: /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