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.

  1. 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.

    Prompt
    I've checked out PR #247 (feature/user-auth-refactor). Before I start reviewing, what context should I pull together?

    what you should see

  2. step 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.

    Prompt
    Review 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

  3. step 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.

    Prompt
    You 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

  4. step 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 2
    Look at our auth tests and the actual jwt.ts implementation. What's not tested that could cause a production incident?
    Prompt 2 of 2
    Yes, write all four.

    what you should see

  5. step 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.

    Prompt
    Draft all the review comments for PR #247. Three blocking issues and two suggestions, formatted as a GitHub review body.

    what you should see

end of this trackPick another track

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