Windows Taskbar Widget & Browser Extension
Claude Usage Widget
See the Limit Before You Hit It: Your claude.ai Weekly Limit on the Taskbar, With Your Pace, Each Day's Use and Today's Budget
- GitHub stars: 0
- Downloads: 5
- v2.0.7 · 4 days ago
Running out of claude.ai limits in the middle of work is frustrating. Claude Usage Widget keeps a small strip on the Windows taskbar, such as "51% until Fri", with a bar and a mark that shows how much of the week has gone: stay left of the mark and the limit lasts the week. One click opens a Windows 11 style panel: the 7-day weekly limit and when it resets; your pace (On track, Tight or Over pace), from the share of the week gone and the usage projected for the end of the week; a column for each day of the week beside an even-pace line; today's budget, the limit that is left spread evenly over the days that are left; how much of the limit Claude Code and Chats used; and the separate weekly Fable limit and extra usage when the plan has them. Bars turn red at 90%, tooltips give the details, and the panel slides in while its bars fill and its numbers count up, unless Windows animation effects are off. It follows the Windows light or dark setting, or a theme picked in the panel. On Chrome, Edge or Brave a tiny extension fetches the numbers every 5 minutes with the browser's own login, so no cookie file is ever read; on the Firefox family it runs from the cookies on its own. The login leaves the PC only to talk to claude.ai. It began as a Windows port of sdezubiria's macOS widget (MIT), with Keychain, launchd and Übersicht replaced by DPAPI, Credential Manager, Task Scheduler and a window of its own. Unofficial, and not affiliated with Anthropic.
The challenge
claude.ai shows its limits only on the settings page, so most people learn about a limit at the moment they hit it. And a percentage alone does not say whether the limit will last the week: 51% with two days to go is fine, 51% on the first day is not. There was a fine answer on macOS, but it stood on Keychain, launchd and Übersicht, none of which exist on Windows. The goal was a Windows widget that tells at a glance whether you are ahead of the week, set up by an ordinary user with one setup file.
Core Technical Challenges:
1. Chrome's Cookies on Windows: Chrome and Edge keep the cookie file exclusively locked while they run, and from version 127 app-bound encryption stops any outside program from reading the cookies. The macOS way of borrowing the login from the cookies is closed on most Windows PCs.
2. Keeping the Login Safe: a pasted sessionKey must never sit on disk as plain text, and another account on the same PC must not be able to read it.
3. Cloudflare: ordinary HTTP requests are stopped by claude.ai's Cloudflare.
4. Pace and Days From a Single Number: claude.ai reports only the percentage right now and the reset time, with no history, so the pace, each day's use and today's budget have to be worked out by the widget itself.
5. Staying on the Taskbar: the Windows 11 taskbar pushes other windows below it, so the strip has to stay visible on top of it and blend into its color, without ever covering the clock and the system tray.
6. Running Without Python: ordinary users have no Python installed, and the setup should never ask for administrator rights.
The solution
1. Two Ways In, One Data File: for Chrome, Edge and Brave an MV3 extension fetches usage from inside the browser with the live login and posts it every 5 minutes to a small receiver.py on 127.0.0.1:8765, so no cookie file is ever read. The receiver takes the port for itself, so no other local server can bind next to it and catch the extension's pushes. On Firefox, Zen, LibreWolf and Floorp, fetch_usage.py reads the cookies directly, and an expired login renews on the next run. Both share the same parsing code and write the same usage_data.json, so the widget's schema is defined once.
2. A Pasted Key for Any Browser: any other browser works with a sessionKey pasted once. With keyring installed it goes into Windows Credential Manager; otherwise into a file encrypted with DPAPI (through a thin ctypes wrapper), so only that Windows account can read it back.
3. Getting Past Cloudflare: requests go through curl_cffi, which connects like a real browser, so Cloudflare lets them through.
4. Pace, Days and Today's Budget: the week starts 7 days before the limit resets. The widget compares the usage with the share of the week gone and projects the end of the week at the same rate: up to 90% is On track, 91–100% Tight, over 100% Over pace, and the first hours of a week show New week. claude.ai keeps no history, so the widget keeps its own history of the weekly % (changes only, up to 35 days) and works out each day's use from it; a day it did not see shows –. Today's budget is the limit left divided by the days left, and its bar turns red once today goes over. Each product's share is multiplied by the weekly %, so Claude Code and Chats show exactly how much of the limit they used.
5. A Strip on the Taskbar and a Panel Above It: a frameless tkinter strip sits on the taskbar, samples the taskbar's color under it to blend in, sizes itself for the display's DPI, keeps clear of the clock and tray, and reopens where it was dragged. A click opens a Windows 11 panel with rounded corners above it; a click elsewhere or Esc closes it. Every shape is drawn by Pillow at four times the size and scaled down, so the edges are smooth, and the strip, the weekly bar, each day and the Today row have tooltips.
6. Motion and Theme: the panel slides up and fades in, its bars fill and its numbers count up, it closes faster than it opens, and the strip moves smoothly to new data. Shapes are cached, so a panel frame takes about 5 ms. With Windows' Animation effects off, everything shows at once. The panel's theme button goes round Same as Windows, Light and Dark, and the choice is kept. Refresh leaves a request with the receiver, and the extension picks it up within 30 seconds and fetches at once.
7. One Setup File: app.py runs the receiver and the widget in one process, PyInstaller bundles it into one EXE, and Inno Setup makes ClaudeUsageWidget-Setup.exe, which installs for the user without administrator rights and can start at Windows sign-in. A mutex keeps a second copy from opening; launching again brings the running widget to the front.
Highlights
- The weekly limit on the taskbar: "51% until Fri", with a mark for how much of the week has gone
- The pace at a glance: On track, Tight or Over pace, with the end-of-week projection
- A column for each day of the week beside an even-pace line, from the widget's own history
- Today's budget: the limit left, spread evenly over the days left
- How much of the limit Claude Code and Chats used, plus the Fable limit and extra usage when the plan has them
- Light and dark like Windows, or a theme of your own; smooth motion that follows Windows' animation setting
- On Chrome, Edge and Brave through an extension that never reads a cookie file; automatic on the Firefox family
- The key kept in Credential Manager or DPAPI; one setup file, no admin rights; free and open source under MIT
