claude-code·Published 2026.06.01
claude /review: Catch What You Missed Before Merging a PR
Anxious about missing something before merging code? /review reviews a Pull Request in your current session, so Claude Code helps with a pre-merge quality
If you've felt anxious right before merging your code into the main project, thinking "did I miss something?", /review becomes a solid safety net. It's a command that reviews a PR (Pull Request, a code submission) in your current session. It's great to use as a quality gate that passes one more set of eyes over your code before merging.
Definition (What It Is)
/review is a command that reviews a PR (Pull Request) within the current Claude Code session.
A PR is a code submission you put up saying, "Please merge this code change into the main project." Usually a teammate reads through it and checks for problems (code review), but /review has Claude Code join in that review. It looks over the changed code and points out potential problems or missed spots, so you can check quality before merging.
How to Use It (By Difficulty)
Basic — Reviewing a Specific PR
Type it with the PR number to review.
/review 123
Claude Code reviews the changes in PR #123. It points out which parts may be risky, whether any handling was left out, and so on.
Applied — Auto-Detecting the Current Branch
Type it plainly without a number.
/review
Then it automatically finds and reviews the PR linked to the branch (line of work) you're currently working on. It's handy since you don't need to check the number every time.
Common Pitfalls
- To review by PR number, that PR must actually be up. If you haven't put it up yet, it can't be found by number.
- Auto-detection (
/review) works only if there's a PR linked to the current branch. If there's no PR, it may not find a target to review. - A review is a tool to aid human judgment. Rather than following every point as-is, judge once more whether it fits your context.
Real-World Example
It's often used for the pre-merge check in team collaboration. Before merging a PR a teammate put up, you skim it once with /review and leave comments on parts human eyes easily miss. You reduce the review burden while still keeping quality.
Taking It Further
It's also good for self-checking a PR you put up. Before sending a merge request, look it over first with /review and tidy up obvious problems before handing it to a reviewer, so the review proceeds much more smoothly.
Summary
/review is a command that reviews a PR in the current session. You can specify a number (/review 123) or leave it blank to auto-detect the current branch's PR (/review). Using it as a pre-merge quality gate is a big help in catching what you missed.
Reference: Claude Code v2.1.154 (2026.05)
Comments
Comments 0
Checking sign-in status…
Loading comments…