0xGondarxyz/claude-code-mods/tree/main/agent-watch
agent-watch
実行中の各 subagent について、モデル、タスク、経過分数、最新のツール呼び出しをプロンプト上に 1 行表示する Claude Code mod。
この mod について
subagent の実行中、プロンプト上のバンドに agent ごとの行を表示します。例:Sonnet · Build snap screenshot mod · 6 min · now: Bash claude plugin test。各行には agent のモデルまたは subagent 種別、15 s ごとに更新される経過分数、最新のツール呼び出し(ファイル名、Bash コマンドの先頭 40 文字、またはパターン)が表示されます。agent が終了すると、30 s の間は緑色の done、失敗または停止なら黄色の stopped とし、Agent finished: <description> の toast を表示します。agent がいないときは何も描画せず、他の mod の行は下に残ります。開始には agent.spawn のエンジンデータ、進捗には agentId 付きの tool.call、終了には agentId 付きの turn.complete と 15 s 間隔の $.agent.list() フォールバックを使い、状態を agent-watch.agents に保持します。バックグラウンドとフォアグラウンドの agent 終了は区別できません。また teammate は agent.spawn を渡さないため表示されません。開発コマンド:claude plugin validate .、claude plugin test .、npx tsc -p .。
インストール
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add 0xGondarxyz/claude-code-mods claude plugin install agent-watch
原文 / README
agent-watch
A Claude Code mod. While subagents run, the band above the prompt shows one line per agent:
Sonnet · Build snap screenshot mod · 6 min · now: Bash claude plugin test
- Label: the agent's model (Sonnet, Opus, Haiku, Fable), else its subagent type.
- Minutes update every 15 s.
now:is the agent's latest tool call (file name, first 40 characters of a Bash command, or pattern), cut to the band width.- When an agent ends, its line shows
done(green) for 30 s, orstopped(yellow) if it failed or was stopped, with one toastAgent finished: <description>. - With no agents the mod draws nothing. Other mods' rows stay below ours.
Engine data used
- Start:
agent.spawn.next(e)answers{ model, agentId }; the input holdsdescriptionandsubagentType. - Progress:
tool.callwithagentId(set only inside a subagent loop). Hooks always pass through. - Finish:
turn.completewithagentId(reasonansweris done, anything else stopped), and every 15 s$.agent.list()status (completed,failed,killed) as a fallback. - State:
agent-watch.agentsin$.state, so a hot reload keeps the rows.
Limits
- The engine does not tell a background agent's end apart from a foreground one; both end through
turn.completeor$.agent.list(). - Teammates (
type: teammate) never passagent.spawn, so they are not shown.
Develop
claude plugin validate .
claude plugin test .
npx tsc -p .
