# usagemax > Claude Code plugin for the Code tab of Claude Desktop. Shows how much of the Claude 5-hour window and the weekly usage limit each request and each chat used. usagemax runs inside Claude Code as a function-hook mod. It records each request's tokens and the account's limit readings, prices tokens by Anthropic's list prices, and turns cost into a share of each window with one account-wide rate learned over 7 days. All data stays on the computer. ## Features - Line under each answer: `◑ Used: +5.2%/+0.43% 121K Tok · 2.4M cached` (share of the 5-hour window, share of the week, tokens sent and written, tokens read from the prompt cache). A share never exceeds the counter's growth during the request plus one point. Optional colours: yellow from 3% of the window, red from 6%. - Band above the prompt: an orange chip with this chat's share of the current 5-hour window, the 5-hour window and the week with bars, percent and time to reset, and an estimate when either limit would run out before its reset at the recent pace. Clicking the band opens the panel. It refreshes every minute from every Code chat's newest reading. - Panel: 5-hour and weekly limits (used and left, time passed, time to reset), 7-day trend, hour-by-day heatmap, this chat's total and heaviest request, model split, top chats for the hour, today, yesterday, the 5-hour window or the week, an Other row for the Chat tab and other devices, the signed-in account's email, and a Reset statistics button (two presses; the rate stays). - Toasts: 5-hour window at 80% and 90%, weekly limit at 80%, window runs out before the reset, one chat over 10% of the window in an hour. - Commands: `/usagemax`, `/usagemax top [hour|today|yesterday|5h|week]`, `/usagemax chat`, `/usagemax hour`. ## Install ``` claude plugin marketplace add Aristosya/usagemax claude plugin install usagemax@usagemax --scope user ``` ## Facts - Platform: Claude Desktop, Code tab. Tested with Claude Code 2.1.304 on Windows 11. - Needs a Claude subscription with the 5-hour and weekly limits, such as Pro or Max. On a plan with the weekly limit alone, the chip, the line and the panel show weekly shares. API-key sessions get tokens only. - Storage: `%USERPROFILE%\.claude\usagemax\sessions\.json`, 30-day retention, first 120 characters of each prompt. - Accounts: each request records the Claude account it ran under, from the chat's environment (`CLAUDE_CODE_ACCOUNT_UUID`, set by Claude Desktop) or Claude Code's `.claude.json`. Each account learns its own rate. The panel, the band and the commands show only the signed-in account. `accounts.json` keeps each account's last reset. - Network: one `git fetch` of this repository at most once an hour when installed from GitHub, so Claude Code's Update button finds new versions; `"selfUpdate": false` in settings.json turns it off. No usage data leaves the computer. - Interface language: English; Russian when Claude Code's `language` setting is Russian. - Updates: turn on auto-update for the usagemax marketplace in `/plugin` → Marketplaces, or run `claude plugin update usagemax@usagemax`. - Developers: Roman Chernogorov, Danil Martsinkovskii. - License: MIT. ## Links - [README](https://github.com/Aristosya/usagemax#readme) - [Source](https://github.com/Aristosya/usagemax) - [License](https://github.com/Aristosya/usagemax/blob/main/LICENSE)