Skip to content
Hidden Logic Lab

Review the diff before you merge

Hand Claude Code the branch and ask for defects, missing tests, and anything a reviewer would bounce.

·Coding·20 min·Working

A review note you can paste, with file references and a short list of what to fix first.

  1. 1

    Open the branch

    Check out the pull request locally so Claude Code can read the diff and the surrounding files.

  2. 2

    Paste the prompt

    Ask for findings with file references. Reject any note that does not name a file.

  3. 3

    Fix the top two

    Apply the highest-severity items yourself, then re-run the tests the review mentioned.

The prompt to paste

You are reviewing a pull request in this repository. Stay inside the diff and the files it touches.

Read the change as a reviewer who has to maintain it next month. Report only what you can point to in the code.

Return:
1. A one-paragraph summary of what the change actually does.
2. Up to five findings, ordered by severity. For each: file, what is wrong, and the smallest fix.
3. Tests that are missing, or an explicit note that the existing tests cover the change.
4. Anything that looks intentional but surprising, phrased as a question, not a demand.

Do not restyle unrelated code. Do not invent a ticket, a benchmark, or a user complaint. If the diff is safe to merge, say so and name the residual risk.

A clean review is not an approval. You still read the diff.

Sample case written by Hidden Logic Lab. Not affiliated with Claude Code.

More in Coding

Get new cases in your inbox

Weekly notes on new use cases and agent workflows. No product pitches.

Occasional notes on new cases. No product pitches in the first note.