hamzafer/claude-code-mods/tree/main/mods/openai-balance

你的 OpenAI API 额度显示在提示符上方:带仪表盘的预估余额、今日支出、资金主要流向,以及最后一次调用。/openai-balance 显示详细明细。
hamzafer/claude-code-mods/tree/main/mods/openai-balance

先添加一次市场,然后按名称安装任意 mod:
claude plugin marketplace add hamzafer/claude-code-mods
claude plugin install context-bar@claude-code-mods
或者一次性安装通用套装:
for m in context-bar token-weather usage-meter where-am-i next-steps agent-radar review-watch replay-theater md-preview blast-radius mission-control; do
claude plugin install "$m@claude-code-mods"
done
安装后重启 Claude Code。若想不安装直接试用:
git clone https://github.com/hamzafer/claude-code-mods && cd claude-code-mods
claude --plugin-dir mods/context-bar
要求 Claude Code 2.1.287+。少数 mod 需要更多(Chrome、
gh、一个 connector);表格中已注明哪些。
| | Mod | What it does | Command |
| --- | --- | --- | --- |
| 🛰️ | mission-control | Live map of agents, tool calls and the code they touch | /mission |
| 📊 | context-bar | Your context window as one stacked bar, a color per category, with token counts and where it compacts | /context-bar |
| 🌦️ | token-weather | Context fill from Clear to Compact soon, plus a prompt-cache countdown | |
| ⏱️ | cache-clock | A prompt-cache line under your status line, from Claude Code's own figures: time left, hit rate and misses, and the tokens your next message re-caches once it goes cold. Needs Node and Claude Code 2.1.251+ | /cache-clock setup |
| 📍 | where-am-i | Goal, doing now, waiting on you, next step | /where |
| ➡️ | next-steps | 2 or 3 likely next prompts after each turn, one key to draft one | 1 2 3, 0 hides |
| 💰 | usage-meter | 5-hour and 7-day plan usage, the reset countdown and the session's cost | |
| 💳 | openai-balance | Your OpenAI API credit: an estimated balance with a gauge, today's spend, where the money mostly went, and the last call. Needs an OpenAI organization Admin key | /openai-balance |
| 📡 | agent-radar | One live line per running subagent | /radar |
| 🔍 | review-watch | One live line per running code review (Codex or a review subagent) with the model, target, elapsed time and Codex's latest output. A toast lists the findings when it ends | |
| 🌐 | browser-lanes | Whether this session has a browser, and who holds it | /browser |
| 🕌 | prayer-times | The current prayer and how long is left, the next one, and zawal. Computed on your computer, Hanafi or standard Asr | /prayers |
| 🎬 | replay-theater | Steps through the last turn's edits, one diff at a time | /replay |
| 📝 | md-preview | Renders the Markdown files Claude edits like GitHub does, with before and after side by side. Needs Chrome and a terminal that shows images | /md |
| | Mod | 功能 | 命令 |
| --- | --- | --- | --- |
| 💥 | blast-radius | 拦截 rm -r、强制推送和迁移,展示它们会删除什么,60 秒无响应后取消 | |
| | Mod | 功能 | 命令 |
| --- | --- | --- | --- |
| 🔀 | switchboard | 为每个未指定模型的子代理选择模型,使用 OpenAI 的 Decisions API 或 Jev,仅依据其短标签。展示每个子代理的花费 | /route |
这些都围绕我自己的工具和规则构建。复制它们,把规则改成你自己的。
| | 模块 | 作用 | 命令 |
| --- | --- | --- | --- |
| 👀 | glance | 一行显示需要你关注的事:下一个会议、PR、Linear 议题、Slack 私信。需要 gh 以及 Google Calendar、Linear 和 Slack 连接器 | /glance |
| 🚦 | merge-gate | 在 CI 通过且 Codex 审查一次之前阻止 gh pr merge。需要 gh 和 Codex CLI。审查在固定模型上运行;改成你自己的 | /gate |
| 📏 | rulebook-guard | 强制执行我的写作和 git 规则:重写破折号,在 --amend、未格式化的推送、笔记中的电子邮件和电话号码前询问 | |
| 💾 | session-saver | 保存你停下的位置,并在恢复时显示。需要 unpause | /park [note] |
| | 模组 | 作用 | 指令 |
| --- | --- | --- | --- |
| 📱 | reels | Claude 工作时播放 YouTube Shorts,完成后暂停 | /reels |
| 🐍 | snake | Claude 工作时玩贪吃蛇 | /snake |
| 🎵 | now-playing | Spotify 正在播放什么,附进度条、正在演唱的歌词,以及 ⏮ ⏸ ⏭ 按钮。需要 macOS 和 Spotify 应用 | /music |
<a id="mission-control"></a>
每个子代理、每次工具调用以及它们触碰的每个文件,都显示在聊天旁边的面板中。以 4 倍速展示:两个子代理跨四个文件构建一个登出功能。

