ClaudeCodeMod

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.

In Claude Code
/plugin marketplace add Singh-AP/awesome-claude-mods
/plugin install cost-meter@awesome-claude-mods
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
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

The author's GitHub homepage capture: cost-meter on the status line, with buddy, files-touched, aim and git-pulse
From the author's repo.

What it hooks into

  • session.startWhen a session starts
  • session.measureWhen usage is measured
  • turn.startWhen Claude starts a turn
  • turn.completeWhen a turn ends
  • ui.renderDraws into the sessionTurnDuration
  • prompt.submitWhen you send a prompt
  • tool.callAround a tool call, where it can hold one
  • command.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
Repo
Singh-AP/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

Other mods in Usage

session-meterarasovicDraws a pane of context by category, the 5-hour and 7-day windows and their pace, and the last 30 tool calls and model requests.cache-timerarasovicDraws a countdown above the prompt until the prompt cache expires, then how many tokens the next message writes again.turn-footerarasovicDraws tool calls, subagents, requests, tokens, and cache hit rate under each answer, and the running tool in the spinner.search-meterarasovicDraws a status line for the model's searches: green found on the first try, yellow found after misses, red found nothing.statusline-anywhereNathanABDraws the status line you already configured, in color, above the prompt in Claude Desktop. In a terminal it stays out of the way.statuspanexuanji86Draws a card above the prompt: model, context gauge, 5-hour and 7-day limits, directory, branch, and session cost. Press the gauge and confirm to run /compact.cache-taxkaranb192Keeps the one-hour prompt cache warm while you step away, and stops a send into a cold cache once with the estimated rewrite cost.token-optimizeralexgreenshDraws a status bar above the prompt in the desktop app: session quality, context fill, a cache countdown, and the 5-hour and weekly limits, with buttons to clean up, start fresh, or keep the cache warm.context-inspectorYeonwooSungDraws what fills the context window and how much of it is waste: re-reads, near-duplicate output, and what compaction kept, with advice and its evidence.heatmaphamzaferDraws a GitHub-style grid of your Claude Code time in a pane, one square per day, with your streak, peak hours, and top projects.openrouter-balancehamzaferDraws your OpenRouter credit above the prompt: the balance with a gauge, today's spend, and the model the money mostly went to.winnowGhalebDweikatReplaces parts of a large Read, Bash, or Grep result a judge calls unneeded with a stub, a summary, and a key that brings the text back, then toasts.
All 183 in Usage