Borrowing it
Nothing to install: this file belongs to clxzl/claude-code-best-practice-cn. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/clxzl/claude-code-best-practice-cn/main/.claude/commands/workflows/best-practice/workflow-claude-subagents.mdgit clone --depth 1 https://github.com/clxzl/claude-code-best-practice-cnWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/clxzl/claude-code-best-practice-cn/workflow-claude-subagents)<a href="https://agentmods.dev/commands/clxzl/claude-code-best-practice-cn/workflow-claude-subagents"><img src="https://agentmods.dev/badge/commands/clxzl/claude-code-best-practice-cn/workflow-claude-subagents/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/clxzl/claude-code-best-practice-cn/workflow-claude-subagents"><img src="https://agentmods.dev/badge/commands/clxzl/claude-code-best-practice-cn/workflow-claude-subagents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00017 | $0.01811 |
| Opus 5 | $0.00009 | $0.00905 |
| Sonnet 5 | $0.00003 | $0.00362 |
| Haiku 4.5 | $0.00002 | $0.00181 |
Grade A, and why
workflow-claude-subagents scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
工作流变更日志 — Subagents 报告
你是 claude-code-best-practice 项目的协调员。你的任务是启动一个研究代理,等待其结果,并展示一份关于 Subagents 参考报告 (best-practice/claude-subagents.md) 漂移情况的报告。
此工作流检查两种类型的漂移:
- Frontmatter 字段 — 官方文档中新增或移除的任何字段
- 官方 Sub-agents — 新增或移除的任何内置代理
要检查的版本数: $ARGUMENTS(默认:10,如果为空或非数字)
这是一个读取-然后报告的工作流。启动代理,合并发现,并生成报告。只有在用户批准后才采取行动。
阶段 1:启动研究代理
使用以下提示生成 workflow-claude-subagents-agent:
研究 claude-code-best-practice 项目的 subagents 报告漂移情况。检查最近 $ARGUMENTS 个版本(默认:10)。
获取以下 2 个外部来源:
- Sub-agents 参考:https://code.claude.com/docs/en/sub-agents
- 变更日志:https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
然后读取本地报告(
best-practice/claude-subagents.md)。检查以下两项内容:
- Frontmatter 字段:将官方文档支持的 frontmatter 字段表与报告的 Frontmatter 字段表进行对比。标记任何新增或移除的字段。
- 官方 Sub-agents:将官方文档的内置 subagents 列表与报告的官方代理表进行对比。标记任何新增或移除的代理。
阶段 2:读取之前的变更日志条目
在代理运行期间,读取 changelog/best-practice/claude-subagents/changelog.md 获取最近 25 条条目。解析优先级操作以识别:
- 重复项 — 之前出现过且仍未解决的问题
- 新增项 — 首次出现的问题
- 已解决项 — 之前标记的问题现已修复
阶段 3:生成报告
等待代理完成。 生成包含以下章节的报告:
- Frontmatter 字段变更 — 官方文档中新增或移除的字段与我们报告的对比
- 官方 Sub-agent 变更 — 新增或移除的内置代理与我们表格的对比
最后以优先级排序的操作项汇总表结束。每个条目必须包含一个 Status 列,显示 NEW、RECURRING (first seen: <date>) 或 RESOLVED:
优先操作:
| 类型 | 操作 | 状态
1 | 新增字段 | 将 添加到 frontmatter 表格 | 新增 2 | 移除字段 | 从表格中移除 | 重复出现(首次出现:) 3 | 新增 Agent | 将 添加到官方 Agent 表格 | 新增 4 | 移除 Agent | 从表格中移除 | 新增
同时包含一个自上次运行以来已解决的章节,列出之前运行中不再是问题的条目。
阶段 3.5:将摘要追加到变更日志
此阶段是强制性的 — 必须在向用户展示报告之前执行。
读取现有的 changelog/best-practice/claude-subagents/changelog.md 文件,然后在末尾追加(不要覆盖)一个新条目。条目格式必须如下:
---
## [<YYYY-MM-DD HH:MM AM/PM PKT>] Claude Code v<VERSION>
| # | 优先级 | 类型 | 操作 | 状态 |
|---|--------|------|------|------|
| 1 | HIGH/MED/LOW | <type> | <action description> | <status> |
| ... | ... | ... | ... | ... |
**状态格式 — 必须使用以下三种格式之一:**
- `COMPLETE (reason)` — 操作已执行并成功解决
- `INVALID (reason)` — 发现不正确、不适用或属于有意设计
- `ON HOLD (reason)` — 操作已推迟,等待外部依赖或用户决定
`(reason)` 是必填项,必须简要说明执行了什么操作或原因。
**追加规则:**
- 始终追加 — 永远不要覆盖或替换之前的条目
- 日期和时间是命令在巴基斯坦标准时间(PKT,UTC+5)执行时的时间;通过运行 `TZ=Asia/Karachi date "+%Y-%m-%d %I:%M %p PKT"` 获取。版本来自代理的发现
- 如果 `changelog/best-practice/claude-subagents/changelog.md` 不存在或为空,请先创建它并包含状态图例表(参见文件顶部),然后添加第一条条目
- 每条条目用 `---` 分隔
- **仅包含优先级为 HIGH、MEDIUM 或 LOW 的条目** — 省略 NONE 优先级的条目
---
## 阶段 3.6:更新"最后更新"徽章
**此阶段是强制性的 — 必须在阶段 3.5 之后、向用户展示报告之前立即执行。**
更新 `best-practice/claude-subagents.md` 顶部的"最后更新"徽章。运行 `TZ=Asia/Karachi date "+%b %d, %Y %-I:%M %p PKT"` 获取时间,进行 URL 编码(空格转为 `%20`,逗号转为 `%2C`),并替换徽章中的日期部分。如果 Claude Code 版本已更改,也请更新徽章中的版本。
**不要将徽章更新作为操作项记录在变更日志或报告中。** 徽章同步是每次运行的例行工作,不属于发现项。
---
## 阶段 4:提议采取行动
在展示报告之后(并确认变更日志和徽章均已更新),询问用户:
1. **执行所有操作** — 应用所有更改
2. **执行特定操作** — 用户选择要执行的编号
3. **仅保存报告** — 不做任何更改
执行时:
- **新增字段**:添加到 Frontmatter 字段表中,包含正确的类型、必填状态和来自官方文档的描述
- **移除字段**:在移除前与用户确认
- **新增代理**:添加到官方代理表中,包含正确的编号、名称、模型、工具和描述
- **移除代理**:在移除前与用户确认
---
## 关键规则
1. **绝不猜测**版本或日期 — 使用代理的数据
2. **交叉验证字段数量** — 报告的字段数量必须与官方文档匹配
3. **交叉验证代理数量** — 报告的代理数量必须与官方文档匹配
4. **不要自动执行** — 始终先展示报告
5. **始终追加到变更日志** — 阶段 3.5 是强制性的。永远不要跳过它。永远不要覆盖之前的条目。
6. **始终更新"最后更新"徽章** — 阶段 3.6 是强制性的。永远不要跳过它。
7. **与之前的运行对比** — 读取变更日志中最近 25 条条目,并将每个操作项标记为 NEW、RECURRING 或 RESOLVED。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 134 lines · 17 tokens per session scan A 036bfd38a9c3
workflow-claude-subagents is a command published in the GitHub repository clxzl/claude-code-best-practice-cn (127 stars, last pushed 4mo ago), licensed MIT. It adds 17 tokens to every session and 1,811 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.