by dennykim123
macOS menu bar widget showing Claude Code & Codex usage limits as battery icons 🔋
# Add to your Claude Code skills
git clone https://github.com/dennykim123/claude-codex-batteryGuides for using ai agents skills like claude-codex-battery.
Last scanned: 7/10/2026
{
"issues": [
{
"file": "README.md",
"line": 55,
"type": "remote-install",
"message": "Install command (remote install script piped to a shell — review the source before running): \"curl -fsSL https://bun.sh/install \\| bash\"",
"severity": "low"
}
],
"status": "PASSED",
"scannedAt": "2026-07-10T07:35:09.005Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}claude-codex-battery is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by dennykim123. macOS menu bar widget showing Claude Code & Codex usage limits as battery icons 🔋. It has 103 GitHub stars.
Yes. claude-codex-battery passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/dennykim123/claude-codex-battery" and add it to your Claude Code skills directory (see the Installation section above).
claude-codex-battery is primarily written in Swift. It is open-source under dennykim123 on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh claude-codex-battery against similar tools.
No comments yet. Be the first to share your thoughts!
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
A menu-bar and system-tray widget that shows your remaining Claude Code and Codex usage limits as battery icons — so you never have to open
/usageagain.
C = Claude · X = Codex. Each battery shows the remaining % of a limit window — full & green means plenty left, red means almost out. Click for a detailed breakdown with reset times.
Ships two ways: a notarized native app (double-click install, zero prerequisites) and a single SwiftBar plugin — one self-contained script, no third-party libraries. The battery icons are rendered as PNGs from scratch in pure JavaScript (node:zlib only), so there's no image library and no npm install. Network calls: two official usage endpoints — Anthropic's and OpenAI's — each fetched with your own local Claude Code / Codex login (the same data /usage and Codex's /status show — see Privacy), plus an optional once-a-day update check (see Updating). (ccusage is an optional extra for the cost breakdown.)
| Group | Batteries | Source |
|---|---|---|
C Claude |
5-hour session · weekly · Fable (top-model weekly cap) | Anthropic's OAuth usage API — queried live with your local Claude Code login; account-level, so usage from every device/surface is included |
X Codex |
5-hour · weekly (or credit balance on the premium plan) | Codex's account-level usage API (backend-api/wham/usage), queried live with your local Codex login — same data Codex CLI's /status shows; falls back to ~/.codex/sessions/**/*.jsonl if offline |
Click the widget for a dropdown with, per limit:
Claude Code · % left
5h ▕█████████████████▍░░▏ 87% · resets 2h 36m
week ▕█████████████▍░░░░░░▏ 67% · resets 4d 2h
Fable ▕████████▎░░░░░░░░░░░▏ 41% · resets 4d 2h
today by model · $55 total ▸
Codex · prolite · % left
week ▕████████████████████▏ 100% · resets 7d 0h
Colors follow a traffic-light scale: green ≥ 50 % left, amber < 50 %, red < 20 %.
Using the native app? Skip this table — it has no prerequisites (Claude Code just needs to be logged in;
ccusageoptional). The table below is for the SwiftBar-plugin variant.
| Required? | Install | |
|---|---|---|
| macOS | ✅ | — |
| SwiftBar | ✅ | brew install swiftbar |
| bun | ✅ | curl -fsSL https://bun.sh/install | bash |
| Claude Code | ✅ for C batteries |
just needs to be logged in on this Mac (the widget reuses its login to query the usage API) |
| Codex CLI | optional | for the X batteries; without it, only Claude is shown |
| ccusage | optional | adds the cost / token / per-model breakdown in the dropdown — the battery works fully without it |
Note: This widget shows your own account's limits — via your local Claude Code login and your local Codex session logs. If you don't use Claude Code (or Codex), there simply won't be any data to display.
The native Windows 10/11 system-tray port lives in windows/. It compiles with the .NET Framework tools included with Windows and requires no Node.js, package manager or Visual Studio installation.
cd windows
.\install.ps1
See the Windows documentation for optional start-at-login, privacy controls and uninstall instructions. Windows support is currently experimental; the macOS app remains the primary release.
Windows contributors: @daehyeonxyz — initial Windows prototype (#3) · @johnjheejin — production port and stabilization (#5)
Download ClaudeCodexBattery-vX.Y.Z.dmg from Releases, open it, and drag ClaudeCodexBattery.app into Applications. That's it — the app is signed & notarized, so it runs with a double-click, and on first launch it offers to start at login. (A .zip is also published; it's what the in-app self-updater downloads.)
It's a native Swift port of the same widget: identical battery rendering, identical dropdown, same privacy model (see Privacy — your tokens go only to the two usage endpoints). ccusage remains optional for the cost breakdown. Source lives in app/ — ./build.sh for a local ad-hoc build, ./release.sh for the notarized release.
UI languages: English · 한국어 · 日本語 · 简体中文 · 繁體中文 · Español — follows your system language, or pick one in Settings → Language (the SwiftBar plugin follows the same choice).
Optional pixel mascot — Settings → Cat adds a tiny companion next to the batteries (off by default): a wide cat face with pink blush, a slim cat face, or an RPG slime. It emotes about your burn rate — asleep when idle, focused while you work, ears on fire during heavy burn, sweating when you're projected to hit 0% before the window resets, and sparkling when every battery is golden. The dropdown also gains a 🏁 lap row: reach the 5-hour reset without running empty.
git clone https://github.com/dennykim123/claude-codex-battery.git
cd claude-codex-battery
./install.sh
install.sh will:
~/.swiftbar-plugins/, rewriting the shebang to your machine's bun path (SwiftBar runs plugins with a minimal PATH, so an absolute shebang is required)launchctl bootout gui/$(id -u)/com.dennykim.claude-codex-battery && osascript -e 'quit app "SwiftBar"'.)No npm install, no bundled libraries — the plugin is a single self-contained script.
The battery appears in your menu bar within a few seconds. It refreshes every 2 minutes (the .2m. in the filename).
If you prefer not to run the script:
mkdir -p ~/.swiftbar-plugins
# rewrite shebang to your bun path, then copy:
sed "1s|.*|#!$(command -v bun)|" claude-codex-usage.2m.js > ~/.swiftbar-plugins/claude-codex-usage.2m.js
chmod +x ~/.swiftbar-plugins/claude-codex-usage.2m.js
defaults write com.ameba.SwiftBar PluginDirectory -string ~/.swiftbar-plugins
open -a SwiftBar
The same script doubles as a terminal battery on Linux — including Chromebook Crostini, where Claude Code lives in the Linux container anyway. Requires bun.
git clone https://github.com/dennykim123/claude-codex-battery.git
cd claude-codex-battery
./ccb # full gauges with reset countdowns
./ccb --statusline # one compact ANSI line
./ccb --tmux # tmux status-right format
./ccb --json # waybar custom-module JSON
tmux example: set -g status-right '#(~/claude-codex-battery/ccb --tmux)' with status-interval 120. On Linux the Claude login is read from ~/.claude/.credentials.json (no Keychain needed); Codex from ~/.codex as usual.
Run it like an app (Chromebook): ./install-linux.sh registers a background server plus a "Claude Codex Battery" icon in the ChromeOS launcher — click it and the battery window opens, booting the Linux container automatically if needed. No terminal required after setup.
Prefer a window? ./ccb --serve starts a tiny local server (port 41414) that renders the same pixel batteries as a small auto-refreshing page. Open it in Chrome and use ⋮ → Save and share → Install page as app — you get a standalone window with its own shelf icon, which is as close to a "menu bar battery" as ChromeOS allows.
Native app — checks GitHub for a newer version once a day (a tiny request for the VERSION file). When one is out, a green Install update row appears in the dropdown: one click downloads the signed zip from Releases, verifies its Developer ID code signature (team-pinned, so a tampered zip is refused), replaces itse