mcpField
R
receiving-code-review

receiving-code-review

github.com/lucianghinda测试与质量43043 次安装今天更新
代码仓库

关于 receiving-code-review

一项指导如何评估代码审查意见再采取行动的技能。它强调依据代码库验证建议、先澄清不明确之处,并逐项实施和测试修改。

主要功能

  1. 01结合代码库验证审查意见
  2. 02澄清含糊的审查事项
  3. 03评估技术适用性与回归风险
  4. 04逐项实施并测试修复
  5. 05必要时以技术理由提出异议

适用场景

  1. 01评估外部审查者的反馈
  2. 02处理不明确或相互冲突的修改要求
  3. 03逐项修复多个问题并检查回归

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/lucianghinda/superpowers-ruby --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

禁止的回应

绝不:

  • “你完全正确!”(明显违反 CLAUDE.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(未使用的功能)
  • 对该技术栈而言技术上不正确
  • 存在遗留/兼容性原因
  • 与你的人类伙伴的架构决策冲突

如何反驳:

  • 使用技术推理,而不是防御性态度
  • 提出具体问题
  • 引用可用的测试/代码
  • 如果是架构问题,让你的人类伙伴参与

如果不敢当面反驳的信号: “Strange things are afoot at the 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