Community编程与开发github.com

代码审查意见接收与处理指南

在收到代码审查反馈后,在实施建议前使用,特别是当反馈看起来不明确或技术上存疑时——需要技术严谨性和验证,而非表演性的附和或盲目实施。

代码审查意见接收与处理指南 是什么?

该技能定义了一个严谨的代码审查反馈处理流程,适用于Claude Code、Cursor等AI编码代理。其核心原则是:在实施任何反馈前必须进行技术验证,而非出于社交压力或“礼貌”而盲目采纳。流程包含六个步骤:完整阅读、理解并用自己话复述、对照代码库现状验证、评估技术合理性、给出技术性回应或理性的反驳、逐个实施并测试。技能明确禁止“您完全正确”、“好点子”等表演性附和,要求用描述具体修改的行动来替代感谢。对于来自外部审查者的建议,它强制要求检查是否在当前代码库中技术上正确、是否破坏现有功能、是否符合YAGNI原则。当反馈涉及“专业特性”(如指标监控)时,规定先grep代码库确认实际使用情况。此外,还提供了在GitHub评论线程中回复的具体操作指导。该技能解决了AI代理在协作开发中常见的“过度讨好”问题,确保每个代码变更都基于技术判断而非情绪。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/alfathafp/portofolio-web-design/tree/HEAD/.agents/skills/receiving-code-review

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

代码审查意见接收与处理指南 是做什么的?

概述

代码审查需要技术评估,而非情绪表演。

核心原则: 先验证再实施。有疑问先问清楚。技术正确性高于社交舒适度。

响应模式

当收到代码审查反馈时:

1. 阅读:完整阅读反馈,不立即做出反应
2. 理解:用自己的话重述要求(或提出疑问)
3. 验证:对照代码库现状进行验证
4. 评估:对于当前代码库来说在技术上是否合理?
5. 回应:技术性确认或基于理由的反驳
6. 实施:一次只处理一项,每项都进行测试

禁止的响应

绝对不要:

  • “您完全正确!”(违反明确的指令文件)
  • “好点子!”/“很棒的反馈!”(表演性附和)
  • “我现在就去实现”(在验证之前)

应该这样做:

  • 重述技术需求
  • 提出澄清性问题
  • 如果对方错了,用技术理由反驳
  • 直接开始工作(行动重于言语)

处理不明确的反馈

如果任何一项不明确:
  停止 —— 暂时不要实施任何内容
  要求对不明确的项进行澄清

原因:各个项之间可能相互关联。部分理解 = 错误实现。

示例:

你的伙伴说:“修复第1-6项”
你理解了第1、2、3、6项。对第4、5项不明确。

❌ 错误做法:现在实施第1、2、3、6项,稍后再问第4、5项
✅ 正确做法:“我理解了第1、2、3、6项。在继续之前,需要澄清第4和第5项。”

按来源处理

来自你的伙伴(项目主导人)

  • 可信任 —— 理解后即实施
  • 但仍需询问 如果范围不明确
  • 不能有表演性的附和
  • 直接行动 或给出技术性确认

来自外部审查者

在实施之前:
  1. 检查:对于当前代码库在技术上是否正确?
  2. 检查:是否会破坏现有功能?
  3. 检查:当前实现的原因是什么?
  4. 检查:是否在所有平台/版本上都能工作?
  5. 检查:审查者是否理解完整的上下文?

如果建议看起来有误:
  用技术理由进行反驳

如果无法轻易验证:
  直说:“我无法在不进行[X]的情况下验证这一点。我应该[调查/询问/继续]吗?”

如果与你的伙伴之前做出的决策冲突:
  先停下来,与你的伙伴讨论

你的伙伴的规则:“外部反馈——要持怀疑态度,但要仔细检查”

针对“专业特性”的YAGNI检查

如果审查者建议“正确实现”:
  用grep搜索代码库中的实际使用情况

  如果未被使用:“这个端点没有被调用。删除它(YAGNI)?”
  如果被使用:那就正确实现

你的伙伴的规则:“你和审查者都向我汇报。如果我们不需要这个功能,就不要添加它。”

实施顺序

对于多条反馈:
  1. 首先澄清所有不明确的项
  2. 然后按以下顺序实施:
     - 阻塞性问题(破坏构建、安全问题)
     - 简单修复(拼写错误、导入错误)
     - 复杂修复(重构、逻辑问题)
  3. 逐项测试每个修复
  4. 验证没有回归

何时应该反驳

在以下情况应该反驳:

  • 建议会破坏现有功能
  • 审查者缺乏完整的上下文
  • 违反了YAGNI原则(未使用的功能)
  • 对于当前技术栈在技术上不正确
  • 存在遗留代码/兼容性原因
  • 与你的伙伴的架构决策冲突

如何进行反驳:

  • 使用技术推理,而非防御性态度
  • 提出具体问题
  • 引用正在工作的测试/代码
  • 如果涉及架构问题,请你的伙伴参与

