Claude Senior Code Review Prompt — Bugs, Security, Performance
What it makes: a senior-level code review — bugs, security holes and performance issues, each with the line, the reason and the fixed code, plus a ship/fix/rewrite verdict. Who it is for: developers who want a second pair of eyes before a pull request. Settings: Claude, paste the full function or file plus the stack and version. How to use: paste the code, state the stack, run the prompt, then verify every fix yourself before merging. Problems and fixes: review is too vague — paste the full code, not a summary; it rewrites everything — say 'only fix what is wrong'; it misses context — state the framework version and what the code must do. Variations: security-only review, performance-only review, beginner-friendly review with explanations. Why it works: asking for a review "like a senior engineer", with clear categories and severity levels, gives focused, actionable feedback instead of vague comments. Tips for better results: include the language, framework and versions; paste related files (model, controller, route) so the AI sees the full flow; ask it to rank issues by severity and to show fixed code; ask it to check against common risks such as injection and broken access control. Good to know: AI review complements, not replaces, tests and a human reviewer. FAQ: Will it work with ChatGPT or Gemini? Yes, the prompt works with any capable coding model. Learn the risks to look for in our OWASP Top 10 guide.
Act as a senior engineer reviewing my code. Here is the code: [paste code]. The stack is [language + framework + version]. Review it in this order: 1) bugs and wrong logic, 2) security issues, 3) performance problems, 4) readability. For each issue give: the line, what is wrong, why it matters, and the fixed code. Do not rewrite the whole file — only fix what is wrong. At the end, give a verdict: ship it, fix first, or rewrite, with one reason.
Fill in before you paste
- [paste code]
- [language + framework + version]
Example output
Share this prompt