spec-requesting-code-review

Original🇨🇳 Chinese
Translated

Use when completing tasks, implementing major features, or before merging to verify work meets requirements

5installs
Added on

NPX Install

npx skill4agent add zixun-github/aisdlc spec-requesting-code-review

Tags

Translated version includes tags in frontmatter

SKILL.md Content (Chinese)

View Translation Comparison →

Request Code Review

Dispatch the code-reviewer subagent to catch issues before they spread.
Core Principles: Review early, review often.
Announce at the start: "I am using the spec-requesting-code-review skill to request a code review and dispatch the review subagent."

When to Request a Review

Mandatory:
  • After each task in subagent-driven development
  • After completing major features
  • Before merging to main
Optional but Valuable:
  • When stuck (for a fresh perspective)
  • Before refactoring (baseline check)
  • After fixing complex bugs

How to Request a Review

1. Get git SHAs:
bash
BASE_SHA=$(git rev-parse HEAD~1)  # or origin/main
HEAD_SHA=$(git rev-parse HEAD)
2. Dispatch the code-reviewer subagent:
Use the Task tool, with type code-reviewer, and fill in the template from
code-reviewer.md
Placeholders:
  • {WHAT_WAS_IMPLEMENTED}
    - What you just implemented
  • {PLAN_OR_REQUIREMENTS}
    - What should be implemented
  • {BASE_SHA}
    - Starting commit
  • {HEAD_SHA}
    - Ending commit
  • {DESCRIPTION}
    - Brief summary
3. Act on Feedback:
  • Fix Critical issues immediately
  • Fix Important issues before proceeding
  • Record Minor issues for later handling
  • Object if the reviewer is wrong (with reasoning)

Example

[Just completed Task 2: Add validation functions]

You: Request a code review before proceeding.

BASE_SHA=$(git log --oneline | grep "Task 1" | head -1 | awk '{print $1}')
HEAD_SHA=$(git rev-parse HEAD)

[Dispatch code-reviewer subagent]
  WHAT_WAS_IMPLEMENTED: Session index verification and repair functions
  PLAN_OR_REQUIREMENTS: Task 2 from docs/plans/deployment-plan.md
  BASE_SHA: a7981ec
  HEAD_SHA: 3df7661
  DESCRIPTION: Added verifyIndex() and repairIndex(), covering 4 issue types

[Subagent returns]:
  Pros: Clear architecture, has real tests
  Issues:
    Important: Missing progress indication
    Minor: Magic number (100) in report interval
  Assessment: Can proceed

You: [Fix progress indication]
[Proceed to Task 3]

Integration with Workflows

Subagent-Driven Development:
  • Review after each task
  • Catch issues before they accumulate
  • Fix before moving to the next task
Executing Plans:
  • Review after every batch (3 tasks)
  • Get feedback, apply it, and continue
Ad Hoc Development:
  • Review before merging
  • Review when stuck
Red Flags
Never:
  • Skip review because it's "too simple"
  • Ignore Critical issues
  • Proceed with unresolved Important issues
  • Argue against valid technical feedback
If the reviewer is wrong:
  • Object with technical reasoning
  • Show code/tests that prove it works
  • Ask for clarification
Template located at: spec-requesting-code-review/code-reviewer.md