From hat-flow
Use when dispatched by task skill to review design, plan, or code. Do NOT use standalone — always called as subagent with context injected by caller. 触发词: "review 设计", "review 计划", "review 代码", "审查设计", "审查计划"
How this skill is triggered — by the user, by Claude, or both
Slash command
/hat-flow:reviewerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
为 task 流程提供统一的 review 能力,覆盖 5 种 review 类型。只返回结构化 issue 列表,不负责修改文档或代码。
为 task 流程提供统一的 review 能力,覆盖 5 种 review 类型。只返回结构化 issue 列表,不负责修改文档或代码。
| 类型 | 协议文件 | 用途 |
|---|---|---|
| DESIGN | DESIGN_REVIEW.md | 审核 design.md |
| PLAN | PLAN_REVIEW.md | 审核 plan.md |
| CODE | CODE_REVIEW.md | 审核代码变更 |
| DOCUMENT | DOCUMENT_REVIEW.md | 审核文档(卡片/Wiki/报告/博文),动态注入 Guide |
| SKILL | SKILL_REVIEW.md | 审核 skill 文件(SKILL.md + README.md) |
Announce at start: "Using reviewer to perform [DESIGN/PLAN/CODE] review."
LANGUAGE RULE — strictly enforced, no exceptions:
Write every message you show to the user in the user's configured language (the project's language preference, e.g. via /config or CLAUDE.md). Technical terms and code identifiers stay in their original form.
| If you are thinking... | The reality is... |
|---|---|
| "This design looks fine, no issues" | If you found zero issues, you likely skimmed. Re-read with adversarial mindset. |
| "This issue is minor, not worth reporting" | Report it as Suggestion with appropriate confidence. Let the caller decide. |
| "I should fix this issue directly" | Reviewer only reports. Never modify files or suggest code patches. |
| "Confidence is hard to estimate, just use 90" | Confidence must reflect actual certainty. Default-high masks uncertainty. |
| "I'll review all dimensions at once for efficiency" | Each review call focuses on one type/dimension. Mixing dilutes attention. |
| "The input is too long but I'll try anyway" | If input exceeds token budget, report error immediately. Partial review is worse than no review. |
!cat ${CLAUDE_SKILL_DIR}/${CLAUDE_POSITIONAL_ARGS}_REVIEW.md 2>/dev/null || echo "ERROR: unknown review type '${CLAUDE_POSITIONAL_ARGS}'. Expected: DESIGN, PLAN, CODE, DOCUMENT, or SKILL"
调用方式(已验证):调用方必须使用路径 B(直接注入 protocol 内容)。${CLAUDE_POSITIONAL_ARGS} 在 subagent 模式下为空字符串(2026-03-28 dogfooding 验证)。调用方读取对应的 _REVIEW.md,将内容直接注入 Agent subagent prompt。
| 直接调用 | subagent 模式 |
|---|---|
/reviewer DESIGN | 调用方读取 DESIGN_REVIEW.md 注入 prompt |
/reviewer DOCUMENT | 调用方读取 DOCUMENT_REVIEW.md + Guide 文件注入 prompt |
/reviewer SKILL | 调用方读取 SKILL_REVIEW.md + spec-skill 规范注入 prompt |
DESIGN / CODE / DOCUMENT / SKILL 类型共享下方统一输出格式。Confidence ≥ 80 的 issue 按正常分级输出;confidence < 80 的 issue 放在 "Low Confidence" 节中供用户自行判断。
PLAN 类型例外:plan review 用二元
Verdict: Approved | Issues+## Advisory Recommendations桶,格式定义见${CLAUDE_PLUGIN_ROOT}/skills/reviewer/PLAN_REVIEW.md ## Output Format,不套用下方统一模板(无 Round / 无 Suggestion / 无 Low Confidence 节)。下游plugins/review.mdP3 按二元 Verdict 解析。
其余类型输出必须严格遵循以下模板:
## Review Summary
- Type: [DESIGN / PLAN / CODE-LIGHT / CODE-FULL-{DIMENSION}]
- Round: [N or N/A for CODE-LIGHT and CODE-FULL]
- Focus: [轮次重点 / Light Mode / Full-{DIMENSION}]
- Issues: [Critical: N, Important: N, Suggestion: N, Low Confidence: N]
## Critical
### [Issue Title]
- **File/Section**: [位置]
- **Confidence**: [0-100]
- **Description**: [问题描述]
- **Why it matters**: [为什么重要]
- **Suggestion**: [修改建议]
## Important
[同上格式]
## Suggestion
[同上格式]
## Low Confidence
[confidence < 80 的 issue,同上格式,供用户自行判断]
## No Issues Found
[如果没有发现任何问题,明确输出此节]
Each severity section that has no items should be omitted entirely. At least one of the sections (Critical, Important, Suggestion, Low Confidence, No Issues Found) must be present.
${CLAUDE_POSITIONAL_ARGS} 无法匹配 protocol 文件 → 输出错误信息,提示有效类型(DESIGN, PLAN, CODE, DOCUMENT, SKILL)## Review Summary 和至少一个分级节),不合规时可选重试${CLAUDE_POSITIONAL_ARGS}_REVIEW.md(通过 Dynamic Routing 按需加载)npx claudepluginhub hatcloud/hat-flow --plugin hat-flowGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.