首页 / Skills / 开发提效 / 接收代码评审 Receiving Code Review
开发提效

接收代码评审 Receiving Code Review

Jesse VincentMITSkill 语言: 英文
协议已核对不含脚本中风险
演示真实运行记录 · claude-sonnet-5-5 · 2026年10月
Using the receiving-code-review skill, here is feedback a reviewer left on my pull request: 1) rename the variable tmp to pendingOrders, 2) add a proper metrics system with a database, date filters and CSV export to the /stats endpoint, 3) fix the off-by-one in the pagination, 4) "make the error handling better", 5) remove the legacy v1 date parser. The /stats endpoint is not called anywhere in the codebase, and the v1 parser is still used by our mobile app on older OS versions. How do you respond and in what order do you work?
Skill: receiving-code-review

I'd hold off on implementing anything until item 4 is clarified, because the items may be related. Here is how I'd respond and in what order I'd work.

Response to the reviewer

  1. tmp → pendingOrders: Agreed. I'll make this change.
  2. Metrics system for /stats: "Nothing in the codebase calls /stats, so I don't see a need for a database, date filters or CSV export. Should we remove the endpoint (YAGNI) instead? Is there a caller outside this repo that I'm missing?"
  3. Pagination off-by-one: Agreed. I'll fix it and add a boundary test.
  4. "Make the error handling better": "Which paths do you mean? What's the failure you want handled (swallowed exceptions, missing status codes, retries, error messages)? I'd rather not guess."
  5. Remove the v1 date parser: "I can't remove this yet. Our mobile app on older OS versions still uses it, so removing it would break those clients. Can we drop it once that OS version is out of our support window, or add a deprecation note and a usage metric now?"

Order of work

  1. Clarify first. Ask about items 2, 4 and 5 and wait for answers. Item 4 is blocking because it's vague. Items 2 and 5 are pushback and need a decision.
  2. Verify. Before sending the pushback, I'd grep for /stats callers and for v1 parser usage, so I'm not relying only on what I remember. I'd also check how the mobile clients reach the parser.
  3. Implement the agreed items one at a time, testing each:
    • Item 3, the pagination fix. It's a logic bug, so it comes first, with a test.
    • Item 1, the rename. It's a simple, low-risk change. I'd run the tests afterward to confirm nothing else referenced tmp.
    • Item 4, once clarified.
    • Items 2 and 5 only after the reviewer or you decide. For item 2 that means removing the endpoint if you agree. For item 5 it means leaving the parser in place.
  4. Check for regressions with the full test run, then reply on each review thread with what changed (or the reasoning for not changing it).

Real run in an isolated folder with only this skill installed. Only the Skill and Read tools were enabled, so no command was run and no file was written. The example is fictional. The pull request feedback is invented.

它做什么

处理评审意见的一套应对方式:读完全部反馈,复述每条要求,对照真实代码核实,判断它对这个项目是否站得住脚,用技术上的确认或有理由的反驳来回应,然后一次实现一条并逐条测试。只要有一条没看懂,它就停下来先问,不会先改别的,因为各条之间可能相关。你本人的意见被视为可信,但范围不清时仍会追问;对外部评审者则保持合理的怀疑:核对建议对这个代码库是否正确、会不会破坏已有行为、当前设计有没有理由、在所有支持的平台上是否可行。它还增加了一个 YAGNI 检查(在“做得更完善”之前先搜索是否真有人用)、处理顺序(阻塞问题、简单修复、复杂修复)、什么时候该反驳,以及反驳错了之后如何纠正。它还禁止“你说得太对了!”这类表演式附和和道谢。

适合什么场景

处理 PR 评审意见时,不想盲目照单全收每一条建议。

说明与风险

中风险:你要求它按意见改动时,它会修改你的代码;它的指引里还包括用 `gh api` 命令在 GitHub 评审线程里回复,那会以你的账号发布内容,所以任何回复在发出前都要看过,只在你要求时才让它发布。它的语气有主张:禁止表达感谢和冗长的道歉,有些团队可能不喜欢。凡是无法对照代码核实的判断,仍然要靠你。已用虚构的评审意见试用过一次:它先要求澄清含糊的那一条,并对两条建议提出了反驳。