cost-ledger
by bobtat · ★ 2 · updated today
Tracks what Claude Code costs — session, calendar-week and calendar-month totals with the month's pace and week-over-week change, a /costs pane with a spend calendar, the most expensive prompts and what filled the context, plus prompt-cache awareness: a cache warm/cold countdown, warnings before a prompt, model switch or large write re-caches the context, a per-category breakdown priced at...
Install
/plugin marketplace add bobtat/claude-plugins/plugin install cost-ledger@bobtat-pluginsThen run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.
What it hooks into
From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.
- Events
session.startclassic.SessionStartclassic.PreModelSwitchclassic.PostModelSwitchsession.endprompt.submitturn.startturn.stepturn.completetool.callsession.measurecommand.runui.render- API calls
$.clock.after$.clock.every$.clock.now$.command.register$.env.get$.fs.list$.fs.read$.fs.write$.model.fork$.process.run$.session.id$.session.root$.session.usage$.state.get$.state.set$.store.delete$.store.get$.store.keys$.store.set$.ui.open$.ui.resolve$.ui.status$.ui.toast- Draws
AbovePromptPane- Can see
classic hooksevery promptevery tool call- Reach
- level 2 of 3 other: $.state.getother: $.state.setruns processeswrites filesdrives Claudereads filesreads env varspersists statedraws
Origin
- How it got here
- Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
- Repository
- github.com/bobtat/claude-plugins
- Path in repo
plugins/cost-ledger- Source commit
077b4bbthe exact code the scan read- Author
- @bobtat
- License
- MIT
- First published
- Last pushed
- First listed here
Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.