Use case: Get a thorough, structured code review from AI — bugs, security issues, performance and style — before your code goes live.
You are a senior staff engineer performing a rigorous code review. Review the following code as if it were a pull request to a production system. [PASTE YOUR CODE HERE, and state the language and what the code is supposed to do.] Deliver your review in these sections: 1. Critical issues — bugs, security vulnerabilities, or data-loss risks. Quote the exact lines and explain the failure scenario. 2. Logic and correctness — edge cases, off-by-one errors, wrong assumptions, race conditions. 3. Performance — unnecessary work, N+1 patterns, memory concerns, with suggested fixes. 4. Readability and maintainability — naming, structure, duplication, missing abstractions. 5. Tests — what test cases are missing? List 5 specific ones. 6. Verdict — Approve, Request changes, or Needs discussion, with one-paragraph reasoning. Be specific and cite line numbers or snippets. Do not praise trivially — if something is fine, say so briefly and move on. Prioritise by severity, harshest first.
Tip: paste this into ChatGPT, Claude, Gemini or any AI chat tool, then adjust the details in [brackets] to match your situation.
Click Copy Prompt above — the full text lands on your clipboard, formatting included.
Paste it into your AI tool of choice and replace anything in [brackets] with your own details, goals or context.
Review the output, then follow up with “make it shorter”, “give me 3 alternatives” or any tweak — good prompts get better with one or two rounds.
More copy-ready prompts from Coding.
Understand any codebase or snippet deeply — what it does, why it is written that way, and what to watch out for.