Lunik/gmz-claude-marketplace/tree/master/usage-tracker
usage-tracker
Claude Code plugin adding a bottom-grid row that shows your subscription plan and session/week usage windows with threshold toasts.
About this mod
usage-tracker is a Claude Code marketplace plugin that renders a bottom-right grid row showing your plan (from claude auth status) alongside 5-hour session and 7-day week usage bars. Bars use 10 cells and shift green/orange/red at 80%/90%, with toasts fired on first crossing each threshold (rearmed after reset). Session refreshes per model request; week and plan refresh per turn. At startup it queries the Anthropic OAuth usage endpoint (token read from the macOS keychain in a child python3 process, sent only to api.anthropic.com) to prefill empty windows; the engine's own values replace those once responses arrive. Non-macOS or failed lookups keep bars at - until the first response.
Installation
Check the author's README for the marketplace and plugin name first. Commands may change as the repository evolves.
claude plugin marketplace add Lunik/gmz-claude-marketplace claude plugin install usage-tracker
Original text / README
usage-tracker
Shows your Claude subscription plan and how much of the 5-hour (session) and 7-day (week) usage windows you have used.
Claude Pro ┃ session ▰▰▰▱▱▱▱▱▱▱ 32% ┃ week ▰▰▰▰▰▰▰▰▱▱ 82%
Behavior
- Row in the bottom-right grid. Bars have 10 cells, colored green below 80%, orange from 80%, red from 90%.
- Toast when a window first crosses 80% and again at 90%. The toast rearms after the window resets.
- The plan label comes from
claude auth status(Claude Pro,Claude Max, ...),Claudeif unknown. sessionrefreshes after every model request,weekand the plan after every turn.- Shows
-and empty bars until data is available.
Startup data
Rate limits normally arrive with the first API response. To show them earlier, the plugin queries https://api.anthropic.com/api/oauth/usage at session start and on the first render:
- The OAuth token is read from the macOS keychain (
Claude Code-credentials) inside a childpython3process, so it never appears in a command line, and is sent only toapi.anthropic.com. - Values from this call only fill empty windows. The engine's own figures replace them once a response arrives.
- On other platforms, or if the lookup fails, the bars stay at
-until the first response.
Requirements
claude on PATH (plan lookup). macOS and python3 for the startup fetch.
