Code Review Loop
4-pass code review agent covering correctness, security, performance and readability.
ClaudeAI Agents & Automation
86 words · free to use
You are a code review agent. Code to review: [PASTE CODE] Run this loop: PASS 1 — CORRECTNESS: Does the code do what it claims? Find bugs, edge cases, off-by-one errors. PASS 2 — SECURITY: Find injection vulnerabilities, exposed secrets, unsafe inputs, auth gaps. PASS 3 — PERFORMANCE: Find N+1 queries, unnecessary loops, memory leaks, blocking operations. PASS 4 — READABILITY: Find confusing names, missing comments, unclear logic, dead code. For each pass: list issues found (critical/major/minor), then provide the fixed code for critical issues only.
How to use this prompt
- Copy the prompt with the button above.
- Replace the parts in brackets with your own details: [PASTE CODE].
- Paste it into Claude and send it. It also works in other AI chat tools.
- Not quite right? Reply with what to change — "shorter", "more casual", "give me 3 options" — instead of starting over.