requesting-code-review
作者: obra
在完成任務、實作主要功能或合併前使用,以驗證工作是否符合需求
npx skills add https://github.com/obra/superpowers --skill requesting-code-reviewRequesting Code Review
Dispatch a code reviewer subagent to catch issues before they cascade. The reviewer gets precisely crafted context for evaluation — never your session's history. This keeps the reviewer focused on the work product, not your thought process, and preserves your own context for continued work.
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:
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 general-purpose type, fill template at code-reviewer.md
Placeholders:
{DESCRIPTION}- Brief summary of what you built{PLAN_OR_REQUIREMENTS}- What it should do{BASE_SHA}- Starting commit{HEAD_SHA}- Ending commit
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 code reviewer subagent]
DESCRIPTION: Added verifyIndex() and repairIndex() with 4 issue types
PLAN_OR_REQUIREMENTS: Task 2 from docs/superpowers/plans/deployment-plan.md
BASE_SHA: a7981ec
HEAD_SHA: 3df7661
[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 task or at natural checkpoints
- 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
來自 obra 的更多技能
brainstorming
obra
在進行任何創意工作之前,你必須使用此方法——包括建立功能、構建元件、新增功能或修改行為。在實作之前,先探索使用者意圖、需求與設計。
creativeresearchdesign
systematic-debugging
obra
遇到任何錯誤、測試失敗或異常行為時使用,在提出修復方案之前
developmenttestingcode-review
writing-plans
obra
在接觸程式碼之前,當你擁有某個多步驟任務的規格或需求時使用。
developmentproject-management
using-superpowers
obra
在開始任何對話時使用 - 建立如何尋找及使用技能的方法,要求在做出任何回應(包括釐清問題)之前,必須先調用技能工具。
developmentdocumentproductivity
test-driven-development
obra
在撰寫實作程式碼之前,用於實作任何功能或錯誤修正時使用。
developmenttestingcode-review
executing-plans
obra
當您有書面執行計畫需要在獨立會話中執行並包含審查檢查點時使用
developmentproject-managementcode-review
verification-before-completion
obra
在聲稱工作完成、修復或通過之前,在提交或建立 PR 前使用——需要先執行驗證命令並確認輸出,才能做出任何成功的聲明;始終先有證據再斷言。
testingcode-reviewdevelopment
subagent-driven-development
obra
在當前會話中執行包含獨立任務的實作計畫時使用
developmentproject-management