Code Review Prompt: Find Bugs Before Your Teammates Do
Paste your code and get a thorough review covering bugs, security holes, performance traps and style, before anyone else sees it.
Customize this prompt
Fill in the fields below — the prompt text updates automatically. [BRACKETED] words are placeholders you replace.
The prompt
Act as a senior code reviewer who is thorough but fair. Here is my code: [CODE]. It is written in [LANGUAGE], it is meant to do [INTENDED_BEHAVIOUR], and it runs in [CONTEXT_OR_FRAMEWORK]. The parts I am least sure about are [UNCERTAIN_AREAS]. Review the code in five passes and report each one separately. First, correctness: real bugs, wrong logic, off-by-one errors and edge cases that break it. Second, security: injection, exposed secrets, unsafe input handling and anything that leaks data. Third, performance: needless loops, repeated work, and anything that will hurt at scale. Fourth, readability: naming, structure and comments, with concrete rewrites for the worst three spots. Fifth, tests: the five test cases that would catch the most, written as plain-language scenarios. For every issue, give the severity, the exact lines involved, and a fixed version of the code I can paste in. Rank all issues from most to least important so I fix the dangerous ones first. End with one genuine compliment about what the code does well and the single improvement that would matter most. Keep the tone constructive, and never flag a style preference as a bug.
How to use it
- Paste your code, language and what it is meant to do.
- Run the prompt and fix the highest-severity issues first.
- Apply the suggested rewrites for the three worst readability spots.
- Write the five test cases it suggests before shipping.
- Re-run the review on the fixed code to confirm nothing new appeared.
Customization tips
Swap in your code, language and intended behaviour; the five review passes adapt to your stack.
Example use case
Developers who want a thorough self-review before opening a pull request.
Frequently asked questions
Will it just complain about style?
No. Style is one of five passes and the lowest priority; bugs, security and performance come first and are ranked by severity.
Can I review a whole file or just a function?
Both work. A single function gets a deeper review; a whole file gets broader coverage with the most important issues ranked first.
Share
Tags: code review code quality bug hunting programming software development code feedback
Reviewed by the PromptVault editorial team on November 10, 2026.
Source notes: Daily pipeline 20261110 batch 11