AgentSkillsCN

pr-review

提供 PR 代码审查规范,涵盖严重程度分级、反馈类型、审查语言规范,以及建设性反馈的最佳实践。适用于开展代码审查、撰写审查意见,或完善审查文档时使用。

SKILL.md
--- frontmatter
name: pr-review
description: Provides PR code review conventions including severity levels, feedback types, review language guidelines, and best practices for constructive feedback. Use when conducting code reviews, writing review comments, or refining review documents.

PR Review Conventions

Quick Start

Severity Levels

SeverityDescriptionBlocking
majorMust be addressed before merging to productionYes
minorNon-blocking if merged, but should be addressed in follow-upNo
suggestionLoose opinion — an idea the author can freely ignoreNo
nitStrong but unimportant opinion — stylistic preferenceNo

Feedback Types

TypeDescriptionGuidelines
questionNeeds clarification from authorUse when intent is unclear or design decision needs explanation
praisePattern or technique deserving appreciationInclude only 2-3 per review — highlight genuinely impressive work

Nit vs Suggestion

  • Nit: "I feel strongly about this, but it doesn't really matter" (naming, formatting preferences)
  • Suggestion: "Here's an idea you could consider" (alternative approach, optional optimization)

Review Language

  • Use "we", "I", or "the code" instead of "you"
  • Be specific in suggestions — include file paths and line numbers
  • Provide actionable feedback with code examples when possible
  • Prioritize: major items first, nits last

Praise Budget

Reviews should have 2-3 praise items maximum. Recognize genuinely impressive patterns, elegant solutions, or good architectural decisions. Don't overuse.

Review Checklist

Before finalizing any review, verify coverage of:

  • Code correctness and logic
  • Error handling
  • Type safety
  • Security implications
  • Performance considerations
  • Test coverage
  • Documentation needs
  • Conventional commit compliance

Verdict Criteria

ConditionVerdict
Any major issues remainCHANGES REQUESTED
Unanswered questions remainNEEDS DISCUSSION
Only minor/suggestion/nitAPPROVED (with suggestions)
All items addressed or only praiseAPPROVED

Additional Resources

  • For full review process, report template, and examples, see conventions.md
  • For the complete review command, see .cursor/commands/code-review/review-pr.md
  • For interactive review refinement, see .cursor/commands/code-review/interactive-review.md