requesting-code-review
obra/superpowers
在完成任務、實作主要功能時,或合併前,用於驗證工作是否符合需求
...展開全部關於requesting-code-review
「requesting-code-review 」這項技能旨在促進開發工作流程中的程式碼審查流程,確保程式碼在整合前符合既定需求與品質標準。 透過鼓勵開發人員及早且頻繁地尋求回饋,此技能解決了開發週期中常見的「未被發現的問題可能隨時間惡化」之問題。它藉由在團隊成員間促進協作與持續改進的文化,有助於維持高水準的程式碼品質與專案完整性。
常見問題
何時應申請程式碼審查?
在以子代理驅動的開發模式中,您應於每個任務完成後、完成主要功能後,以及合併至主分支之前,提出程式碼審查請求。
使用此技能需要哪些工具?
您需要具備 Git 版本控制權限,並使用「任務」工具來派遣程式碼審查員子代理程式。
對於簡單的修改,我可以跳過申請審查嗎?
不行,即使只是簡單的變更,也絕不應跳過審查,因為這可能導致關鍵問題被忽略。
若我不同意審查者的回饋,該怎麼辦?
您可以提出技術上的反駁理由,提供來自程式碼或測試的證據,並在必要時要求進一步說明。
這項技能是否與所有開發環境相容?
這項技能是針對可使用 Git 和 Task 工具的環境所設計,因此與現代開發實務具有廣泛的相容性。
Requesting 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/mainHEAD_SHA=$(git rev-parse HEAD)
2. Dispatch code reviewer subagent:
Dispatch a general-purpose subagent, filling the 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 proceedYou: [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: code-reviewer.md
安裝 requesting-code-review
請下載並將技能檔案解壓縮至您的 .claude/skills/ 目錄中。
下載 ZIP複製儲存庫並將技能檔案複製到您的專案中。
git clone https://github.com/obra/superpowers/blob/main/skills/requesting-code-review/SKILL.md # Copy SKILL.md to your .claude/skills/ directory
複製





首頁
