0xGondarxyz/claude-code-mods/tree/main/agent-watch
agent-watch
一個 Claude Code mod,在提示列上方為每個執行中的 subagent 顯示一行資訊,包括模型、任務、分鐘數和最近的工具呼叫。
關於這個 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 不繪製任何內容,其他 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 .
