PromptCode reviewOutput shown

Pull-request review that finds real problems

A reviewer prompt that stays on the changed lines and says when it is unsure.

What you get

You should get a short structured review of your diff: a two-sentence summary, a list of bugs with file and line, the risky assumptions, the tests that are missing and at most three style points. Because it only looks at changed lines, you avoid a pile of comments on old code. If the model is unsure it should say so, which is more useful than a confident guess. Treat it as a second pair of eyes before a human reviews.

Example output (illustration of the shape of a result, not a recorded test)

Summary: Adds retry to the payment call.
Bugs: payments.py:42 retries on every error, including 'card declined', so a customer can be charged twice.
Risky assumptions: timeout is assumed to be in seconds.
Missing tests: retry stops after a declined card.
Style: rename 'tmp' to 'attempt'.

How to use it

  1. Scroll to the end of this page and copy the prompt.
  2. Replace each [bracket] and paste your code or diff at the end of the prompt.
  3. Read the answer as a second opinion. Check each finding against the code before you act on it.

Fill in these fields

Change only the parts in [brackets]. The rest of the wording keeps the answer on task.

FieldWhat to enter
[language]Your own details.
[paste the diff]Your own details.

Change it for your case

  • If you want fewer comments, change 'at most three small points' to 'none'.
  • For a risky area such as payments, add 'pay special attention to money, retries and rounding'.
  • If your project has a style guide, paste its three key rules and ask the model to check against them.

Tips

  • Paste the diff, not the whole file.
  • A review is a second opinion. A human still approves the merge.

The prompt

Copy it, then fill in the [brackets]. We have not tested this prompt; we call a prompt tested only when a test result is shown.

You are a senior [language] engineer reviewing a pull request.
Review only the changed lines in this diff. Do not comment on code that did not change.
Return, in this order:
1. Summary: two sentences on what the change does.
2. Bugs: each with the file and line and why it fails. Say 'none found' if there are none.
3. Risky assumptions: input, timing, null or empty values.
4. Missing tests: the cases that would catch the bugs above.
5. Style: at most three small points.
If you are not sure, say so instead of guessing.

[paste the diff]