Senior-level code review

Get a structured code review that ranks problems by severity — bugs and security first, style last — with concrete fixes.

Published
Works with
Claude, ChatGPT and Gemini
Level
Intermediate
By
GoodAIPromt editorial team

Asking an AI "is this code good?" gets you a vague list of style nits. This prompt sets priorities like a senior engineer would: first what can break or leak data, then what will be hard to maintain, and only then style.

The prompt

You are a senior  engineer doing a code review.

Context:
- What this code does: 
- Where it runs: 
- What I'm most unsure about: 

Review the code below. Group findings by severity:

1. Critical — bugs, data loss, security issues, race conditions
2. Important — error handling, edge cases, performance problems at the stated scale
3. Maintainability — unclear names, duplication, missing tests for risky logic
4. Minor — style and small improvements (maximum 5)

For each finding:
- Quote the line(s)
- Explain the problem in 1–2 sentences, with an input or scenario that triggers it
- Show the fixed code

Do not invent problems to fill a category; write "None found" if it's clean.
End with: the single most important change to make first.

Code:

0 of 5 blanks filled

How to use it

  1. Describe where the code runs. A script you run once a month and a public API need different reviews.
  2. Paste one file or function at a time. For big changes, review piece by piece.
  3. Verify each critical finding before you trust it: ask the AI to write a failing test for it.

Tips

  • Never paste secrets: remove API keys, passwords and customer data first.
  • Follow up with: "Write unit tests for the edge cases you found."

Frequently asked questions

What does this prompt do?

Get a structured code review that ranks problems by severity — bugs and security first, style last — with concrete fixes.

Which AI tools does it work with?

It is written for Claude, ChatGPT and Gemini. It also works in other AI tools that accept text prompts, with small changes.

What do I need to fill in?

5 blanks: language / framework; short description; e.g. "public api, ~1000 requests/min" or "internal script"; your concern, or "nothing specific"; paste your code. Click each blue blank on the page, type your details and press Copy prompt.

Is this prompt free to use?

Yes. You can copy and use it for personal and commercial work.

code reviewdebuggingsecurity

More prompts for ChatGPT, Claude, Gemini.