---
title: "我构建了 WatchDucks —— 一个用于 Claude Code 子代理和委派代理的实时仪表盘"
url: "https://claudemods.dev/zh-cn/builds/i-built-watchducks-a-live-dashboard-for-claude-code-subagent-de4560"
source: "https://github.com/bassemustafa/watchducks"
source_type: "github"
repo: "https://github.com/bassemustafa/watchducks"
author: "Bassemustafa"
author_handle: "Bassemustafa"
stars: 0
category: "多智能体与编排"
categories: ["agents"]
tags: ["cost-tracking", "dashboard", "hooks", "multi-agent", "statusline", "subagents"]
permission_level: 3
scan_complete: true
install: "claude plugin marketplace add bassemustafa/watchducks\nclaude plugin install watchducks@watchducks"
added: "2026-10-17T02:27:59.726Z"
updated: "2026-10-16T22:41:33Z"
locale: "zh-cn"
content_locale: "zh-cn"
---

# 我构建了 WatchDucks —— 一个用于 Claude Code 子代理和委派代理的实时仪表盘

WatchDucks 是一个开源的 Claude Code 模组，添加了一个交互式 /flock 侧边栏，用于跟踪子代理、委派代理和后台 CLI 运行，显示实时状态、模型、工作量、令牌、缓存使用和成本，以及每次运行的档案和审查结果。它基于 Claude Code 钩子构建，不存储提示或工具输出，并通过 claude plugin install watchducks --marketplace bassemustafa/watchducks 安装。

## Description

作者描述了构建 WatchDucks 的过程，这是一个 MIT 许可的 Claude Code 模组，用于多代理工作流。它使用函数钩子在委派工作开始时自动打开一个 /flock 侧边栏，跟踪子代理、中继脚本、代理 CLI 运行（包括 Codex 和 Gemini CLI 的状态和经过时间）以及后台 shell 命令。仪表盘显示实时状态、模型、工作量级别、令牌和缓存使用及成本（如果可用）、单个运行档案、按实现者和模型分组的当前会话或过去 30 天的使用情况，以及审查结果，如发现的错误和编辑调用。当侧边栏隐藏时，提示上方会出现一个紧凑的状态栏，桌面应用和终端都支持。安装：claude plugin install watchducks --marketplace bassemustafa/watchducks。GitHub：https://github.com/bassemustafa/watchducks

## Install

```
claude plugin marketplace add bassemustafa/watchducks
claude plugin install watchducks@watchducks
```

## Original README

I've been using Claude Code with multiple agents and delegating tasks to other coding agents, including OpenCode and Codex. The problem I kept running into was visibility. Once several agents were working in parallel, it became difficult to answer some basic questions: Which agents are still running? Which model and effort level is each one using? How many tokens are they consuming? How much is the whole workflow costing? Which runs finished, failed, or were reviewed? I was using multiple plugins to piece together this information, but I wanted one place to see everything without leaving Claude Code. So I built WatchDucks 🦆 — an open-source Claude Code mod using function hooks. Planned and implemented with Opus and my agent fleet. It adds an interactive /flock sidebar directly inside Claude Code. What it does: Automatically opens the sidebar when delegated work starts Tracks subagents, relay scripts, agent CLI runs, and background shell commands Displays live status, model, effort, tokens, cache usage, and cost where available Provides an individual dossier for each run Shows usage grouped by implementer and model, for the current session or last 30 days Records review outcomes, including bugs found and edit calls Supports Claude Code's desktop app as well as the terminal There's also a small status band above the prompt when the sidebar isn't visible. I went with a spy-duck theme: running agents are "IN FIELD", completed ones are "DEBRIEFED", and failed ones "WENT DARK". Under the hood: WatchDucks uses Claude Code hooks and structured metadata from supported delegation workflows. It doesn't store prompts, responses, or tool output, and it doesn't send telemetry. Some agents expose more usage information than others. For example, Codex and Gemini CLI runs can be tracked for status and elapsed time, but token and cost data aren't always available. It's free, open-source, and MIT licensed. Install: claude plugin install watchducks --marketplace bassemustafa/watchducks GitHub: https://github.com/bassemustafa/watchducks I'd love feedback from people running multi-agent workflows. How are you currently tracking delegated agents and their usage? And what would you want to see in a tool like this?   submitted by   /u/Bassemustafa   to   r/ClaudeCode [link]   [comments]
