home / skills / hxk622 / tokendance / requesting-code-review

This skill helps you trigger a structured code review workflow after each task or major feature, ensuring quality before merging.

npx playbooks add skill hxk622/tokendance --skill requesting-code-review

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
3.0 KB
---
name: requesting-code-review
display_name: 请求代码审查
version: 1.0.0
author: system
description: "完成任务、实现主要功能或合并前使用,验证工作是否满足要求。Use when completing tasks, implementing major features, or before merging to verify work meets requirements. Review early, review often."
tags: [code-review, review, request, 代码审查, 请求审查, merge, 合并, quality, 质量]
allowed_tools: []
max_iterations: 15
timeout: 300
enabled: true
match_threshold: 0.70
priority: 6
---

# Requesting Code Review

Dispatch superpowers:code-reviewer subagent to catch issues before they cascade.

**Core principle:** Review early, review often.

## When to Request Review

**Mandatory:**
- After each task in subagent-driven development
- After completing major feature
- Before merge to main

**Optional but valuable:**
- When stuck (fresh perspective)
- Before refactoring (baseline check)
- After fixing complex bug

## How to Request

**1. Get git SHAs:**
```bash
BASE_SHA=$(git rev-parse HEAD~1)  # or origin/main
HEAD_SHA=$(git rev-parse HEAD)
```

**2. Dispatch code-reviewer subagent:**

Use Task tool with superpowers:code-reviewer type, fill template at `code-reviewer.md`

**Placeholders:**
- `{WHAT_WAS_IMPLEMENTED}` - What you just built
- `{PLAN_OR_REQUIREMENTS}` - What it should do
- `{BASE_SHA}` - Starting commit
- `{HEAD_SHA}` - Ending commit
- `{DESCRIPTION}` - Brief summary

**3. Act on feedback:**
- Fix Critical issues immediately
- Fix Important issues before proceeding
- Note Minor issues for later
- Push back if reviewer is wrong (with reasoning)

## Example

```
[Just completed Task 2: Add verification function]

You: Let me request code review before proceeding.

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

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

[Subagent returns]:
  Strengths: Clean architecture, real tests
  Issues:
    Important: Missing progress indicators
    Minor: Magic number (100) for reporting interval
  Assessment: Ready to proceed

You: [Fix progress indicators]
[Continue to Task 3]
```

## Integration with Workflows

**Subagent-Driven Development:**
- Review after EACH task
- Catch issues before they compound
- Fix before moving to next task

**Executing Plans:**
- Review after each batch (3 tasks)
- Get feedback, apply, continue

**Ad-Hoc Development:**
- Review before merge
- Review when stuck

## Red Flags

**Never:**
- Skip review because "it's simple"
- Ignore Critical issues
- Proceed with unfixed Important issues
- Argue with valid technical feedback

**If reviewer wrong:**
- Push back with technical reasoning
- Show code/tests that prove it works
- Request clarification

See template at: requesting-code-review/code-reviewer.md

Overview

This skill helps you request and manage targeted code reviews during development so issues are caught early and do not cascade. It formalizes when to ask for review, what context to provide, and how to act on feedback. Use it to keep iterations safe, maintain momentum, and ensure merge readiness.

How this skill works

You collect the relevant git SHAs for the change range and dispatch a code-reviewer subagent with a short template describing what was implemented, the plan or requirements, and a brief description. The reviewer returns strengths, issues grouped by severity, and an assessment. You then triage and address the feedback according to severity.

When to use it

  • After completing each task in subagent-driven development
  • After implementing a major feature or feature batch
  • Before merging changes into main or release branches
  • When stuck and you need a fresh perspective
  • Before starting a large refactor to capture a baseline
  • After fixing a complex or risky bug

Best practices

  • Provide clear context: WHAT_WAS_IMPLEMENTED, PLAN_OR_REQUIREMENTS, BASE_SHA, HEAD_SHA, and a short DESCRIPTION
  • Review early and often: make review a routine after each task or task batch
  • Prioritize fixes: address Critical immediately, Important before proceeding, record Minor items for later
  • Be prepared to push back with evidence if the reviewer is incorrect—provide tests or demonstrations
  • Keep review requests concise and focused on the change range to speed feedback

Example use cases

  • After finishing Task 2 that adds verification and repair functions, request a review of the commit range to validate design and tests
  • Before merging a feature branch that touches core data structures, request review to catch regressions and API issues
  • When stuck on intermittent failures, dispatch a reviewer to get fresh eyes and suggestions
  • Prior to a large refactor, request a review on the current implementation to establish behavior expectations
  • After resolving a complex bug, request review to ensure the fix covers edge cases and does not introduce regressions

FAQ

What exact info should I include in a review request?

Provide WHAT_WAS_IMPLEMENTED, PLAN_OR_REQUIREMENTS, BASE_SHA, HEAD_SHA, and a one-line DESCRIPTION so the reviewer can focus on scope and intent.

How do I act on different severities of feedback?

Fix Critical issues immediately, resolve Important issues before moving forward, and log Minor issues for later sprints or backlog grooming.