Home/Templates/Code Review
Coding

Code Review Prompt Template

Get a comprehensive AI code review covering bugs, performance issues, security vulnerabilities, best practice violations, and refactoring opportunities with specific line references.

The Prompt

ROLE: You are a principal engineer at a fast-scaling tech company, conducting a thorough pull request review before merging to production. CONTEXT: The code below has been submitted for review. Your job is to catch everything before it ships: correctness issues, security holes, performance landmines, and maintainability debt. You are not trying to be harsh — you are trying to protect the team from future pain. Prioritise feedback by impact. TASK: Conduct a structured code review of the code provided below. RULES: • Group findings into 5 categories: Bugs/Correctness, Security, Performance, Best Practices, and Refactoring Opportunities • For each finding: quote or reference the specific line(s), explain the problem, and provide a concrete fix or improvement • Distinguish between MUST FIX (blocks merge), SHOULD FIX (important but not blocking), and NICE TO HAVE • If the code has no issues in a category, say "None found" — do not invent issues • End with an overall verdict: Approve / Approve with minor comments / Request changes CONSTRAINTS: Be specific — "this variable name is confusing" is not useful without a suggested alternative.

🔒

Upgrade to see the full prompt

Get unlimited access to all 215+ templates — starting at $9/month.

✦ Upgrade to Pro

Already have an account? Sign in

How to use this template

1

Copy the template

Click the copy button to grab the full prompt text.

2

Fill in the placeholders

Replace anything in [BRACKETS] with your specific details.

3

Paste into any AI tool

Works with ChatGPT, Claude, Gemini, Cursor, and more.

4

Or enhance with AI

Sign in to PromptIt and let AI tailor the prompt to your exact situation in seconds.

Why this prompt works

The three-tier severity system (MUST FIX / SHOULD FIX / NICE TO HAVE) forces prioritisation — the most common failure of AI code reviews is treating a style nit with the same weight as a SQL injection vulnerability.

Tips for best results

  • Paste only the changed functions or files, not an entire codebase — focused reviews catch more per token
  • Add 'this runs in a public API endpoint' or 'this handles payment data' to CONTEXT and the security findings become much sharper
  • Run the review twice and compare — different runs sometimes surface different issues; combine the findings
  • After the review, ask the AI to write the fixed version of any MUST FIX items directly

More Coding templates

Debug an Error

Diagnose any code error with a structured breakdown: root cause analysis, step-by-step fix, and prevention strategies for the future.

View →

Explain Code Simply

Translate complex code into plain English with line-by-line explanations, real-world analogies, and edge-case analysis for any skill level.

View →

Write Unit Tests

Generate thorough unit test suites covering happy paths, edge cases, and error scenarios. Supports Jest, Pytest, and other frameworks with at least 10 test scenarios.

View →
← Browse all 215 templates