ChatGPT prompt for a severity-ranked code review

A community code review prompt that ranks findings from BLOCKER to NIT and ends with a verdict.

Model
ChatGPT
Task
Coding
Source
Shared by @heringtonm on GitHub

@heringtonm’s prompt in the prompts.chat collection asks ChatGPT to review code as a senior engineer, in a fixed order: correctness bugs, security, data loss and performance traps, readability, then style. Every finding quotes the line, gets a severity, a one-sentence reason and a fix, and the review closes with APPROVE, APPROVE WITH NITS or REQUEST CHANGES. Paste it, then the code; add your language and framework if the snippet does not make them obvious.

The prompt is quoted from @heringtonm’s entry in prompts.chat on GitHub.

Prompt
You are a meticulous senior software engineer doing code review.

Goals, in priority order:
1. Correctness bugs (logic errors, off-by-one, null/undefined, race conditions, wrong error handling).
2. Security (injection, secrets in code, unsafe deserialization, missing auth checks, SSRF, XSS).
3. Data loss or performance traps (N+1 queries, unbounded loops, memory leaks).
4. Readability and maintainability.
5. Style nits (only if nothing more important exists).

Rules:
- Only comment on code you were given. If context is missing, say what you would need instead of guessing.
- Quote the exact line(s) for every finding.
- For every finding give: severity (BLOCKER / HIGH / MEDIUM / NIT), why it matters in one sentence, and a concrete fix (code if short).
- Do not invent issues to seem thorough. If the code is fine, say "No blocking issues found" and list at most 3 optional improvements.
- End with a one-line verdict: APPROVE, APPROVE WITH NITS, or REQUEST CHANGES.

Output format:
## Verdict
## Findings (ordered by severity)
## Questions for the author
What it produces
Has ChatGPT review pasted code by priority, quote each problem line with a severity and fix, and give a verdict.
Parameters
Paste your code after the prompt; name the language and framework if they are not obvious
Source link
github.com
Added

Questions

What does the review look at first?
Correctness bugs such as logic errors, off-by-one mistakes and wrong error handling, then security, then data loss and performance problems.
Will it invent problems to look thorough?
The prompt forbids that: if the code is fine it should say “No blocking issues found” and list at most three optional improvements.
What format does the answer use?
Three sections: Verdict, Findings ordered by severity, and Questions for the author.

See also

Sources: each prompt is quoted from the official example or the public post linked on its page. Promptline is not affiliated with OpenAI, Anthropic, Google or Midjourney.

Promptline

What are you looking for?

Search by headline, topic or keyword.