claude-code-best-practice-zh: Command for Claude Code

.claude/commands/workflows/best-practice/workflow-claude-subagents.md

workflow-claude-subagents is a command for Claude Code from BuaaJoseph/claude-code-best-practice-zh. It costs 17 tokens per session (1,746 once invoked), scanned A, original, MIT.

A workflow command that checks whether a local report about Claude Code subagents and settings has fallen out of date.

In plain words
What is it for?
Use it to review changes to official subagents or supported configuration fields across recent Claude Code versions.
Why use it?
It compares the report with official documentation and recent changes before suggesting updates.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents; mentions Claude Code.

This is BuaaJoseph/claude-code-best-practice-zh's own configuration. It tells Claude Code how to work on claude-code-best-practice-zh itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-best-practice-zh configures →

Reuse

Borrowing it

Nothing to install: this file belongs to BuaaJoseph/claude-code-best-practice-zh. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/BuaaJoseph/claude-code-best-practice-zh/master/.claude/commands/workflows/best-practice/workflow-claude-subagents.md
Clone the repo
git clone --depth 1 https://github.com/BuaaJoseph/claude-code-best-practice-zh

Made for: Claude Code.

Wrote 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.

agentmods badge for workflow-claude-subagents

README.md
[![agentmods](https://agentmods.dev/badge/commands/buaajoseph/claude-code-best-practice-zh/workflow-claude-subagents.svg)](https://agentmods.dev/commands/buaajoseph/claude-code-best-practice-zh/workflow-claude-subagents)
Your own site
<a href="https://agentmods.dev/commands/buaajoseph/claude-code-best-practice-zh/workflow-claude-subagents"><img src="https://agentmods.dev/badge/commands/buaajoseph/claude-code-best-practice-zh/workflow-claude-subagents.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,746 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.01746
Opus 5 $0.00009 $0.00873
Sonnet 5 $0.00003 $0.00349
Haiku 4.5 $0.00002 $0.00175

Measured 8d ago against content hash 7ba279b5e137, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

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 8d 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.

.claude/commands/workflows/best-practice/workflow-claude-subagents.md · 136 lines

How it starts

The opening of the file, as written. The whole thing — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.

工作流变更日志 — Subagents 报告

你是 claude-code-best-practice 项目的协调员。你的工作是启动一个研究 agent,等待其结果,并生成一份关于 Subagents 参考报告best-practice/claude-subagents.md)漂移情况的报告。

此工作流检查 exactly 两种类型的漂移

  1. Frontmatter 字段 — 官方文档中添加或删除的任何字段
  2. 官方子代理(Sub-agents) — 添加或删除的任何内置 agent

要检查的版本: $ARGUMENTS(如果为空或不是数字,默认 10)

这是一个 先读后报告 的工作流。启动 agent,合并发现,然后生成报告。只有在用户批准后才采取行动。


第一阶段:启动研究 Agent

使用以下 prompt 生成 workflow-claude-subagents-agent

研究 claude-code-best-practice 项目的 subagents 报告漂移情况。检查最近 $ARGUMENTS 个版本(默认:10)。

获取以下 2 个外部来源:

  1. 子代理参考:https://code.claude.com/docs/en/sub-agents
  2. Changelog:https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md

然后读取本地报告(best-practice/claude-subagents.md)。

检查 exactly 两件事:

  1. Frontmatter 字段:将官方文档的支持的 frontmatter 字段表与报告的 Frontmatter Fields 表进行比较。标记添加或删除的任何字段。
  2. 官方子代理(Sub-agents):将官方文档的内置子代理列表与报告的 official agents 表进行比较。标记添加或删除的任何 agents。

第二阶段:读取之前的变更日志条目

在 agent 运行期间,读取 changelog/best-practice/claude-subagents/changelog.md 以获取最近 25 条目。解析优先级操作以识别:

  • 重复出现的问题 — 之前出现过且仍未解决的问题
  • 新问题 — 首次出现的问题
  • 已解决的问题 — 之前标记的问题现已修复

第三阶段:生成报告

等待 agent 完成。 生成包含以下部分的报告:

  1. Frontmatter 字段变更 — 官方文档与我们的报告相比添加或删除的字段
  2. 官方子代理(Sub-agent)变更 — 与我们的表相比添加或删除的内置 agents

以优先级的 操作项目 摘要表结束。每个项目必须包含 Status 列,显示 NEWRECURRING (first seen: <date>)RESOLVED

优先级操作:
#  | 类型           | 操作                              | 状态
1  | 新字段        | 将 <field> 添加到 frontmatter 表 | NEW
2  | 已删除字段   | 从表中删除 <field>                  | RECURRING (first seen: <date>)
3  | 新 Agent     | 将 <agent> 添加到 official agents 表  | NEW
4  | 已删除 Agent | 从表中删除 <agent>                  | NEW

还包括 自上次运行以来已解决 部分,列出之前运行中不再是问题的事项。


第三阶段半:追加摘要到变更日志

此阶段是强制性的 — 在向用户展示报告之前必须始终执行。

读取现有的 changelog/best-practice/claude-subagents/changelog.md 文件,然后在末尾 追加(不是覆盖)新条目。条目格式必须 exactly 如下:

---

## [<YYYY-MM-DD HH:MM AM/PM PKT>] Claude Code v<VERSION>

| # | 优先级 | 类型 | 操作 | 状态 |
|---|----------|------|--------|--------|
| 1 | HIGH/MED/LOW | <类型> | <操作描述> | <状态> |
| ... | ... | ... | ... | ... |

Read the full file on GitHub · 136 lines

Changes

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.

  1. 8d ago First seen · 136 lines · 17 tokens per session scan A 7ba279b5e137

Subscribe to this mod's changes

workflow-claude-subagents is a command published in the GitHub repository BuaaJoseph/claude-code-best-practice-zh (2 stars, last pushed 4mo ago), licensed MIT. It adds 17 tokens to every session and 1,746 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-31.