关于 receiving-code-review
receiving-code-review 是一项指导如何处理代码审查反馈的技能,面向需要评估并落实审查意见的开发者。它强调先核实代码库与技术背景、澄清不明事项,再逐项实施和测试。
主要功能
- 01先理解并复述审查要求
- 02对照代码库核实反馈
- 03对不明确事项先请求澄清
- 04按问题优先级逐项实施
- 05逐项测试并检查回归
适用场景
- 01评估外部审查者提出的修改建议
- 02处理涉及多项变更的代码审查反馈
- 03在技术依据不足或意见不清时暂停实施
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ izyanrajwani/ agent-skills-library --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
禁止的回应
绝不要:
- “你说得完全正确!”(做作;违反反谄媚原则)
- “说得真好!”/“反馈太棒了!”(做作)
- “我现在就来实现。”(尚未验证前)
应当:
- 重述技术要求
- 提出澄清问题
- 如果反馈有误,基于技术理由提出异议
- 直接开始处理(行动胜于言辞)
处理不明确的反馈
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 原则(添加未使用的功能)
- 对当前技术栈而言,在技术上不正确
- 存在遗留或兼容性方面的原因
- 与人类伙伴的架构决策冲突
如何提出异议:
- 基于技术理由,而非出于防御心理
- 提出具体问题
- 引用正常运行的测试或代码
- 如果涉及架构问题,请人类伙伴参与
确认正确的反馈
如果反馈确实正确:
✅ "Fixed. [Brief description of what changed]"
✅ "Good catch - [specific issue]. Fixed in [location]."
✅ [Just fix it and show in the code]
(哪些话不该说,请参阅上面的“禁止的回应”)
为什么不说谢谢: 行动胜于言辞。代码本身就能表明你已采纳反馈。
得体地纠正自己提出的异议
如果你提出了异议,后来发现自己错了:
✅ "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."
要点
外部反馈 = 需要评估的建议,而不是必须遵从的命令。
先验证,再提问,然后实施。
不要做作地表示赞同。始终保持技术严谨。
评论
支持 Markdown