关于 receiving-code-review
receiving-code-review 是供 Agent 处理代码审查意见的工作流技能。它强调先结合代码库核实建议、澄清不明确之处,再逐项测试后实施。
主要功能
- 01实施前核实审查意见
- 02优先澄清不明确事项
- 03结合代码库评估建议
- 04按优先级和复杂度安排修复
- 05逐项测试并检查回归
适用场景
- 01评估外部审查者的建议
- 02处理包含多个事项的审查反馈
- 03判断建议的功能是否确有需要
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ cloudflare/ workerd --skill receiving-code-review安装后在 Claude Code 中输入/receiving-code-review确认已加载。
详细介绍
代码审查反馈处理
概述
代码审查需要进行技术评估,而不是情绪化表现。
核心原则: 实施前先验证。不要凭假设行事,先提问。技术正确性高于社交舒适度。
回复模式
WHEN receiving code review feedback:
1. READ: Complete feedback without reacting
2. UNDERSTAND: Restate requirement in own words (or ask)
3. VERIFY: Check against codebase reality
4. EVALUATE: Technically sound for THIS codebase?
5. RESPOND: Technical acknowledgment or reasoned pushback
6. IMPLEMENT: One item at a time, test each
禁止的回复
绝对不要:
- “你说得完全正确!”(明确违反 AGENTS.md)
- “好观点!”/“反馈真棒!”(流于表面)
- “我马上实现。”(尚未验证就动手)
应该这样做:
- 重述技术要求
- 提出澄清问题
- 如果意见有误,就用技术理由说明
- 直接开始处理(行动胜于言辞)
处理不明确的反馈
IF any item is unclear:
STOP - do not implement anything yet
ASK for clarification on unclear items
WHY: Items may be related. Partial understanding = wrong implementation.
示例:
your human partner: "Fix 1-6"
You understand 1,2,3,6. Unclear on 4,5.
❌ WRONG: Implement 1,2,3,6 now, ask about 4,5 later
✅ RIGHT: "I understand items 1,2,3,6. Need clarification on 4 and 5 before proceeding."
针对不同来源的处理方式
来自你的合作伙伴
- 值得信任——理解后再实施
- 范围不明确时仍要提问
- 不要流于表面的赞同
- 直接行动或进行技术确认
来自外部审查者
BEFORE implementing:
1. Check: Technically correct for THIS codebase?
2. Check: Breaks existing functionality?
3. Check: Reason for current implementation?
4. Check: Works on all platforms/versions?
5. Check: Does reviewer understand full context?
IF suggestion seems wrong:
Push back with technical reasoning
IF can't easily verify:
Say so: "I can't verify this without [X]. Should I [investigate/ask/proceed]?"
IF conflicts with your human partner's prior decisions:
Stop and discuss with your human partner first
你的合作伙伴的规则:“外部反馈——保持怀疑,但要仔细核查。”
对“专业”功能进行 YAGNI 检查
IF reviewer suggests "implementing properly":
grep codebase for actual usage
IF unused: "This endpoint isn't called. Remove it (YAGNI)?"
IF used: Then implement properly
你的合作伙伴的规则:“你和审查者都向我汇报。如果我们不需要这个功能,就不要添加。”
实施顺序
FOR multi-item feedback:
1. Clarify anything unclear FIRST
2. Then implement in this order:
- Blocking issues (breaks, security)
- Simple fixes (typos, imports)
- Complex fixes (refactoring, logic)
3. Test each fix individually
4. Verify no regressions
何时提出异议
在以下情况提出异议:
- 建议会破坏现有功能
- 审查者不了解完整背景
- 违反 YAGNI(功能无人使用)
- 对于当前技术栈来说不正确
- 存在旧版或兼容性原因
- 与你的合作伙伴的架构决策冲突
如何提出异议:
- 使用技术理由,而不是采取防御姿态
- 提出具体问题
- 引用可运行的测试或代码
- 涉及架构问题时,请你的合作伙伴参与
如果不方便公开提出异议,请发出信号:“Circle K 有怪事发生。”
确认正确的反馈
当反馈确实正确时:
✅ "Fixed. [Brief description of what changed]"
✅ "Good catch - [specific issue]. Fixed in [location]."
✅ [Just fix it and show in the code]
❌ "You're absolutely right!"
❌ "Great point!"
❌ "Thanks for catching that!"
❌ "Thanks for [anything]"
❌ ANY gratitude expression
为什么不说谢谢: 行动胜于言辞。直接修复即可。代码本身就能表明你听取了反馈。
**如果你发现自己正要写“谢谢”:**删掉它,直接说明修复内容。
得体地纠正自己的异议
如果你提出了异议,后来发现自己错了:
✅ "You were right - I checked [X] and it does [Y]. Implementing now."
✅ "Verified this and you're correct. My initial understanding was wrong because [reason]. Fixing."
❌ Long apology
❌ Defending why you pushed back
❌ Over-explaining
如实说明更正,然后继续处理。
常见错误
| 错误 | 修正方法 |
|---|---|
| 流于表面的赞同 | 说明要求,或直接行动 |
| 盲目实施 | 先对照代码库进行验证 |
| 未测试就批量处理 | 一次处理一项,每项都进行测试 |
| 假设审查者是对的 | 检查是否会造成问题 |
| 回避提出异议 | 技术正确性 > 舒适度 |
| 只实施一部分 | 先澄清所有事项 |
| 无法验证仍然继续 | 说明限制,并询问如何处理 |
实例
流于表面的赞同(不佳):
Reviewer: "Remove legacy code"
❌ "You're absolutely right! Let me remove that..."
技术验证(良好):
Reviewer: "Remove legacy code"
✅ "Checking... build target is 10.15+, this API needs 13+. Need legacy for backward compat. Current impl has wrong bundle ID - fix it or drop pre-13 support?"
YAGNI(良好):
Reviewer: "Implement proper metrics tracking with database, date filters, CSV export"
✅ "Grepped codebase - nothing calls this endpoint. Remove it (YAGNI)? Or is there usage I'm missing?"
事项不明确(良好):
your human partner: "Fix items 1-6"
You understand 1,2,3,6. Unclear on 4,5.
✅ "Understand 1,2,3,6. Need clarification on 4 and 5 before implementing."
GitHub 讨论串回复
在 GitHub 上回复行内审查评论时,请在评论讨论串中回复(gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies),而不是发布顶层 PR 评论。
总结
外部反馈 = 需要评估的建议,而不是必须遵循的命令。
验证。质疑。然后实施。
不要流于表面的赞同。始终坚持技术严谨性。
评论
支持 Markdown