ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
GitHub 仓库 · 发布者 rynhardt81

forge-band

一个 Claude Code mod(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 mod,是 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

更多类似作品