[KongchangAI]
· 2 min read· 1,124 words

Free & Open Source! Claude Code Usage Monitoring Windows Widget: Pixel Clawd Reacts in Real Time

Free & Open Source! Claude Code Usage Monitoring Windows Widget: Pixel Clawd Reacts in Real Time

A developer used Claude Code to build a free Windows widget that monitors quota in real time with zero token cost.

A developer shared on Reddit a homemade Windows desktop widget called clawd-usage-winwidget for displaying Claude Code's plan quota in real time. By running claude -p "/usage" headlessly in the background, it refreshes session quota, weekly limit, and Fable limit every minute without invoking the model or consuming tokens, and also shows session status, service health, and version update notifications. The tool features a pixel-art mascot Clawd that reacts in real time — sleeping, running, waving, sweating, or lying flat — based on idle, working, waiting-for-input, or low-quota states. Built entirely with Claude Code, roughly 3000 lines of PowerShell 5.1 + WPF code, free and open source (MIT), requires Windows 10/11 with Claude Code logged in, and launches by double-clicking start-widget.vbs.

For developers who rely heavily on Claude Code, the biggest fear isn't failing to write code — it's getting rate-limited halfway through. While the official /usage command lets you check your quota, typing it manually every time isn't exactly elegant. Recently, a developer shared on Reddit a Windows desktop widget he built himself using Claude Code — clawd-usage-winwidget — which not only displays your quota in real time, but also comes with a pixel-art mascot named Clawd to keep you company while you code.

reddit source: I built a free Windows widget for Claude usage limits with Claude Code — pixel Clawd reacts to your

Real-Time Quota Monitoring with Zero Token Cost

The widget's core feature is monitoring your Claude plan's remaining quota in real time without consuming a single token.

According to the author, the mechanism is quite clever: the widget runs the claude -p "/usage" command in headless mode in the background. This command directly requests the usage percentage of your currently logged-in account from the server, including the current session quota, weekly limit, and Fable limit, refreshing automatically once per minute. Since it merely queries account status rather than invoking model inference, it incurs absolutely no additional token costs.

Beyond quota display, the widget also integrates several pieces of information developers really need: the status of all currently running Claude Code sessions (working / waiting for input / idle), Anthropic service health status, and whether a new version of Claude Code is available. All data comes from the registry ~/.claude/sessions that Claude Code maintains itself, with no additional dependencies required — you just need PowerShell 5.1 and a logged-in Claude Code.

What is headless mode?

Headless mode refers to a command-line tool automatically executing tasks without requiring a human interaction interface. For Claude Code, the -p in claude -p "..." stands for the --print parameter, meaning it runs in a "non-interactive" way: the program receives a prompt, executes it directly, prints the result to standard output, and then exits — all without opening an interactive terminal interface. This mode is ideal for being called by scripts, scheduled tasks, or other programs. clawd-usage-winwidget leverages exactly this: it silently executes claude -p "/usage" in the background, turning quota queries into a program-parseable "function call," thereby achieving zero-token real-time monitoring. Understanding headless mode means understanding why this tool can both save money and refresh automatically.

What is WPF? And why does pairing it with PowerShell 5.1 have pitfalls?

WPF (Windows Presentation Foundation) is a desktop UI framework Microsoft introduced alongside the .NET Framework, supporting vector rendering, animations, and data binding. It's commonly used to build modern-looking Windows applications. It can be called directly through PowerShell scripts without needing to install Visual Studio or any compilation environment — this is precisely the key to clawd-usage-winwidget being "double-click and go." But PowerShell 5.1 is the older version bundled with Windows 10/11, belonging to the .NET Framework era, and lags behind PowerShell 7 in features: it doesn't support the ?? null-coalescing operator, is easily tripped up by BOM when handling UTF-8 files, and can't recognize certain modern syntax. That's why the author specifically documented these pitfalls in CLAUDE.md to avoid stepping on landmines in later development.

The Clingy Pixel Mascot Clawd

The most eye-catching aspect of this tool is the little pixel-art creature living in the window — Clawd. It's not just decoration; it reacts in real time based on your usage state.

When no sessions are running, Clawd crawls into a hole and snoozes; when a session is working, it runs around busily alongside it; when a session is waiting for your input, it holds up a question mark and waves at you; when your quota approaches its limit, it nervously breaks into a sweat; and once quota hits 100%, it flops flat on its back. The number of hearts in the window title bar directly represents your currently remaining session quota.

According to the author, all of Clawd's poses and animations were recreated frame by frame by Claude Code based on the art from its own welcome screen, so Clawd looks completely consistent in the terminal and on the desktop. This "drawing itself" playfulness adds a lot of emotional connection to what would otherwise be a dry monitoring tool.

Built Entirely with Claude Code

It's worth mentioning that this tool itself was completed using Claude Code. The author admits that given the scale of PowerShell + WPF (~3000 lines of code), he himself could never have written it by hand.

Throughout the development process, Claude Code played multiple key roles: it split the original single-file script into approximately 18 modular files and wrote a CLAUDE.md documentation file recording module loading order and various PowerShell 5.1 pitfalls (such as UTF-8 BOM issues and lack of ?? operator support), ensuring later sessions wouldn't break existing functionality; during the public release phase, it added an English interface with instant language switching, translated all code comments, and wrote a recording script that rendered the GIF animations needed for the README directly from WPF using scripted fake data.

It was precisely through recording GIFs that the author discovered a layout bug where English text overlapped with the title bar. Additionally, Claude Code helped the author pinpoint a subtle issue: when running claude -p "/usage" from Git Bash, /usage gets parsed as a file path and sent to the model as a prompt — which is why the widget is restricted to calling that command only from PowerShell.

The Significance of CLAUDE.md and "Session Persistence"

CLAUDE.md is a project-level documentation file conventionally used with Claude Code, placed in the repository root, and automatically read by Claude Code at the start of each session. It serves as a "project memo" for the AI assistant, recording code structure, module loading order, known compatibility issues, and development conventions. Since Claude Code's session context is limited, long multi-turn development easily forgets earlier agreements; with CLAUDE.md, each subsequent session can automatically "recall" this key information, ensuring that a project of ~3000 lines and 18 modules doesn't break itself across sessions. You could say it's the hidden infrastructure that enables this tool to be iterated on stably by AI.

How to Get and Use It

This tool is completely free and open source, under the MIT license. Developers who want to try it can simply clone or download the ZIP from GitHub, and double-click start-widget.vbs to launch.

System requirements are Windows 10/11 with Claude Code already installed and logged in. The author specifically states that this tool is not affiliated with Anthropic and is a community individual project. Project URL: https://github.com/Enhed/clawd-usage-winwidget

For Windows users who interact with Claude Code every day, this may be a desktop tool that genuinely boosts their happiness.

#Claude Code#Windows widget#usage monitoring#open source#PowerShell WPF#pixel mascot#rate limit
Share:

Related articles