All shelves / Mods / Usage
cost-meter
By Singh-AP
cost-meter is a Claude Code usage mod by Singh-AP.
Draws session cost, context fill, and the 5-hour and 7-day windows on the status line, plus each turn's cost. An optional budget asks before the next tool call.
DrawsHolds a command
Install
The marketplace name is awesome-claude-mods.
/plugin marketplace add Singh-AP/awesome-claude-mods /plugin install cost-meter@awesome-claude-mods
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
- 1.0.0
- License
- MIT
- Repo stars
- 3
- Last change
- 2026-10-04
What it can reach
- Draws in the session
- Reads usage or context figures
- Holds a command
Claude Code 2.1.287 or later. The mod is live once you run /reload-plugins or start a new session. The status line shows only what the session reports: session cost, context fill, and the 5-hour and 7-day windows on a subscription plan. Under the line that closes each turn, a dim line shows what the turn cost, subagents included, in the terminal only. A toast warns at 70%, 85%, and 95% context, once each until a /compact. /spend shows the session total, context, rate limits with reset times, the most expensive turn, and the last 10 turns. A budget, off until you set budgetUsd or run /spend budget 5, asks Keep going or Stop here at the next tool call each time the session passes another multiple of it; Stop refuses the call and tells the model to wrap up, a new prompt is held once and put back in the box, and a headless run stops. /spend budget off clears it.
The marketplace, Singh-AP's awesome-claude-mods, holds the 21 mods built there, tool-radar, files-touched, test-pulse among them, and 26 community and Anthropic mods pinned to a commit. This one installs on its own. Knowing what a session costs is why this page files it under usage. usage-meter, by hamzafer, draws the 5-hour and 7-day plan limits as small bars above the prompt, with the reset countdown and what this session cost. token-ledger, by Arunjay4213, pins this session's cost and the last turn's tokens and cache hit, and /ledger lists each turn. This one adds a budget that asks before more tool calls. The README says the cost is the session's own ledger, as /cost reports it, so on a subscription it is what the usage would cost at API prices, not a bill; rate-limit windows appear only once an API response reports them; and turns from before an install or a --resume show no cost. It draws its turn cost beside Claude Code's own closing line, so it stacks with spinner-packs. Its plugin.json names awesome-claude-mods as its author, and Singh-AP owns the marketplace.
Demo
What it hooks into
session.startWhen a session startssession.measureWhen usage is measuredturn.startWhen Claude starts a turnturn.completeWhen a turn endsui.renderDraws into the sessionTurnDurationprompt.submitWhen you send a prompttool.callAround a tool call, where it can hold onecommand.runWhen you run its slash command/spend
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Slash commands 1
/spendcost-meter: what this session has cost, turn by turn; /spend budget <usd> sets a budget
Files
The author's README and source, 4 files. They load when you open them.
Facts
- Author
- Singh-AP
- Category
- Usage
- Marketplace
- awesome-claude-mods
- Folder
- mods/cost/cost-meter
- Version
- 1.0.0
- License
- MIT
- Repo stars
- 3
- Last change
- 2026-10-04
- Language
- TypeScript
- Files
- 7