Responding to PR Review Comments with Confidence Using receiving-code-review
機械翻訳 / Machine-translated

機械翻訳 / Machine-translated
Original article: receiving-code-reviewでPRのレビュー指摘に根拠を持って対応 (cccskills)
Skill page: receiving-code-review
Key takeaways from this article
You may sometimes wonder whether to simply apply a PR review comment as-is or not.
With receiving-code-review installed, you can verify each comment against the code and its target environment before responding and making changes.
This article covers the step-by-step process the skill follows, how to install it, example prompts, and things to know before using it.
The agent does not immediately implement the review comment.
It first cross-references the code, then produces a draft response with reasoning.
For example, when asked to handle an external review requesting deletion of old implementation, the prompt might look like this:
I received a review comment on a PR saying "remove the legacy code."
Please check the code and its target environment to determine whether it's safe to delete.
The agent reads the comment and restates the requirement in its own words.
It then looks up things like the build target version and the requirements of the APIs being used.
The conclusion shown in the SKILL.md example is: "The build target is 10.15 and above, but this API requires 13 and above.
The old implementation is needed for backward compatibility."
It then asks the user whether they want to drop support for versions below 13.
The response contains no phrases like "you're absolutely right" or expressions of gratitude.
If the comment is correct, it simply says "fixed" and briefly describes the change. If the comment is mistaken, it pushes back with evidence from the code or tests.
**Don't take review comments at face value — verify first, then fix.
That is the core of this skill.
**
This skill handles review comments in a fixed six-step process.
The standard for judgment is technical correctness, not how the reviewer feels.
If even one item in the review comment is unclear, the agent stops and does not implement anything.
When items are related to each other, moving forward with only partial understanding can lead to incorrect implementation.
So it communicates clearly — for example, "I understand items 1, 2, 3, and 6. Items 4 and 5 need clarification" — separating what is understood from what is not.
Whether the instruction comes from the user themselves or from an external reviewer affects how it's handled.
The differences are as follows:
| Source of comment | How it's handled |
|---|---|
| The user themselves | Treated with trust. Implemented once understood; questions asked if scope is ambiguous |
| External reviewer | Verified before implementation. Checks whether it's correct for this codebase, whether it breaks existing functionality, whether there's a reason for the current implementation, whether it works across all environments and versions, and whether the reviewer has full context |
An external suggestion may conflict with a design decision the user made previously.
In that case, the user is consulted first.
When a suggestion is made to "implement something properly," the codebase is first searched to find where it's actually used.
If it's not called from anywhere, the response is: "This endpoint is never called. Is it okay to delete it?"
This is consistent with the YAGNI principle — don't build what you don't need.
When there are many comments, resolve any unclear points first, then proceed in this order:
Each fix is tested individually, and finally the whole thing is checked for regressions.
The common mistake of fixing everything at once and then testing all at once is explicitly avoided.
If you realize your counterargument was mistaken after the fact, there's no lengthy apology or justification.
Simply state: "I checked and the comment was correct. The reason is ~. I'll fix it." Then get back to work.
Run the following command in your terminal.
With npx skills add, you can choose which agent to install to, such as Claude Code or Codex.
npx skills add https://github.com/obra/superpowers --skill receiving-code-review
If you'd like the agent to install it for you, send the following message as-is:
次の Agent Skill をインストールしてください。
https://github.com/obra/superpowers/tree/main/skills/receiving-code-review
まず SKILL.md と付属ファイルの中身を確認し、不審な処理(外部への送信、認証情報の読み取りなど)がないことを確かめてから、Claude Code なら ~/.claude/skills/receiving-code-review/、Codex なら ~/.agents/skills/receiving-code-review/ に配置してください。
The installation location depends on the scope you want:
| Agent | Use across all projects | Use for a specific project only |
|---|---|---|
| Claude Code | ~/.claude/skills/ | .claude/skills/ in the project |
| Codex | ~/.agents/skills/ | .agents/skills/ in the project |
The skill consists of a single file, SKILL.md, and contains no scripts.
It is a set of instructions that determines how the agent proceeds, so it runs in your local environment.
The only external communication it performs is using the gh command when posting replies to GitHub.
Prompts can be written in your preferred language.
Here are three examples by use case:
Please cross-reference all the review comments on this PR against the code, and categorize them as either valid comments or unclear ones.
For each comment, you'll receive a restatement of the requirement and the result of checking it against the code.
For anything unclear, the questions to be answered are presented together in a list.
At this stage, no changes are made.
A reviewer told me to "properly implement metrics aggregation with database, date filters, and CSV export." Please investigate whether this is actually necessary.
The agent searches the codebase to find where the relevant endpoint is called.
If there are no callers, it responds with: "This is never called from anywhere. Is it okay to delete it, or is there a usage I may have missed?"
Please apply the agreed-upon review comments one by one, testing after each one. Also check for any impact on existing functionality at the end.
Fixes are applied starting with comments that affect functionality or security.
After each fix, a test is run, and a brief report of the changes is provided.
Finally, regressions are checked before the work is complete.
The final decision on what to fix should be made through agreement between the reviewer and the user.
This skill compiles the reasoning for counterarguments, but design-level decisions involve consulting the user.
For comments that cannot be verified locally, it will ask: "I can't verify this without ~. Should I investigate, ask someone, or proceed?"
Replies to per-line GitHub comments are posted within that comment's thread.
They are not posted as PR-level comments.
Since posting uses gh api, a working gh command is required.
Expressions of gratitude and agreement are intentionally omitted from responses.
If your team's convention calls for a brief acknowledgment, add it yourself before posting.
The license is MIT, and the original text is written in English.
**Before installing, read the contents of SKILL.md and confirm that the process fits your workflow.
**
Combining other skills from obra/superpowers lets you connect the work before and after a review.
requesting-code-review is a skill for requesting a review from another agent after implementation or before merging.
You can create a workflow where the resulting comments are verified with receiving-code-review before being applied.
systematic-debugging is a skill for investigating the cause of bugs or test failures using reproduction steps, logs, and recent changes.
It's useful for investigating failures that come up during testing after a fix.
finishing-a-development-branch confirms all tests after implementation is complete, then proceeds with either a merge or the creation of a Pull Request.
It's suited for wrapping up after review comments have been addressed.
No, pushback is not the default. Correct comments are simply fixed, and the changes are briefly described.
Counterarguments are only made when there is a technical reason — such as breaking existing functionality, the reviewer lacking full context, or adding a feature that isn't used.
Instructions from the user themselves are treated with trust and implemented once understood.
However, if the scope is ambiguous, it will ask a clarifying question.
For per-line review comments, replies are posted within that comment's thread.
They are not posted as PR-level comments.
receiving-code-review is a skill for handling review comments in order: verify, respond, fix, and test.
Unclear points are gathered and asked upfront, and external suggestions are verified against the code and its target environment.
Its defining feature is fixing and testing one item at a time, then confirming there's no impact on existing functionality at the end.
If you often find yourself unsure whether to apply a review comment, try it on one PR first.
For more details, visit the cccskills page.
This article is a repost of the cccskills article "receiving-code-reviewでPRのレビュー指摘に根拠を持って対応."
Skill details and installation instructions can be found on the cccskills receiving-code-review page.