ai newsDo., 15. Okt.
EilmeldungAlibaba Qwen N1 AI glasses go on sale in China

Desktop-Widget Token Slayer zeigt Restlimits von Claude Code, Codex und Cursor

Das immer sichtbare Widget stellt die verbleibenden Nutzungslimits mehrerer Coding-Agenten als HP-Balken eines Pixelhelden dar. So lässt sich ohne Wechsel zwischen verschiedenen Tools entscheiden, welcher Agent als nächstes dran ist.

dev.toMittwoch 18:03 · 14.10.DE2 Min. Lesezeit
Bild: dev.to

I switch between Claude Code, Codex and Cursor all day, and I got tired of checking how much of each limit I had left. Every check meant going to a different place for each tool, and I was doing it over and over just to decide which agent to use next.

So I built Token Slayer, a small always-on-top desktop widget. Each service gets a pixel hero. Remaining usage is the hero's HP. When an agent is working, the hero fights. When it's idle, the hero rests by a campfire.

It runs on macOS and Windows. It has no analytics and no server of mine: it only talks to the usage services themselves (and to the license service if you buy a pack).

1. "Is the agent working right now?" is surprisingly hard to answer. My first version watched files with fs.watch. On macOS that misses a lot, because the apps append to files they already have open, and those appends often don't produce events. For Cursor I tried counting changes to its SQLite WAL, but that file also changes about every 30 seconds while you're doing nothing, so the signal was noisy. What finally worked was reading the last line of Cursor's agent transcript files: if the last entry isn't a turn_ended record and the file changed recently, a turn is in progress. (Credit where due: I learned this from the open-source Muster app.)

2. Local numbers drift from the real ones. For Codex, the percentage I could derive from local session files said 78% left while the account page said 72%. Usage from other devices or the web never reaches your local files. I switched to the server-side numbers and kept the local ones only as a fallback.

4. A brief "0%" from a server shouldn't level you up. Once, a service briefly reported 0% used and then the real value. The app counted the jump as fresh usage, and my Cursor hero shot to level 12 overnight. Now sudden jumps and drops within the same reset window are held for a second reading before they count.

I'd love feedback, especially from people on Windows or on plans I haven't tested. Which other agents should it support?

Drafted with AI assistance; the project, the bugs and the fixes are mine.

Originaltitel: I built a desktop widget that turns my Claude Code, Codex and Cursor limits into a pixel hero's HPQuelle: dev.to (dev.to). Original öffnen