# Claude Counter: A Browser Extension for Token Counts, Cache Timers and Usage Bars on claude.ai

> Claude Counter is a small MIT-licensed extension that injects a token counter, a cache countdown and session/weekly usage bars into claude.ai by reading the site's own API traffic. It is aimed at heavy Claude users who want to know how close they are to the 200k context limit and when their cache goes cold.

**she-llac/claude-counter** — A minimal browser extension that shows token count, cache timer, and usage bars on claude.ai.

- Repository: https://github.com/she-llac/claude-counter
- Stars: 2,445 · Forks: 287
- Language: JavaScript
- License: MIT
- Published: 2026-09-28 · Updated: 2026-09-28 · Language: en
- Canonical page: https://hysenlabs.com/projects/she-llac-claude-counter

## What Claude Counter actually puts on the page

The extension answers three questions that claude.ai itself does not put in front of you while you type. How big is this conversation, in tokens, against the 200k context limit. How long until the prompt cache for this conversation expires and continuing gets more expensive. And how much of the five-hour session allowance and the seven-day weekly allowance you have already burned.

The README describes three UI elements: a token count with a mini progress bar against the 200k context limit, a cache countdown, and usage bars for the session (5-hour) and weekly (7-day) windows with reset countdowns. The audience is narrow and obvious. If you open claude.ai once a week to ask a question, none of this matters. If you run long research threads, paste large files, or work against a session allowance that resets on a clock, the missing information is exactly the information you keep guessing at.

One claim in the README is worth reading carefully: the usage bars are described as more accurate than the rounded percentages on Claude's native /usage page. That is a specific, checkable statement about data source, not a marketing line, and the next section explains where it comes from.

## How it reads Claude's own traffic instead of scraping the UI

The mechanism is interception. According to the README, the extension intercepts Claude's API responses to read conversation data and usage info. It does not parse the rendered page for numbers that the page may round or hide. It also watches for DOM changes so the injected UI elements survive navigation within the single-page app.

Usage data comes from two places. The extension queries Claude's /usage endpoint, and it reads live SSE message_limit data. The README states that the SSE stream carries exact, unrounded utilization fractions, which is why the progress bars can be finer-grained than the rounded percentages on the native /usage page. To call /usage it reads your lastActiveOrg cookie. Every request goes to claude.ai; the README says all data stays local, with no external servers and no tracking.

Token counting is separate from usage counting. The extension vendors a tokenizer using the o200k_base encoding, and the README calls the result an approximate token count. That wording matters. o200k_base is not Claude's tokenizer, so the number is an estimate produced locally from the conversation text the extension can see. It will track the real count closely enough to warn you that a thread is getting long, and it will not match a bill.

The architecture is therefore thin: no backend, no account, no sync. Interception plus a vendored tokenizer plus DOM observation. That thinness is the reason the extension can stay small, and it is also the reason it is fragile in the way described below.

## Installing Claude Counter from the release zip, xpi or userscript

There is no web store listing described in the README. Installation is manual, from the release assets, and the README gives three routes. For Chrome, Edge and other Chromium browsers, download the zip for the current release, open the extensions page, enable Developer mode and drag the zip onto that page.

```bash
# Chromium browsers: download claude-counter-0.4.2.zip from the v0.4.2 release,
# then open chrome://extensions and enable Developer mode.
# Drag the zip file onto the extensions page to load it.
```

After the drop, the extension appears in the list as an unpacked developer-mode item. That is the state you should expect to see, and it is also why the README tells you to enable Developer mode first: without it the page will not accept a dropped archive.

Firefox uses a different artifact. Download the xpi and drag it into any Firefox window, then confirm the Add prompt.

```bash
# Firefox: download claude-counter-0.4.2.xpi from the v0.4.2 release
# and drag it into any Firefox window, then click Add.
```

If you would rather not manage an extension at all, the repository ships a userscript at userscript/claude-counter.user.js. Install it with a userscript manager. The README does not name a specific manager, so the choice is yours, and the userscript path is the one to take if you want the counter in a browser where you cannot load unpacked extensions.

For a first real use, open a conversation on claude.ai that already has some length to it. The token bar should appear with a count and a fill level against the 200k limit, and the usage bars should populate once the extension has read the usage data. If the bars stay empty, the most likely cause is the lastActiveOrg cookie the README says it reads to query /usage.

## Where the interception approach breaks

The README's own description is the honest warning. The extension intercepts Claude's API responses and watches for DOM changes. Both of those are couplings to implementation details of claude.ai that the extension does not control and cannot pin. When the site changes its response shape, its SSE payloads, or the DOM structure around the conversation, the injected elements can stop updating or fail to appear. The README does not document a fallback path for when interception fails, and it does not document how the extension behaves if the /usage call is rejected.

There is a second limitation in the token number itself. The README calls it approximate and names the encoding, o200k_base. Anyone who needs a defensible token count for cost estimation or context budgeting should treat the bar as a proximity warning, not an accounting figure. The 200k context limit is a real boundary; the number sitting next to it is an estimate.

