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

agent-watch

一个 Claude Code mod,在提示列上方为每个正在运行的 subagent 显示一行信息,包括模型、任务、分钟数和最近的工具调用。

0xGondarxyz@0xGondarxyz

0xGondarxyz/claude-code-mods/tree/main/agent-watch

已翻译

关于这个 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, or stopped (yellow) if it failed or was stopped, with one toast Agent 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 holds description and subagentType.
  • Progress: tool.call with agentId (set only inside a subagent loop). Hooks always pass through.
  • Finish: turn.complete with agentId (reason answer is done, anything else stopped), and every 15 s $.agent.list() status (completed, failed, killed) as a fallback.
  • State: agent-watch.agents in $.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.complete or $.agent.list().
  • Teammates (type: teammate) never pass agent.spawn, so they are not shown.

Develop

claude plugin validate .
claude plugin test .
npx tsc -p .

更多类似作品