Skip to content
claudemods

Claude Code Usage Mods: Context, Quota and Cost

Claude Code usage mods show context-window fill, 5-hour and 7-day plan usage, session cost and tool counts, so limits and compactions do not surprise you.

Context Meter running in Claude Code

Context Meter

Context-window fill, 5-hour and 7-day plan usage and session cost in the status line, plus a warning near the limit.

  • status
  • toast
  • Changes the UI

tested with v2.1.291

Tool Call Counter running in Claude Code

Tool Call Counter

Counts Claude's tool calls per turn and session, shows the count by the spinner, and adds /tally for a breakdown.

  • spinner
  • transcript
  • status
  • Intercepts tool calls
  • Changes the UI
  • Adds commands/tools

tested with v2.1.291

Claude Code usage mods keep the numbers that limit your session in view: how full the context window is, how much of the 5-hour and 7-day plan windows you have used, what the session has cost so far, and how many tool calls Claude made. You see a compaction or a rate limit coming instead of hitting it mid-task.

Where do Claude Code usage mods get their numbers?

The main source is $.session.usage(). It returns startedAt, context (tokens, window size and percent), rateLimits (one entry per plan window with percentUsed) and cost. Called without a breakdown it makes no request, so a mod can read it after every turn for free. Mods usually refresh on turn.complete, on session.compact, and on a slow $.clock.every timer, then write the result with $.ui.status.

session.measure fires after each turn and whenever plan usage changes, which suits mods that react to a threshold. Activity counters, such as a tool-call tally, count tool.call events and keep the totals in $.state. The mods reference describes the usage object.

What should you check before installing one?

A usage display should need very little: Changes the UI and nothing else is the norm. If a usage mod shows Network, it is sending your numbers somewhere; find out where. Calls the model on a usage mod is a red flag, since it would spend the quota it claims to track.

Check how it handles missing data. Before the first response there is no context figure yet, and on an API key there are no plan windows. A careful mod leaves those parts out rather than showing a misleading zero. Also check whether a warning toast fires once per threshold or on every refresh.

How to act on the numbers

When context passes about 80 percent, run /compact with a short note about what to keep, or /clear and start fresh with a summary. When a 5-hour window is high, move long jobs to later or to a smaller model. Usage mods do not change limits; they give you the warning early enough to choose.

FAQ

Does reading usage cost tokens?
Not when a mod calls $.session.usage() without a breakdown. It returns figures Claude Code already tracks. Asking for a breakdown sends a token-counting request.
Why does a usage mod show no 5-hour or 7-day figure?
Plan usage windows exist only for subscriptions. With an API key there are no rate-limit windows to show, so a good mod leaves them out instead of printing zero.
Is the cost figure the same as /cost?
It comes from the same session usage data that /cost totals, in US dollars. It is an estimate for the session, not your bill.