像任何模组一样安装它,重启,然后输入 /mission(或 /mission code 打开代码地图)。q 关闭它。
w 实时显示代理和每次工具调用c 显示代码地图,带有导入箭头Code 视图还需要 macOS、Google Chrome 以及能显示图像的终端(Ghostty、kitty、iTerm2)。Who 视图在任何地方都能用。
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add hamzafer/claude-code-mods claude plugin install openai-balance
Add the marketplace once, then install any mod by name:
claude plugin marketplace add hamzafer/claude-code-mods
claude plugin install context-bar@claude-code-mods
Or install the general-purpose set in one go:
for m in context-bar token-weather usage-meter where-am-i next-steps agent-radar review-watch replay-theater md-preview blast-radius mission-control; do
claude plugin install "$m@claude-code-mods"
done
Restart Claude Code after installing. To try one without installing:
git clone https://github.com/hamzafer/claude-code-mods && cd claude-code-mods
claude --plugin-dir mods/context-bar
Needs Claude Code 2.1.287+. A few mods need more (Chrome,
gh, a connector); the tables say which.
| | Mod | What it does | Command |
| --- | --- | --- | --- |
| 🛰️ | mission-control | Live map of agents, tool calls and the code they touch | /mission |
| 📊 | context-bar | Your context window as one stacked bar, a color per category, with token counts and where it compacts | /context-bar |
| 🌦️ | token-weather | Context fill from Clear to Compact soon, plus a prompt-cache countdown | |
| ⏱️ | cache-clock | A prompt-cache line under your status line, from Claude Code's own figures: time left, hit rate and misses, and the tokens your next message re-caches once it goes cold. Needs Node and Claude Code 2.1.251+ | /cache-clock setup |
| 📍 | where-am-i | Goal, doing now, waiting on you, next step | /where |
| ➡️ | next-steps | 2 or 3 likely next prompts after each turn, one key to draft one | 1 2 3, 0 hides |
| 💰 | usage-meter | 5-hour and 7-day plan usage, the reset countdown and the session's cost | |
| 💳 | openai-balance | Your OpenAI API credit: an estimated balance with a gauge, today's spend, where the money mostly went, and the last call. Needs an OpenAI organization Admin key | /openai-balance |
| 📡 | agent-radar | One live line per running subagent | /radar |
| 🔍 | review-watch | One live line per running code review (Codex or a review subagent) with the model, target, elapsed time and Codex's latest output. A toast lists the findings when it ends | |
| 🌐 | browser-lanes | Whether this session has a browser, and who holds it | /browser |
| 🕌 | prayer-times | The current prayer and how long is left, the next one, and zawal. Computed on your computer, Hanafi or standard Asr | /prayers |
| 🎬 | replay-theater | Steps through the last turn's edits, one diff at a time | /replay |
| 📝 | md-preview | Renders the Markdown files Claude edits like GitHub does, with before and after side by side. Needs Chrome and a terminal that shows images | /md |
| | Mod | What it does | Command |
| --- | --- | --- | --- |
| 💥 | blast-radius | Holds rm -r, force pushes and migrations, shows what they'd delete, cancels after 60 s with no answer | |
| | Mod | What it does | Command |
| --- | --- | --- | --- |
| 🔀 | switchboard | Picks the model for each subagent that doesn't name one, with OpenAI's Decisions API or Jev, from its short label only. Shows what every subagent cost | /route |
These are built around my own tools and rules. Fork them and change the rules to yours.
| | Mod | What it does | Command |
| --- | --- | --- | --- |
| 👀 | glance | One line with what needs you: next meeting, PRs, Linear issues, Slack DMs. Needs gh and the Google Calendar, Linear and Slack connectors | /glance |
| 🚦 | merge-gate | Holds gh pr merge until CI is green and Codex reviewed once. Needs gh and the Codex CLI. Reviews run on one fixed model; change it to yours | /gate |
| 📏 | rulebook-guard | Enforces my writing and git rules: rewrites em dashes, asks before --amend, unformatted pushes, emails and phone numbers in notes | |
| 💾 | session-saver | Saves where you left off, shows it on resume. Needs unpause | /park [note] |
| | Mod | What it does | Command |
| --- | --- | --- | --- |
| 📱 | reels | YouTube Shorts while Claude works, pauses when it's done | /reels |
| 🐍 | snake | Snake while Claude works | /snake |
| 🎵 | now-playing | What Spotify is playing, with a progress bar, the lyric being sung, and ⏮ ⏸ ⏭ buttons. Needs macOS and the Spotify app | /music |
<a id="mission-control"></a>
Every subagent, every tool call and every file they touch, in a pane next to the chat. Shown at 4x: two subagents building a logout feature across four files.

Install it like any mod, restart, and type /mission (or /mission code to open the code map). q closes it.
w shows the agents and every tool call, livec shows the code map, with import arrowsThe Code view also needs macOS, Google Chrome and a terminal that shows images (Ghostty, kitty, iTerm2). The Who view works everywhere.