newtonmunene99/claudekit/tree/main/plugins/statusline
關於這個 mod
這個 Claude Code mod 會在提示列上方和下方繪製狀態列。上方顯示 5 小時與每週限制的膠囊標籤(進度條、已使用百分比、重設時間)、內容視窗填滿程度、本工作階段的輸入/輸出/快取讀取 token,以及以 API 價格計算的工作階段成本;進度條在 70% 變黃、90% 變紅。下方只在終端機顯示:資料夾、帶 dirty 標記的分支、模型、工作階段名稱和短 session id。需要支援 mod 的 Claude Code 建置版本;確認運作後,從 ~/.claude/settings.json 移除 statusLine。
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add newtonmunene99/claudekit claude plugin install statusline
原文 / README
statusline
A status line as a mod, the same on every install: no statusLine script to set up per machine.
Needs a Claude Code build with mod support (function hooks).
Above the prompt
A row of pills, wrapping when the window is narrow:
| Pill | Shows |
| :--- | :---- |
| 5h | 5-hour limit: bar, % used, reset time (↻ 19:20) |
| 7d | weekly limit: bar, % used, reset day and time (↻ Thu 19:00) |
| ctx | context window fill |
| ↑ ↓ ≋ | this session's input, output and cache-read tokens |
| $ | this session's cost at API prices (what /cost shows) |
Bars turn yellow at 70% and red at 90%. A figure with no reading yet is left out. Token totals count every model request of this session's turns and start at 0 when a session is resumed, so they can run below what the cost covers. Another plugin's band (Conductor's track band) stays, under the pills.
Under the prompt
At the end of the hint line (terminal only): folder (branch✗) · model · name · id. ✗ means git has uncommitted changes; a detached HEAD shows the short commit. The session's name shows when it has one (a /rename shows from the next prompt), then the first 8 characters of the session id.
Once it works for you, remove statusLine from ~/.claude/settings.json.
Writing a mod in claudekit
One mod per plugin, in plugins/<name>/: .claude-plugin/plugin.json (with "types": "./types/index.d.ts" when it keeps $.state), hooks/hooks.json naming ./register.tsx, the module and its pure helpers in hooks/, tests in tests/. Run claude plugin validate plugins/<name> and claude plugin test plugins/<name> before a version bump. A mod that serves one plugin lives inside that plugin (the Conductor HUD lives in conductor).
Two engine rules shape this:
- A plugin hooks each event once without a matcher, so two mods that both react to
turn.completeor a prompt cannot share a plugin cleanly. $is never passed into a function imported from another file; helpers that take$are top-level function declarations in the module itself.
