Claude Usage
A dependency-free Chrome MV3 extension that shows your Claude.ai 5-hour session and weekly usage limits in a single popup click, reading the same internal endpoint the claude.ai usage page itself calls.
Overview
Claude Usage is a Chrome extension that shows two numbers when you click its toolbar icon: how much of your 5-hour session limit and weekly limit you've used, and when each resets. It never opens a tab or navigates anywhere; the popup is the entire product. It authenticates the same way a claude.ai tab would, by relying on the session cookie Chrome already attaches to requests to claude.ai, and reads the undocumented internal usage endpoint the site's own usage page calls, since Anthropic has no public API for consumer plan limits.
Why it was built
Built because Anthropic's documented Usage & Cost and Analytics APIs cover Console API spend, not the 5-hour and weekly plan windows a Claude.ai subscriber actually wants to watch, and a public API request for this was closed as a duplicate on GitHub. The extension is a small, honest workaround: one click, no account linking, no telemetry, and an explicit acknowledgment that the endpoint it depends on is undocumented and can change without notice.
Click-to-Fetch, No Background Polling
The popup paints instantly from a cached snapshot in chrome.storage.local, labelled stale, then fetches fresh data only when opened. There is no background polling by design, documented in DECISIONS.md.
Cookie-Based Auth, No Credentials Stored
The extension never reads, stores, or transmits a credential. It declares host_permissions for claude.ai so Chrome attaches the existing session cookie automatically, the same thing that happens when you open a Claude tab yourself.
Offline-Aware Stale Data
On a network failure, if a cached snapshot with usage windows exists, the popup shows it labelled with a relative 'last known' timestamp rather than an error, so a transient offline moment doesn't blank the numbers you already had.
Tech Breakdown
The current required standard for new Chrome Web Store submissions, with no background persistent page and no long-running polling loop, matching the click-to-fetch model the extension is built around.
manifest.json, popup.html/.css/.js, and lib/ load directly with no bundler. For a single-popup, no-dependency extension this keeps the entire codebase auditable in a few files.
Used only to hold the last-known usage snapshot so the popup is never empty on open, not as a general data store. writeCache/readCache is a two-function module (lib/cache.js).
The only way to get 5-hour and weekly consumer plan numbers at all today, since no documented API exposes them. The tradeoff (the endpoint can change) is stated in the README rather than hidden.
- 1
The endpoint being undocumented means any response-shape change from Anthropic breaks the extension with no warning; the parser is deliberately defensive so that failure mode degrades to 'Needs an update' rather than showing a wrong number.
- 2
Distinguishing a genuine offline failure from an endpoint change required a typed UsageError with an explicit ErrorCode enum (OFFLINE vs ENDPOINT_CHANGED) so the popup can choose to fall back to cached data only when that's actually the right call.
The extension is complete and installable via developer mode. A Gemini usage dashboard shipped in May 2026 and is flagged as a plausible v2 addition; ChatGPT still exposes no usage surface as of writing, so nothing is planned there until that changes.
Want to know more?
Happy to walk you through the details, just reach out.