code-review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCode Review Skill
代码审查技能(Code Review Skill)
Perform a structured, thorough code review following the process below.
按照以下流程进行结构化、全面的代码审查。
Step 1 — Load the Checklist
步骤1 — 加载检查清单
Read (in this skill's directory) and apply every item before writing the review.
checklist.md读取本技能目录下的文件,并在撰写审查意见前应用其中的每一项内容。
checklist.mdStep 2 — Determine Scope
步骤2 — 确定审查范围
- If the user specifies files, review those.
- Otherwise, review the current diff (or the staged changes).
git diff HEAD - Do not review files outside the stated scope.
- 如果用户指定了文件,审查这些文件。
- 否则,审查当前的代码差异(或暂存的更改)。
git diff HEAD - 不要审查超出指定范围的文件。
Step 3 — Analyze
步骤3 — 分析问题
Work through the checklist systematically. For each issue found, note:
- File path and line number
- Severity: ,
blocking, orsuggestionnit - Clear description of the issue and why it matters
系统地逐一检查清单内容。对于发现的每个问题,记录:
- 文件路径和行号
- 严重程度:(阻塞性)、
blocking(建议性)或suggestion(细微问题)nit - 清晰的问题描述及其影响原因
Step 4 — Write the Review
步骤4 — 撰写审查意见
Output the review in this exact format:
undefined按照以下精确格式输出审查结果:
undefinedCode Review
Code Review
Summary
Summary
[One paragraph: overall quality, confidence in the change, merge recommendation]
[一段文字:整体质量、对变更的信心、合并建议]
Blocking Issues
Blocking Issues
<!-- Must be fixed before merge. Empty = none. -->
- [blocking] Description and why it must change.
path/to/file.ts:42
<!-- 合并前必须修复。无则留空。 -->
- [blocking] 问题描述及必须修改的原因。
path/to/file.ts:42
Suggestions
Suggestions
<!-- Non-blocking improvements worth considering. -->
- [suggestion] Description.
path/to/file.ts:18
<!-- 非阻塞性的改进建议,值得考虑。 -->
- [suggestion] 问题描述。
path/to/file.ts:18
Nits
Nits
<!-- Trivial style or wording notes. -->
- [nit] Description.
path/to/file.ts:5
<!-- 细微的风格或措辞问题。 -->
- [nit] 问题描述。
path/to/file.ts:5
What Works Well
What Works Well
- [At least one specific positive observation]
undefined- [至少一条具体的正面评价]
undefinedStep 5 — Tone
步骤5 — 语气要求
Be direct and specific. Reference exact line numbers. Explain why — not just what to change.
Assume good intent. Acknowledge what is done well.
表述直接且具体,引用精确的行号。解释为什么需要修改,而不只是要修改什么。
假设用户的善意,认可做得好的地方。