Code Review Loop

4-pass code review agent covering correctness, security, performance and readability.

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.
agentcodereviewloopdev

How to use this prompt

  1. Copy the prompt with the button above.
  2. Replace the parts in brackets with your own details: [PASTE CODE].
  3. Paste it into Claude and send it. It also works in other AI chat tools.
  4. Not quite right? Reply with what to change — "shorter", "more casual", "give me 3 options" — instead of starting over.

Related ai agents & automation prompts

See all 303 AI Agents & Automation prompts →

Get 10 new prompts every week

Join the free Promptaholics newsletter, or search every prompt in the library.

We use cookies for analytics and ads. See our Privacy Policy.