hamzafer/claude-code-mods/tree/main/mods/context-bar

你的上下文視窗以堆疊長條圖顯示在提示上方,每個類別一種顏色,並帶有 token 計數與壓縮點。/context-bar 會顯示或隱藏它。
hamzafer/claude-code-mods/tree/main/mods/context-bar

<td align="center" width="33%"><a href="docs/mods.md#-where-am-i"><img src="images/gallery/where-am-i.png" alt="where-am-i:工作階段目標、目前步驟以及等待你處理的事項,位於 Claude Code 提示詞上方" width="260"></a><br>📍 <b>where-am-i</b><br>目標、目前、等待你處理</td>
<td align="center" width="33%"><a href="docs/mods.md#-lines-above-the-prompt"><img src="images/gallery/lines.png" alt="token-weather、usage-meter 及其他 Claude Code 狀態列堆疊在提示詞上方" width="260"></a><br>🌦️ <b>token-weather 與朋友們</b><br>提示詞上方的列</td>
<td align="center" width="33%"><a href="#mission-control"><img src="images/gallery/mission-control.png" alt="mission-control:Claude Code 子代理、工具呼叫及其所觸及的檔案,即時" width="260"></a><br>🛰️ <b>mission-control</b><br>代理及其所觸及的程式碼</td>
</tr>
</table>
先新增一次市場,然後按名稱安裝任意模組:
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+。少數模組需要更多(Chrome、
gh、一個連接器);表格中註明了哪些。
| | 模組 | 功能 | 指令 |
| --- | --- | --- | --- |
| 🛰️ | mission-control | 代理、工具呼叫及其所觸及程式碼的即時地圖 | /mission |
| 📊 | context-bar | 將你的上下文視窗顯示為一個堆疊條,每個類別一種顏色,並顯示 token 計數及其壓縮位置 | /context-bar |
| 🌦️ | token-weather | 上下文填充從 Clear 到 Compact soon,外加提示快取倒數計時 | |
| ⏱️ | cache-clock | 狀態列下方的提示快取行,基於 Claude Code 自身資料:剩餘時間、命中率和未命中,以及一旦變冷後你下一條訊息重新快取的 token。需要 Node 和 Claude Code 2.1.251+ | /cache-clock setup |
| 📍 | where-am-i | 目標、目前在做什么、在等你什么、下一步 | /where |
| ➡️ | next-steps | 每輪之後 2 或 3 個可能的下一步提示,按一個鍵即可起草一個 | 1 2 3,0 隱藏 |
| 💰 | usage-meter | 5 小時和 7 天方案用量、重置倒數計時和本次工作階段的成本 | |
| 💳 | openai-balance | 你的 OpenAI API 額度:帶儀表的估算餘額、今天的支出、錢主要花在哪裡,以及最後一次呼叫。需要 OpenAI 組織 Admin 金鑰 | /openai-balance |
| 📡 | agent-radar | 每個正在執行的子代理一行即時資訊 | /radar |
| 🔍 | review-watch | 每個正在執行的程式碼審查(Codex 或審查子代理)一行即時資訊,包含模型、目標、已用時間和 Codex 的最新輸出。結束時彈出提示列出發現的問題 | |
| 🌐 | browser-lanes | 此工作階段是否有瀏覽器,以及誰持有它 | /browser |
| 🕌 | prayer-times | 當前禮拜及剩餘時間、下一次禮拜和 zawal。在你的電腦上計算,Hanafi 或標準 Asr | /prayers |
| 🎬 | replay-theater | 逐步回放上一輪的編輯,一次一個 diff | /replay |
| 📝 | md-preview | 像 GitHub 一樣渲染 Claude 編輯的 Markdown 檔案,前後並排顯示。需要 Chrome 和能顯示圖片的終端機 | /md |
| | 模組 | 功能 | 指令 |
| --- | --- | --- | --- |
| 💥 | blast-radius | 攔住 rm -r、強制推送和遷移,顯示它們會刪除什麼,若 60 秒內沒有回應就取消 | |
| | 模組 | 功能 | 指令 |
| --- | --- | --- | --- |
| 🔀 | switchboard | 為每個未指定模型的子代理選擇模型,僅根據其簡短標籤,使用 OpenAI's Decisions API 或 Jev。顯示每個子代理的成本 | /route |
這些是圍繞我自己的工具和規則所建構的。Fork 它們,並把規則改成你的。
| | 模組 | 功能 | 指令 |
| --- | --- | --- | --- |
| 👀 | glance | 一行顯示需要你處理的事項:下一次會議、PR、Linear 問題、Slack 私訊。需要 gh 以及 Google Calendar、Linear 和 Slack 連接器 | /glance |
| 🚦 | merge-gate | 攔住 gh pr merge,直到 CI 通過且 Codex 審查過一次。需要 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 context-bar
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.