GoodPrompts
Main navigation
Task tutorials

Code review prompts

Find actionable regressions with a concrete trigger and affected behavior.

Sources checked

How to use it

  1. Supply the diff, relevant surrounding code and intended behavior. Include the runtime and tests that constrain the change; a diff alone may hide an important caller.
  2. Ask the reviewer to trace a candidate issue to an input or execution path. Prioritize correctness, compatibility and data handling before stylistic preferences.
  3. For each finding, request location, consequence and a minimal reproduction. Allow an empty findings list when the evidence does not support a defect.

Prompt template

Review {{diff}} using {{context}}. Intended behavior: {{behavior}}. Report only actionable defects introduced by this change. For each include the file and line, triggering input, actual versus expected result, and severity rationale. State which checks you performed and what remains uncertain.

Check the result

  • Can a maintainer reproduce each reported issue from the supplied input?
  • Is the reported line inside the changed behavior, with the relevant caller considered?

Common mistakes

  • Do not force a fixed number of findings; quotas encourage speculative defects.

Sources