ClaudeMod
ModsContext & MemoryReads Files

usage-bar

Keeps your Claude usage in view: 5-hour and weekly rate limits with reset times, context fill and session cost in the status line, plus a /usage-bar pane with a 7-day token history and per-model breakdown. Toast when the 5h window passes 90%. English and pt-BR. Only observes session events; no network, no processes. For Pro/Max users who want to pace their quota.

Install· Claude Code 2.1.330+
$claude plugin marketplace add araujo-eduardo/claude-usage-bar
$claude plugin install usage-bar@claude-usage-bar
Run claude plugin validate to auditGuide →
Access & PermissionsReads Files

Reads local project files, settings, transcripts, or environment variables.

Reads env varsReads settingsReads mod statePersists local stateDraws UI

Statically scanned from hooks & source. Learn how to audit

Eduardo Araújo1 starsAdded 17 days ago

usage-bar

reach validates

Release License: MIT Claude Code mod Languages

English · Português (Brasil)

A Claude Code mod that shows where your tokens went this week: a pane with a 7-day token history and per-model totals, plus the 5-hour and weekly plan limits with reset times, context fill and session cost in the status line, and a heads-up when the 5-hour window passes 90%. Every number comes from Claude Code's own session events, and nothing leaves your machine.

The usage-bar pane: 5-hour and weekly limit bars with reset times, context and cost, and a 7-day token history with a per-model total; the status line below it

Install · What you see · What it can reach · Configure · Troubleshooting · What's new

Install

Inside Claude Code:

/plugin marketplace add araujo-eduardo/claude-usage-bar
/plugin install usage-bar@claude-usage-bar
/reload-plugins
/usage-bar
From the terminal, the desktop app, or a clone
claude plugin marketplace add araujo-eduardo/claude-usage-bar
claude plugin install usage-bar@claude-usage-bar

In the desktop app, where /plugin does not run: click + next to the prompt box, then Plugins, Add marketplace with araujo-eduardo/claude-usage-bar, then Add plugin.

Or load it straight from a clone, for one session:

git clone https://github.com/araujo-eduardo/claude-usage-bar
claude --plugin-dir ./claude-usage-bar

Mods are an early-access Claude Code feature and their API can change between releases. If something breaks, see Troubleshooting.

What you see

Status line

Always on, updated whenever a figure moves (no polling):

Two status lines: 5h 42% with reset 20:50, week 31%, context 12%, $0.64; and 5h 93% with reset 21:00, week 58%, context 41%, $3.12

5h 63% (20:50) · wk 58% · ctx 18% · $1.89
PartMeaning
5h 63% (20:50)share of the 5-hour window used, and when it resets
wk 58%share of the weekly window used
ctx 18%context window fill
$1.89session cost so far, as /cost totals it

Pane

/usage-bar opens it beside the transcript.

SectionShowsFrom
Limits5-hour and weekly bars with reset times; brand color below 70%, yellow from 70%, red from 90%session.measure, $.session.usage()
Sessioncontext fill and costthe same
Last 7 daysone bar per day, total tokens and turns, and a per-model breakdownturn.complete usage, kept in the plugin's store

A toast fires once per 5-hour window when usage passes 90%.

What it can reach

usage-bar only watches. Every hook passes its event on unchanged: it never denies, rewrites or delays a tool call, a prompt or a turn.

It seesThrough
rate-limit windows, context fill and costsession.measure, $.session.usage()
each turn's token usage and model id (not its text)turn.complete
Claude Code's language setting and LC_ALL / LANG, only when language is auto$.settings.read, $.env.get

What it keeps: a daily tally of tokens and turns per model, for 30 days, in the plugin's own store. It makes no network requests, runs no processes, reads and writes no files, and calls no model. claude plugin validate . prints exactly what it hooks and calls.

Configure

In /config, or under pluginConfigs["usage-bar@claude-usage-bar"].options in your user settings.json (usage-bar or usage-bar@inline with --plugin-dir).

OptionDefaultMeaning
languageautoen, pt-BR, or auto: Claude Code's language setting, then LC_ALL / LANG, then the system locale, else English
"pluginConfigs": {
  "usage-bar@claude-usage-bar": { "options": { "language": "pt-BR" } }
}

Notes and limits

  • Limits need a subscription. The 5-hour and weekly windows come from the API's rate-limit readings, so they only exist on a Claude plan (Pro/Max) and show — until the first response of the session. On an API key only context and cost show.
  • Tokens include cache reads and writes, so the totals look large.
  • History starts at install and only counts sessions where the mod is active.
  • Concurrent sessions share the store; the last write wins, so two sessions at once may each drop the odd turn.

Troubleshooting

/usage-bar does nothing or is unknown. Run /reload-plugins, or start a new session. Note the command is /usage-bar; claude-usage-bar is only the marketplace name.

The status line shows limits —. No API response has reported a rate limit yet in this session, or you are on an API key.

The language is wrong. Set language explicitly; auto falls back to English when nothing hints otherwise. Check the key in pluginConfigs matches how the plugin was loaded.

It loads twice. Remove any copy under ~/.claude/dev-mods/ once installed from the marketplace.

Still stuck? Look in the transcript for a dim line starting usage-bar: and open an issue with it.

How it works

FileHolds
hooks/register.tsxthe hooks, pure formatters, and the pane
hooks/i18n.tsstrings for en and pt-BR, and the auto language resolver
types/index.d.tsthe state contract
tests/status line, toast, history, pane drawing on two surfaces, and language selection
docs/media/src/the HTML the README images are rendered from

Related projects

Develop

claude --plugin-dir .            # load it; edits hot-reload
claude plugin validate .
claude plugin test .

Changes are listed in CHANGELOG.md.

License

MIT

Details

GitHub Stars
1
Sub-category
Context & Memory
License
MIT
Surfaces
terminal
Added
17 days ago
Last synced
today
Events hooked
session.startcommand.runsession.measureturn.completeui.render

Weekly Mods Digest

Top new Claude Code mods and install commands, once a week. No fluff, unsubscribe anytime.

More Mods

Claude Flightdeck
ModsSecurity

Claude Flightdeck

Live agent dashboard pane with context consumption, advisor timeline, permission verdicts, and subagent swimlanes.

Reads Files
by Sam Casella
GitHub
ModsInterface

Terminal Browser

Browse documentation, GitHub pull requests, and web pages in a split terminal pane directly beside your Claude Code conversation.

Network
by Zenbu Labs
GitHub
Agent Flow
ModsAutomation

Agent Flow

Interactive visual tree of the active session's subagents, background tasks, and teammates beside the transcript via /flow.

UI Only
by Charlie
GitHub

Command Palette

Search for a command to run...