wowprompt

Code review with severity table and suggested fixes

Reviews pasted code for bugs, security issues, performance and readability, and returns findings ranked by severity with fixes. Use it before opening a pull request or when reviewing code in a language you know less well.

A severity-ranked table of findings with line numbers, issue, impact and fix, followed by corrected code for the critical issues
The output this prompt produced, unedited.

The prompt

Goal

Review the code below as a careful senior engineer would, and report only findings that matter.

Inputs

  • Language and framework: [e.g. Python 3.12 with FastAPI]
  • What the code is meant to do: [one or two sentences]
  • Context: [where it runs, who calls it, expected input size]
  • Code: [paste the code here]

Review areas

  1. Correctness: logic errors, off-by-one, wrong conditions, unhandled cases.
  2. Security: injection, unsafe input handling, secrets in code, weak authorisation checks.
  3. Error handling: swallowed exceptions, missing timeouts, unclear failure states.
  4. Performance: repeated work, needless queries in loops, memory growth.
  5. Readability: naming, function length, duplication, missing types.

Output format

  1. Summary: three sentences on overall quality and the biggest risk.
  2. Findings table:

| Severity | Line or area | Issue | Why it matters | Suggested fix |

Severity is one of critical, high, medium, low. Sort critical first.

  1. Corrected code for every critical and high finding, showing only the changed functions.
  2. What is done well: two or three short points.

Check before answering

  • Every finding points to a specific line or function.
  • No finding is a matter of taste presented as a bug.
  • Fixes keep the same behaviour except where behaviour is the bug.
  • Security findings explain how the issue could be exploited.
  • Corrected code follows the language's standard style.
  • If nothing is critical, say so plainly.
code review checklistai code reviewfind bugs in codesecure code reviewpull request review

How to run this

Copy the prompt and paste it into Gemini, then set the aspect ratio to 3:4. No reference photo is needed for this one.

The prompt is written in Markdown with each part under its own heading, which is what the copy action hands over. Change one section at a time, keeping the rest intact, so you can tell which change did the work.

Related prompts

All productivity