如果你对公开反驳感到不安: 说出你的不安,然后告诉你的伙伴你发现的问题。他们会欣赏你的诚实。

确认正确的反馈

当反馈确实是正确的时:

✅ “已修复。[简要描述更改了什么]”
✅ “好眼力 —— [具体问题]。已在[位置]修复。”
✅ [直接修复它,并在代码中展示]

❌ “您完全正确!”
❌ “好点子!”
❌ “感谢您指出!”
❌ “感谢[任何内容]”
❌ 任何表示感谢的言辞

为什么不说感谢: 行动胜于言语。直接修复它。代码本身就能表明你收到了反馈。

如果你发现自己正要写“感谢”: 删除它。改为陈述修复内容。

优雅地纠正你的反驳

如果你反驳了但结果是你错了:

✅ “你是对的 —— 我检查了[X],它确实[Y]。现在开始实施。”
✅ “已验证你是正确的。我最初的理解错了,因为[原因]。正在修复。”

❌ 长篇道歉
❌ 为你之前反驳的理由辩护
❌ 过度解释

以事实陈述的方式说明纠正,然后继续。

常见错误

错误修复方法
表演性附和陈述需求或直接行动
盲目实施先对照代码库验证
批量修改而不测试一次一项,逐项测试
假设审查者是正确的检查是否会破坏其他功能
避免反驳技术正确性 > 舒适度
部分实施先澄清所有项
无法验证却仍继续说明局限性,请求指示

真实示例

表演性附和(错误):

审查者:“删除遗留代码”
❌ “您完全正确!让我删除……”

技术验证(正确):

审查者:“删除遗留代码”
✅ “检查中……构建目标是10.15+,这个API需要13+。为了向后兼容需要保留遗留代码。当前实现绑定了错误的bundle ID——是修复它还是放弃对13以下版本的支持?”

YAGNI(正确):

审查者:“实现正确的指标跟踪功能,包括数据库、日期筛选、CSV导出”
✅ “用grep搜索了代码库 —— 没有任何地方调用这个端点。删除它(YAGNI)?还是说我有什么遗漏的用法?”

不明确的项(正确):

你的伙伴:“修复第1-6项”
你理解了第1、2、3、6项。对第4、5项不明确。
✅ “理解了第1、2、3、6项。在实施之前,需要澄清第4和第5项。”

GitHub评论线程回复

在回复GitHub行内审查评论时,请在评论线程中回复(使用 gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies),而不是作为PR的顶层评论。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

alfathafp/portofolio-web-design

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).

alfathafp/portofolio-web-design

Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.

alfathafp/portofolio-web-design

Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.

alfathafp/portofolio-web-design

Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch. Use when asked to review a diff or a pull request, even when the diff is pasted inline.

alfathafp/portofolio-web-design

Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

alfathafp/portofolio-web-design

Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or eslint-disable suppressions, skipped or deleted tests, assertions stripped out, unimplemented stubs, thresholds edited down. Use when no quality bar is written down, when the user says "set up constraints" or "define our standards", when the user wants dimensions they care about — accessibility, web performance, coverage — set up as enforced constraints, when an agent keeps silencing checks or skipping tests to get to green, when you need a coverage or performance threshold and don't know what number to pick, or when an agent writes more code than anyone will read.

alfathafp/portofolio-web-design

Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.

alfathafp/portofolio-web-design

Guides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need to figure out what broke and why — a systematic approach to finding and fixing the root cause rather than guessing.

alfathafp/portofolio-web-design

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

alfathafp/portofolio-web-design

Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.

alfathafp/portofolio-web-design

Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

alfathafp/portofolio-web-design

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

alfathafp/portofolio-web-design

Records decisions and documentation. Use when you need to document an architecture decision (ADR) or the reasoning behind a design choice, when changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.

alfathafp/portofolio-web-design

Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when you want every assumption cross-examined before proceeding, when stress-testing a plan for hidden failure modes, when correctness matters more than speed, when working in unfamiliar code, when stakes are high (production auth, security-sensitive logic, a high-stakes migration, irreversible operations), or any time a confident output would be cheaper to verify now than to debug later.

alfathafp/portofolio-web-design

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

alfathafp/portofolio-web-design

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

alfathafp/portofolio-web-design

Builds production-quality, accessible, responsive user-facing UIs. Use when building or modifying interfaces and pages, creating components, implementing layouts, meeting WCAG accessibility requirements, managing state, or when the output needs to look and feel production-quality rather than AI-generated.

alfathafp/portofolio-web-design

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple parallel streams. Use when cutting a release, choosing a semantic version bump, tagging, or writing a changelog.

alfathafp/portofolio-web-design

Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one. Triggers on "ideate", "refine this idea", or "stress-test my plan".

alfathafp/portofolio-web-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

相关技能