ClaudeMods
☰
ZH-TW
● 0 人在線上 · 瀏覽 0 次
贊助提交作品
GitHub 儲存庫 · 發布者 rynhardt81

forge-band

Claude Code 外掛(function hooks 外掛),在提示列上方繪製有邊框的狀態帶,顯示提示快取倒數、已安裝版本、下一個 ready task、registry drift,以及一鍵執行 /reflect、/create-pr 和 /run-epic 的按鈕。

rynhardt81@rynhardt81

rynhardt81/forgeFlow/tree/main/mods/forge-band

已翻譯

關於這個 mod

forge-band 是 Claude Code 外掛,也是 function hooks 外掛(Claude Code v2.1.287+),會在提示列上方呈現有邊框的狀態帶。狀態帶顯示 cache 倒數(預估距離失效的分鐘數,綠色 >15m、黃色 ≤15m、紅色 ≤5m)、透過 forge version 取得的已安裝 Forge Flow 版本、forge task ls --ready --json 回傳的第一個 ready task,以及 consistency-banner.py --json 回傳的 drift 數量。按鈕會觸發 /reflect status|resume|handoff;分支存在 open PR 時觸發 /create-pr review <PR#>;也會觸發 /run-epic <epic of next task>(需要在 10s 內再次按下確認)。尚未安裝對應技能的按鈕會隱藏。狀態帶的 refresh 只讀取檔案,絕不寫入。透過 CLAUDE_CODE_PLUGIN_DIRS 在 ~/.claude/settings.json 中載入,可套用到每個工作階段;或使用 claude --plugin-dir .claude/mods/forge-band 執行單一工作階段。用 claude plugin validate 驗證,用 `claude plugin test 測試。

安裝

請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。

claude plugin marketplace add rynhardt81/forgeFlow
claude plugin install forge-band
原文 / README

forge-band

A Claude Code mod (a plugin of function hooks, Claude Code v2.1.287+) that draws a bordered band above the prompt:

╭──────────────────────────────────────────────────────────────────────────────────────────╮
│ ◆ forge v4.8.0   ● 42m cache · 180k ctx   ▸ T313 · E16 · 7 ready   ✓ in sync   [Status] [Resume] [Handoff] [Review PR #89] [Run E16] × │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
  • Cache — minutes left before the prompt cache lapses, counted 60 minutes from the last main-thread reply (an estimate: the mod cannot read the real TTL, which drops to 5 minutes under usage overage). Green > 15m, yellow ≤ 15m, red ≤ 5m; one toast at 5m.
  • Version — installed Forge Flow version from forge version (hidden on pre-4.2 installs that have no VERSION file).
  • Next task — first entry of forge task ls --ready --json.
  • Drift — finding count from consistency-banner.py --json (check only, no --fix).
  • Buttons — /reflect status|resume|handoff, /create-pr review <PR#> (only when gh pr view finds an open PR for the current branch) and /run-epic <epic of next task>. Run needs a second press within 10s. A button whose skill is not installed is hidden.
  • /forge-band prints the same line as text; /forge-band show unhides the band.

The band's own refresh only reads: it never writes a file or task state. Its buttons are different — a press runs that skill, and /run-epic or /reflect handoff can change files, task state and git history, which is why Run needs a confirming second press.

Python settings hooks stay the floor: mods can be switched off (disableAllHooks, --safe-mode, an organisation's allowManagedModsOnly).

Load

Refresh copies this folder to <project>/.claude/mods/forge-band/; in the framework repo it lives at mods/forge-band/. Claude Code does not load it on its own.

Every session — add the folder to the env block of ~/.claude/settings.json (a project's settings are not read for this), then restart Claude:

"env": { "CLAUDE_CODE_PLUGIN_DIRS": "/absolute/path/to/forge-band" }

The path must be absolute (~ allowed); separate several with :. One copy serves every project: the band finds Forge Flow under .claude/ or at the repo root, and outside a Forge Flow project it shows the cache alone.

One session only — the flag lasts until you exit:

claude --plugin-dir .claude/mods/forge-band   # mods/forge-band in the framework repo

Develop

claude plugin validate mods/forge-band
cd mods/forge-band && claude plugin test

更多類似作品