15 min / intermediate / 5 steps
PR Reviews That Actually Find Bugs
Stop rubber-stamping PRs. Use Claude to catch real bugs, identify untested code paths, and write review comments that actually help.
Most PR reviews miss the bugs that matter. Reviewers skim for style issues and obvious mistakes, but miss the subtle logic errors, the missing edge case handling, and the code paths that have zero test coverage. This tutorial shows you how to use Claude as a second pair of eyes that reads the diff, understands the context, and flags the things humans routinely miss.
follow along in
You need: A Claude account. Open claude.ai in a browser, or the Claude desktop app.
step 01 / 05
Pull down a PR
Use the gh CLI to check out the PR branch locally. This gives Claude access to the full file context, not just the diff. You want Claude reading real code, not a stripped-down patch.
PromptPaste into ClaudeI've checked out PR #247 (feature/user-auth-refactor). Before I start reviewing, what context should I pull together?what you should see
Pull down a PRmy-projectShareDescribe a task or ask a question+Accept editsstep 02 / 05
Ask Claude to review
With the branch checked out, ask Claude to review the PR. Give it the diff plus context about what the PR is trying to do. The more specific your prompt, the more useful the review.
PromptPaste into ClaudeReview this PR. It refactors auth from session cookies to JWTs. What are the biggest risks?Click a violet field and type your own details, then copy.
what you should see
Ask Claude to reviewmy-projectShareDescribe a task or ask a question+Accept editsstep 03 / 05
Go deeper on suspicious code
When Claude flags something, follow up. Ask it to read the specific file, trace the data flow, and explain exactly what could go wrong. This is where the real bugs surface.
PromptPaste into ClaudeYou flagged the logout issue. Trace the full data flow: what actually happens between a user clicking "logout" and the JWT becoming invalid? Read the actual files.what you should see
Go deeper on suspicious codemy-projectShareDescribe a task or ask a question+Accept editsstep 04 / 05
Write missing tests
Claude can identify which code paths have no test coverage and write the tests. This is faster than hunting for gaps manually and produces tests that reflect real failure modes, not just happy paths.
Prompt 1 of 2Paste into ClaudeLook at our auth tests and the actual jwt.ts implementation. What's not tested that could cause a production incident?Prompt 2 of 2Paste into ClaudeYes, write all four.what you should see
Write missing testsmy-projectShareDescribe a task or ask a question+Accept editsstep 05 / 05
Leave better review comments
Use Claude to draft the actual review comments. Good review comments explain the risk, point to the specific code path, and suggest a concrete fix. Claude can draft these faster than you can type them, and at a consistently high quality.
PromptPaste into ClaudeDraft all the review comments for PR #247. Three blocking issues and two suggestions, formatted as a GitHub review body.what you should see
Leave better review commentsmy-projectShareDescribe a task or ask a question+Accept edits
Tell someone what you built
Just finished "PR Reviews That Actually Find Bugs" on Claude Code Guide. Took about 15 min, and it's free: https://claudecodeguide.dev/tutorials/pr-review-workflow
New guides, when they ship
One email, roughly weekly. CLAUDE.md templates, workflows I actually use, and the cut-for-length stuff that does not make the public guides. One-click unsubscribe.
Or read Product Field Notes, the Substack
