A Claude Code skill for writing thoughtful, collaborative code review comments. It covers how to phrase feedback so it helps the author instead of gatekeeping, what to look for across design, functionality, complexity, tests, naming, and consistency, and how to judge which issues are actually worth raising.
This skill helps Claude write review comments that feel like collaboration, not criticism. It produces feedback that:
- Opens with what is working before raising concerns
- Asks and explains rather than commanding or judging
- Uses shared ownership language ("we/our") instead of finger-pointing ("you/your")
- Backs suggestions with reasoning, code samples, or references
- Calibrates which issues are worth raising versus letting through
- Proposes out-of-scope refactors as follow-up tasks rather than blockers
It is equally useful when you want Claude to review a diff directly, or when you want help phrasing feedback you are writing yourself.
Claude activates this skill when you say things like:
- "Review this PR"
- "Leave comments on this diff"
- "What do you think about these changes?"
- "Give me feedback on this code"
- "Act as a code reviewer"
- "Critique this pull request"
- "What would you flag in this diff?"
- "Help me write a review comment"
It also activates when you paste a diff and ask what you think, even without using the word "review."
Use this skill any time you are:
- Reviewing a pull request or merge request
- Writing feedback on a diff
- Asking Claude to act as a code reviewer
- Wanting help phrasing a review comment collaboratively
- Unsure whether an issue is worth raising
SKILL.md # Review principles and what to look for
references/
comment-examples.md # Before/after pairs showing the principles applied
A review is a dialogue, not a verdict. The reviewer's job is to help the author ship better code, not to gatekeep or catch every imperfection. Many decisions are genuine opinion, and the author is usually closer to the code. Approach with that humility.
Start with what is working. Before flagging issues, acknowledge what the author got right. This sets a collaborative tone and makes harder comments land better. If the PR is genuinely good, say so directly - do not manufacture nitpicks to fill space.
Ask, explain, suggest. Not command, judge, or blame.
- Instead of "Don't do this" - "Could we handle this case in the middleware instead? That way we do not need to repeat the check in every route."
- Instead of "This is wrong" - "I am not sure this handles the case where
useris null. What do you think about adding a guard here?"
Explain your reasoning. "I'd extract this into a function" is a command. "I'd extract this into a function - it is called in three places and one of them already diverged, which might cause bugs" is a reason the author can evaluate.
Calibrate what you raise. Not every issue needs to be a comment. Ask: does merging without this change cause a real problem? A long list of minor nits dilutes the signal and discourages the author.
For each part of a change, the skill considers:
| Area | Questions |
|---|---|
| Design | Do the pieces fit together? Does this integrate well with the rest of the codebase? |
| Functionality | Does the code do what the author intended? Is the intent right for the users? |
| Complexity | Can you understand it quickly? Is it over-engineered for a speculative future problem? |
| Tests | Are they present, correct, and useful? Would they catch a regression? |
| Naming | Are names clear and specific enough to communicate intent without being verbose? |
| Comments | Do they explain why (the constraint, the tradeoff, the non-obvious behavior), not just what? |
| Consistency | Does the code follow existing conventions for style, naming, and file organization? |
| Documentation | If the change affects how users build, test, run, or release, is documentation updated? |
Each comment aims for:
- Location - what specifically you are looking at
- Observation - what you notice (neutral, not judgmental)
- Reasoning - why it matters
- Suggestion - what you would consider instead (as a question or option, not a command)
Short, targeted comments beat long paragraphs. If a comment needs more than a few sentences, that is often a signal to have a conversation instead.
Commanding (avoid):
Don't use a raw SQL query here. Use the ORM.
Collaborative (prefer):
Could we use the ORM here instead of raw SQL? We get automatic escaping and it stays consistent with the rest of the data layer - easier for the next person to follow.
Judgmental (avoid):
This is wrong. You're not handling the null case.
Observational with reasoning (prefer):
I think this might panic if
useris nil -GetName()would dereference a nil pointer. What do you think about adding a guard before this block?
Blocking (bugs, security, breaks contract):
user_idis being interpolated directly into the SQL string on line 34 - this is injectable. We should use a parameterized query:WHERE id = $1withargs=[user_id].
Non-blocking follow-up (refactor, style, preference):
Not a blocker, but I noticed
validate_addressis now called in four places with slightly different defaults. Might be worth a follow-up to centralize that.
See references/comment-examples.md for the full set of before/after examples.
This skill requires no shell execution or filesystem write permissions. It reads diffs and descriptions you provide and produces text comments. No tools beyond standard read access are needed.
- Download
pr-review.skill(the packaged version of this repo). - In Claude Code, run:
/install-skill pr-review.skill - The skill is now available in your session.
Clone this repo and point your Claude Code project at it, or copy SKILL.md into your project's .claude/skills/ directory.
- One skill, one purpose. This skill focuses on giving code review comments. Do not expand it to cover PR authorship, pre-submit checks, or deployment workflows.
- Specific trigger words. Any changes to the description frontmatter should include clear trigger phrases so Claude can activate this skill accurately.
- Progressive disclosure. Keep
SKILL.mdfocused on principles and structure. Place additional examples inreferences/comment-examples.mdrather than growing the main file. - Concrete examples. Show real review comment text rather than abstract advice.
- Minimal permissions. Do not add bash or shell execution to this skill. It does not need them.
- pr-best-practices - Author strong pull request titles and descriptions
- pr-presubmit - Run a structured pre-submit checklist before opening a PR
