A useful review is ordered and specific. This prompt makes the model check correctness and security before style, rate every finding and hand back a fix, so you get a short list of changes instead of a lecture.
Senior-level code review
A prioritised code review that checks correctness, security and performance, with a fixed snippet for every finding.
Act as a senior TypeScript engineer doing a careful code review. The code below is part of a production web API. Check, in this order: 1. Correctness: bugs, edge cases, off-by-one errors, unhandled errors and race conditions. 2. Security: injection, unsafe input handling, exposed secrets and missing permission checks. 3. Performance: needless work, N+1 queries and anything that will not scale. 4. Readability: naming, structure and anything a new teammate would trip over. For each finding give the severity (high, medium or low), the line or function, what is wrong, and a corrected snippet. List high-severity findings first. Do not comment on code that is fine. End with a three-line summary of the most important changes. Pay extra attention to: error handling and input validation. Code: (paste your code here)
Click a highlighted part to change it.
Make it yours
Pick an option or type your own. The preview updates as you go: copy it when it reads right, or open it straight in your AI tool.
Your version stays in this browser. Ctrl or ⌘ + Enter copies it.
About this prompt
Why it works
- A specific reviewer
Naming the language and seniority sets the depth and the conventions the review checks against.
- An order of checks
Correctness before style means the review spends its attention where the bugs live.
- A fixed output format
Severity, location, problem and fix make every finding something you can act on.
- Silence on what is fine
Telling it to skip good code removes the filler that buries the real issues.
Tips for better results
- Include the types or the function signature around the code, so it can check how the code is used.
- Review one function or file at a time; very long pastes get shallower reviews.
- In Cursor, select the code and paste the prompt into the chat so it can see the rest of the project.
- Follow up with “Write tests that would have caught the high-severity issues.”
Variations to try
- Security-only pass
Act as an application security engineer. Review the code below only for security issues: injection, authentication and authorisation gaps, unsafe deserialisation, secrets in code and unsafe defaults. For each issue give the risk, a realistic attack and the fix. Ignore style.
- Explain it to a junior
Review the code below as a patient mentor. Point out the three most important improvements, explain why each matters in plain words, and show the improved version. Keep it encouraging and skip nitpicks.
Questions
Is it safe to paste company code?
Check your company’s AI policy first. Many teams use an enterprise plan or a self-hosted model for private code.
Will it catch everything?
No. Treat it as a fast, thorough second reviewer, not a replacement for tests or a human review.
Did this prompt work for you?
Thanks. Your answer helps the next person.
Quick copy
Senior-level code review
Copies your version from the studio.
For prompt makers
Got a prompt that works every time?
Send it in. We review every submission by hand and credit you on the page when it goes live.