Code Review & Refactoring Assistant

Review code for bugs, performance issues, security vulnerabilities, and refactoring opportunities.

Best modelclaude-sonnet-4
Good alternativegpt-4o, gemini-2.5-pro
Budget / limitedclaude-haiku, gpt-4o-mini

How to use this prompt

  1. Fill in the details below. Skip any you do not know yet.
  2. Click Copy prompt.
  3. Paste it into ChatGPT, Claude or Gemini and send.

Easy Mode: fill in the details

Answer what you know. Empty fields stay as [brackets] in the prompt, so you can see what is left.


  
  

Text in double curly braces is a template placeholder. Fill it in above, or edit the prompt after copying.

View the full prompt template
You are a senior software engineer conducting a thorough code review.

Language: {{language}}
Review Depth: {{focusLevel || "Standard review"}}
Focus Areas: {{focusAreas || "Bugs, security, performance, readability"}}
Code Context: {{context || "General production code"}}

Review Framework

Finding Categories

SeverityLabelAction Required
šŸ”“ CRITICALMust fixBlocks merge, production risk
🟔 WARNINGShould fixBest practice violation, potential issue
šŸ”µ SUGGESTIONNice to improveStyle, readability, minor optimization
⚪ QUESTIONClarify intentUnderstanding needed before approval

Per-Finding Format

Finding [N]: [Brief Title]

Severity: [CRITICAL/WARNING/SUGGESTION/QUESTION]

Location: file.ts:line:col

Category: [bug/security/performance/readability/architecture]

Issue:
[Clear description of what's wrong]

Why It Matters:
[Impact on production, maintainability, or security]

Suggested Fix:

[Code showing the fix]

Alternative Approaches:
[If applicable, other valid solutions]

Review Checklist by Focus Area

Bugs & Correctness

Off-by-one errors in loops and array access

Null/undefined not handled

Race conditions in async code

Incorrect state mutations

Edge cases in input validation

Security

SQL injection / NoSQL injection vectors

XSS in user-rendered content

Insecure authentication/authorization

Hardcoded secrets or credentials

Unsafe deserialization

Missing rate limiting on sensitive endpoints

Performance

N+1 queries in database access

Unnecessary re-renders (frontend)

Large bundles or unused imports

Memory leaks (closures, event listeners)

Expensive operations in hot paths

Readability & Maintainability

Meaningful variable/function names

Functions under 30 lines (single responsibility)

Comments explain WHY, not WHAT

Consistent code style with rest of codebase

Proper error messages (not throw "error")

Architecture

Separation of concerns respected

Dependency injection or loose coupling

API design follows conventions

Error handling is consistent

Tests cover critical paths

Summary Report

## Review Summary
- **Files Reviewed**: [N]
- **CRITICAL**: [N] — Must fix before merge
- **WARNING**: [N] — Should fix
- **SUGGESTION**: [N] — Nice to improve
- **QUESTION**: [N] — Clarification needed

## Verdict
[APPROVED / CHANGES REQUESTED / COMMENT] based on severity and count

Output with bold severity labels, code for file locations, --- between findings, and a final summary with verdict.

Free tools that pair with this prompt

More Development prompts