goodreview
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesegoodreview
goodreview
Execute a multi-specialist review of uncommitted changes using generic subagents and the briefs in references/specialists.md. This skill does not use named custom agents.
使用通用子Agent和references/specialists.md中的说明文档,对未提交的变更执行多专家评审。此技能不使用命名自定义Agent。
Arguments
参数
text
/goodreview [optional file/area to focus on]The optional argument may be a file path, directory, feature area, or short review focus. If omitted, review all uncommitted changes (staged, unstaged, and untracked).
text
/goodreview [可选的聚焦文件/区域]可选参数可以是文件路径、目录、功能区域或简短的评审重点。如果省略,则评审所有未提交的变更(已暂存、未暂存和未跟踪的文件)。
Phase 1: Scope
阶段1:范围确定
Run these commands as separate shell calls:
bash
git diff HEAD --stat
git diff --staged --stat
git status --porcelain
git branch --show-currentStop and tell the user if:
- This is not a git repository, or a git command fails
- The working tree is clean and there is no focus argument
- A focus path was given and it does not exist
Otherwise identify:
- Changed files and whether they are staged, unstaged, or untracked
- Languages and frameworks
- Layers: backend, frontend, database, tests, docs, infra, config
- Risk: auth, migration, public API, user-visible UI, concurrency, performance, docs-only
If a focus argument was provided, inspect that path unless surrounding context is required. Include untracked files in scope.
作为独立的shell调用运行以下命令:
bash
git diff HEAD --stat
git diff --staged --stat
git status --porcelain
git branch --show-current若出现以下情况,请停止并告知用户:
- 这不是git仓库,或git命令执行失败
- 工作区干净且未提供聚焦参数
- 提供了聚焦路径但该路径不存在
否则需确定:
- 已变更的文件及其状态(已暂存、未暂存或未跟踪)
- 使用的语言和框架
- 层级:后端、前端、数据库、测试、文档、基础设施、配置
- 风险类型:认证、迁移、公共API、用户可见UI、并发、性能、仅文档变更
如果提供了聚焦参数,除非需要上下文信息,否则仅检查该路径。将未跟踪文件纳入评审范围。
Phase 2: Select roles and launch
阶段2:选择角色并启动评审
Always include at least three roles for code changes. Always add Fresh Eyes.
| Change type | Roles |
|---|---|
| Any code | Code quality, Security, Tests |
| Elixir/Phoenix | Elixir, Security, Tests |
| Frontend | Frontend, UI/a11y, Tests |
| Schema/SQL | Database, Security, Tests |
| Docs only | Technical writing, Accuracy |
| Tests only | QA execution, Tests, Code quality |
| Cross-layer | Code quality, Security, Tests, Architecture |
Add Architecture when the diff spans layers, public APIs, infra, or data flow.
Add QA execution when tests, lint, or CI should actually be run.
Read references/specialists.md. For each selected role, launch one generic subagent in parallel. Each subagent prompt contains, in this order:
- The Shared finding contract
- That role's brief
- A scope packet:
text
Role: [name]
Branch: [branch]
Focus: [optional focus or none]
Changed files:
- [path]
Read the actual files, not only the git diff.
Return findings using the shared finding contract.Do not look up named custom agents. Do not use agent directories.
If the runtime cannot spawn subagents, run the briefs sequentially in this session and keep each output labeled with the role name.
Each specialist must:
- Read the changed files, not just the diff
- Stay in its domain
- Cite (or supporting files for repo-wide issues)
file:line - Rate severity: Critical, High, Medium, Low
- Suggest a specific fix, or state
No findings
对于代码变更,始终至少包含三个角色。必须添加Fresh Eyes(新视角评审)角色。
| 变更类型 | 角色 |
|---|---|
| 任意代码 | 代码质量、安全、测试 |
| Elixir/Phoenix | Elixir、安全、测试 |
| 前端 | 前端、UI/无障碍、测试 |
| Schema/SQL | 数据库、安全、测试 |
| 仅文档 | 技术写作、准确性 |
| 仅测试 | QA执行、测试、代码质量 |
| 跨层级 | 代码质量、安全、测试、架构 |
当变更涉及跨层级、公共API、基础设施或数据流时,添加架构角色。
当需要实际运行测试、代码检查或CI时,添加QA执行角色。
阅读references/specialists.md。为每个选定的角色并行启动一个通用子Agent。每个子Agent的提示信息按以下顺序排列:
- 共享发现约定
- 该角色的说明文档
- 范围数据包:
text
Role: [角色名称]
Branch: [分支名称]
Focus: [可选的聚焦内容,若无则填none]
Changed files:
- [文件路径]
请阅读实际文件,而非仅查看git diff。
请按照共享发现约定返回评审结果。不要查找命名自定义Agent,不要使用Agent目录。
如果运行时无法生成子Agent,则在此会话中按顺序运行各个角色的评审,并为每个输出标注角色名称。
每位专家必须:
- 阅读已变更的文件,而非仅查看diff
- 专注于自身领域
- 引用(或针对仓库级问题引用支持文件)
file:line - 评估严重程度:Critical(严重)、High(高)、Medium(中)、Low(低)
- 提出具体的修复建议,或标注(无发现)
No findings
Phase 3: Synthesis
阶段3:结果合成
After collecting specialist reports, synthesize:
- Deduplicate overlapping findings
- Flag conflicts and unresolved disagreements
- Identify issues that span domains
- Keep original role attribution
Use a generic subagent if spawning is available; otherwise do this pass in the host.
收集所有专家的评审报告后,进行合成:
- 去重重叠的发现
- 标记冲突和未解决的分歧
- 识别跨领域的问题
- 保留原始角色归属
如果可以生成子Agent,则使用通用子Agent完成此步骤;否则在主会话中完成。
Phase 4: Meta-analysis
阶段4:元分析
Run a second independent pass over the combined findings. Prompt:
text
Review this multi-specialist analysis. What patterns do you see differently? What risks were not considered? How would you re-prioritize these findings? Challenge the assumptions. Identify findings that are over-prioritized, under-prioritized, unsupported, or missing.If a second-model or independent-session tool exists, use it for this pass (and for Fresh Eyes in Phase 2). Otherwise launch another generic subagent, or run the pass in the host and label it as a separate pass.
对合并后的评审结果进行第二次独立评审。提示信息如下:
text
请评审这份多专家分析报告。你能发现哪些不同的模式?哪些风险未被考虑?你会如何重新排序这些发现?挑战现有假设。找出被过度重视、重视不足、无依据或遗漏的发现。如果存在第二模型或独立会话工具,请使用它完成此步骤(以及阶段2中的Fresh Eyes角色)。否则启动另一个通用子Agent,或在主会话中完成此步骤并标注为独立评审。
Phase 5: Report
阶段5:生成报告
Print the report in chat only. Do not write a file. Do not create issues, commit, or edit files.
Map specialist severity onto the report buckets:
- Critical → Critical (must fix). Any Critical finding makes commit readiness Not ready
- High or Medium → Warnings (should fix)
- Low → Suggestions (consider)
text
=== GOODREVIEW: [Target] ===
Branch: [branch] | Files: [N] changed | Roles: [list]
SPECIALIST FINDINGS
[Role]: [key findings with file:line]
FRESH EYES
[Independent second pass]
CROSS-SPECIALIST INSIGHTS
[Systemic issues, conflicts, overlapping patterns]
PRIORITIZED ISSUES
Critical (must fix):
- [Issue] - [file:line] - Found by: [Role]
Fix: [specific example]
Warnings (should fix):
- [Issue] - [file:line] - Found by: [Role]
Fix: [specific example]
Suggestions (consider):
- [Issue] - [file:line] - Found by: [Role]
Fix: [specific example]
COMMIT READINESS: Ready | Not ready - N critical issues remainIf there are no findings, say so and list residual risks or testing gaps.
仅在聊天中打印报告,不要写入文件。不要创建Issue、提交或编辑文件。
将专家评估的严重程度映射到报告的对应类别:
- Critical → 严重(必须修复)。任何严重发现都会使提交就绪状态变为未就绪
- High或Medium → 警告(应修复)
- Low → 建议(可考虑)
text
=== GOODREVIEW: [评审目标] ===
Branch: [分支名称] | Files: [N]个文件变更 | Roles: [角色列表]
专家评审结果
[角色]: [关键发现,包含file:line]
新视角评审
[独立第二次评审结果]
跨专家洞察
[系统性问题、冲突、重叠模式]
优先级排序的问题
严重(必须修复):
- [问题描述] - [file:line] - 发现者: [角色]
修复建议: [具体示例]
警告(应修复):
- [问题描述] - [file:line] - 发现者: [角色]
修复建议: [具体示例]
建议(可考虑):
- [问题描述] - [file:line] - 发现者: [角色]
修复建议: [具体示例]
提交就绪状态: 就绪 | 未就绪 - 剩余N个严重问题如果没有发现任何问题,请说明情况并列出剩余风险或测试缺口。
Dry-run selection
预演选择
Use these checks while executing the skill (not while authoring it):
- Elixir-only diff → Elixir, Security, Tests, Fresh Eyes
- Docs-only diff → Technical writing, Accuracy, Fresh Eyes
执行此技能时(而非编写时),使用以下检查:
- 仅Elixir文件变更 → Elixir、安全、测试、新视角评审
- 仅文档变更 → 技术写作、准确性、新视角评审
Rules
规则
- Use parallel generic subagents when the runtime supports them; otherwise sequential labeled briefs
- Every finding includes or supporting file references, plus a suggested fix
file:line - Run each git command as its own shell call
- Do not create issues, commit, or edit files
- Do not look up named custom agents
- Applying fixes is a later user request, not part of
/goodreview
$ARGUMENTS
- 当运行时支持时,使用并行通用子Agent;否则按顺序运行带标注的评审
- 每个发现必须包含或支持文件引用,以及具体的修复建议
file:line - 每个git命令作为独立的shell调用运行
- 不要创建Issue、提交或编辑文件
- 不要查找命名自定义Agent
- 修复问题属于后续用户请求,不属于的功能范围
/goodreview
$ARGUMENTS