Third, this is claude.ai only. The README describes a browser extension for the web app, with requests made only to claude.ai. If you work through the API, an editor plugin or a desktop client, the extension has nothing to read and nothing to show. The privacy design is the flip side of the same constraint: reading the lastActiveOrg cookie and querying /usage only works because the extension is running inside the authenticated web session.

Finally, the release cadence is worth noting rather than judging. The most recent release in the repository is v0.4.2, dated 2026-01-31, and the last push to the repository was on 2026-03-21. There is no statement in the README about a support window or a compatibility guarantee, so if claude.ai changes, you are waiting on a new build rather than a store update.

## Claude Counter against Claude Usage Tracker and a plain tokenizer

The README credits Claude Usage Tracker by lugia19 as the inspiration for this project. That is the closest comparison available, and the difference in approach is visible in what each tool measures. A usage tracker is built around quota: how much of the allowance is gone, when it resets. Claude Counter keeps that, and adds per-conversation state that a quota tool has no reason to track, namely the approximate token count against the 200k context limit and a countdown on the prompt cache.

The second alternative is not an extension at all. A standalone tokenizer such as the gpt-tokenizer package the README credits, or any local script using the same o200k_base encoding, will give you a token count without touching your browser session. The difference is everything around the number. A local script has no access to Claude's /usage endpoint, no SSE message_limit stream, and no idea which conversation you have open, so it cannot show unrounded utilization fractions or a cache countdown tied to the live thread. Conversely, it does not depend on claude.ai's response format staying stable, and it works when you are not in the browser.

The trade is therefore consistent across both comparisons. Claude Counter buys live, in-context numbers by coupling to the site's internals. The alternatives buy stability and independence by giving up the live view.

## Licence, third-party code and upgrade cost

The repository is MIT licensed, and the README states the same. The top level includes a LICENSE file and a THIRD_PARTY_NOTICES.md, which is the file to read before redistributing a build, since the vendored tokenizer is third-party code. The README credits gpt-tokenizer (MIT) for token counting, so the notice file and the credits line agree on at least that dependency. MIT is permissive: modification and redistribution are allowed provided the licence and copyright notice travel with the code. That is a general description of the licence, not legal advice, and anyone shipping a modified build should read LICENSE and THIRD_PARTY_NOTICES.md directly.

Upgrade cost is the more practical concern. The README's install instructions point at versioned artifacts, claude-counter-0.4.2.zip and claude-counter-0.4.2.xpi, and there is no described auto-update path for a developer-mode load or a dragged-in xpi. In practice that means each new release is a manual download and reinstall, and the userscript route has the same property. For a single machine that is a minute of work. Across a team, it is the kind of step that quietly stops happening, which matters if the extension is the thing telling you that a session window is about to close.

## Conclusion

Adopt Claude Counter if you live in claude.ai all day and keep hitting the 200k context ceiling or the five-hour session window without warning. Skip it if you need a supported, store-distributed extension: it loads unpacked in Developer mode on Chromium and as a dragged-in xpi on Firefox, and the README gives no update channel. Before relying on the numbers, open a long conversation and compare the token bar against a reply that visibly truncates, then watch one cache timer run to zero and confirm the next request actually costs full price. The token figure is an approximation from a vendored o200k_base tokenizer, not Claude's own count, so treat it as a guide rather than a meter.

## FAQ

### How do I install the Claude Counter extension?

On Chrome, Edge or another Chromium browser, download claude-counter-0.4.2.zip from the release, open chrome://extensions, enable Developer mode and drag the zip onto the page. On Firefox, download claude-counter-0.4.2.xpi and drag it into any Firefox window, then click Add. A userscript is also available at userscript/claude-counter.user.js.

### What is Claude Counter?

It is a minimal browser extension that shows an approximate token count for the current conversation against the 200k context limit, a cache timer, and session (5-hour) and weekly (7-day) usage bars on claude.ai.

### How do I use Claude Counter?

Install it, then open claude.ai. The extension watches for DOM changes and injects the token count, cache timer and usage bars as you navigate, so there is no separate dashboard to open. If the usage bars stay empty, check that you are signed in to claude.ai, since the extension reads the lastActiveOrg cookie to query the /usage endpoint.

### Is Claude Counter safe?

The README states that all data stays local, with no external servers and no tracking, and that the extension makes requests only to claude.ai. It reads your lastActiveOrg cookie to query Claude's /usage endpoint and intercepts Claude's API responses. The code is MIT licensed, so you can read it before installing, which is the reasonable step given that it loads in Developer mode rather than from a store.

### How do I add Claude Counter to Firefox?

Download claude-counter-0.4.2.xpi from the release, drag it into any Firefox window and click Add. This is a separate artifact from the Chromium zip, so do not try to load the zip in Firefox.

## Sources

- [Issues](https://github.com/she-llac/claude-counter/issues)
- [License: MIT](https://github.com/she-llac/claude-counter/blob/main/LICENSE)
- [README](https://github.com/she-llac/claude-counter/blob/main/README.md)
- [Releases](https://github.com/she-llac/claude-counter/releases)
- [she-llac/claude-counter on GitHub](https://github.com/she-llac/claude-counter)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/she-llac-claude-counter
