Skip to content
Back to prompts
Engineering

Review code before merging

Get a focused review of correctness, failure cases, and the smallest fixes worth making.

  • Code review
  • Quality
  • Pull requests

Before you use it

Replace the text in [brackets] with your own context. Review the response before using it.

Review this [language or framework] change for [project purpose]. The intended behavior is [expected behavior]. Pay particular attention to [areas of concern].

Context:
[Relevant code or diff, callers, constraints, and existing tests]

Read the surrounding code before judging the change. Trace the inputs, outputs, and failure paths. Look for concrete correctness problems, data loss, security issues, accessibility regressions, and changes that break existing callers. Distinguish a demonstrated defect from a question that needs more context.

Prefer the smallest correction that fits the codebase. Do not propose a new abstraction or dependency just to satisfy a style preference. If a claim depends on an assumption, state the assumption and what would confirm it.

Return findings in order of impact. For each, give the relevant location, a realistic trigger, the consequence, and a suggested fix or useful test. Finish with any important behavior you could not verify. If you find no actionable defects, say so without inventing issues.