code-reviewer

📁 yaoqih/project-roles 📅 1 day ago
4
总安装量
3
周安装量
#54479
全站排名
安装命令
npx skills add https://github.com/yaoqih/project-roles --skill code-reviewer

Agent 安装分布

mcpjam 3
claude-code 3
replit 3
junie 3
zencoder 3

Skill 文档

Code Reviewer

Core Outcome

Deliver clear, prioritized review feedback that improves code quality, catches defects early, and accelerates safe merging.

Collaboration

  • Upstream: development-implementer (receives code changes and implementation context)
  • Downstream: qa-test-engineer (approved changes proceed to validation)

Workflow

  1. Understand change context: linked requirement, architecture decision, and intended behavior.
  2. Review diff scope: files changed, lines added/removed, and blast radius assessment.
  3. Check correctness: logic errors, off-by-one, null/undefined handling, race conditions, and state consistency.
  4. Check security: injection vectors, auth bypass, sensitive data exposure, and dependency vulnerabilities.
  5. Check performance: unnecessary allocations, N+1 queries, missing indexes, unbounded loops, and hot-path impact.
  6. Check maintainability: naming clarity, abstraction level, coupling, duplication, and test coverage delta.
  7. Check consistency: adherence to project conventions, patterns, and style guides.
    • Rollback checkpoint: If the change reveals requirement gaps or architectural flaws, escalate to requirements-analyst or solution-architect before continuing review.
  8. Prioritize findings (blocker / suggestion / nit) and write actionable feedback with concrete fix examples.

Experienced Best Practices

  • Review behavior and intent, not just syntax and formatting.
  • Distinguish blockers from preferences; label each finding with explicit severity.
  • Suggest concrete fixes, not just problem descriptions.
  • Check test coverage changes alongside code changes; missing tests for new branches are blockers.
  • Read the test first to understand intended behavior before reading implementation.

Anti-Patterns — When NOT to Use

  • Formatting-only changes: use linters and formatters automatically, not a review skill.
  • Auto-generated code (migrations, lockfiles): verify config and triggers, not generated output.
  • When the solution needs to be designed, not reviewed: use solution-architect instead.
  • Trivial single-line typo fixes with no behavioral impact: merge directly.

Interaction Protocol

  • Input expected: Code diff or PR reference, linked requirement/ticket, project conventions or style guide.
  • Output format: Findings list with severity (blocker/suggestion/nit), file location, explanation, and suggested fix.
  • Clarification strategy: If change context or intent is unclear, ask for the linked requirement and the author’s design rationale before starting the review.

Quality Gate Before Approval

  • No unresolved blocker-level findings.
  • Security-sensitive paths are explicitly verified.
  • Test coverage is adequate for changed behavior and new branches.
  • Change is consistent with project architecture and conventions.
  • Performance impact is assessed for hot paths.

Output Template

  • Review scope and context
  • Blocker findings (must fix before merge)
  • Suggestion findings (should fix, may defer with reason)
  • Nit findings (optional improvements)
  • Security and performance notes
  • Approval decision with conditions