AgentSkillsCN

Review

评审

SKILL.md

/review — Pre-Commit Code Review

Usage

/review

Description

Reviews all staged and unstaged changes against CLAUDE.md rules before committing. Checks for scope violations, size limits, missing tests, and convention adherence.

Instructions

  1. Read CLAUDE.md to understand project rules and conventions.

  2. Run git diff and git diff --staged to see all changes.

  3. Review against this checklist:

    Scope:

    • Changes are scoped to the current PRD task
    • No out-of-scope modifications
    • Change size within limits (bug: 1-3 files, feature: 3-5)

    Quality:

    • No hardcoded values that should be configurable
    • Error handling is appropriate
    • No security vulnerabilities (injection, XSS, etc.)

    Conventions:

    • Code follows project style conventions
    • Naming is consistent with existing patterns
    • Architecture layer boundaries are respected

    Size:

    • No files exceed 500 lines
    • No functions exceed reasonable length

    Tests:

    • New code has corresponding tests
    • Bug fixes have regression tests
    • Tests actually test behavior, not implementation
  4. Report findings as PASS / WARN / FAIL for each category.

  5. If any FAIL items, do not recommend committing until resolved.

Model

haiku