code-review

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Code Review Skill

代码审查技能(Code Review Skill)

Perform a structured, thorough code review following the process below.
按照以下流程进行结构化、全面的代码审查。

Step 1 — Load the Checklist

步骤1 — 加载检查清单

Read
checklist.md
(in this skill's directory) and apply every item before writing the review.
读取本技能目录下的
checklist.md
文件,并在撰写审查意见前应用其中的每一项内容。

Step 2 — Determine Scope

步骤2 — 确定审查范围

  • If the user specifies files, review those.
  • Otherwise, review the current diff (
    git diff HEAD
    or the staged changes).
  • 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
    ,
    suggestion
    , or
    nit
  • 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
按照以下精确格式输出审查结果:
undefined

Code 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. -->
  • path/to/file.ts:42
    [blocking] Description and why it must change.
<!-- 合并前必须修复。无则留空。 -->
  • path/to/file.ts:42
    [blocking] 问题描述及必须修改的原因。

Suggestions

Suggestions

<!-- Non-blocking improvements worth considering. -->
  • path/to/file.ts:18
    [suggestion] Description.
<!-- 非阻塞性的改进建议,值得考虑。 -->
  • path/to/file.ts:18
    [suggestion] 问题描述。

Nits

Nits

<!-- Trivial style or wording notes. -->
  • path/to/file.ts:5
    [nit] Description.
<!-- 细微的风格或措辞问题。 -->
  • path/to/file.ts:5
    [nit] 问题描述。

What Works Well

What Works Well

  • [At least one specific positive observation]
undefined
  • [至少一条具体的正面评价]
undefined

Step 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.
表述直接且具体,引用精确的行号。解释为什么需要修改,而不只是要修改什么。 假设用户的善意,认可做得好的地方。