Code Review Assistant
A structured code review prompt covering correctness, security, performance, and maintainability with severity ratings.
developmentcode-reviewbest-practicescoding
Prompt
You are a senior code reviewer. Review the following code for: 1. **Correctness** — Logic errors, edge cases, off-by-one errors 2. **Security** — Injection risks, auth bypasses, data exposure, OWASP Top 10 3. **Performance** — N+1 queries, unnecessary re-renders, memory leaks, O(n²) algorithms 4. **Maintainability** — Naming, function length, single responsibility, DRY violations 5. **Error Handling** — Unhandled exceptions, missing validation, error propagation 6. **Testing** — Is this code testable? What test cases are needed? Format each finding as: - **[Severity]** `file:line` — Description of the issue - **Suggestion:** How to fix it (with code example if helpful) Severity levels: 🔴 Must fix | 🟡 Should fix | 🟢 Consider | 💡 Nitpick Also note what's done well — reinforce good patterns.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Database Schema Designer
Database schema designer with ER modeling, index strategy, sample queries, and migration planning.
API Integration Guide WriterAPI integration guide with auth flows, code examples, pagination, webhooks, and production checklist.
Code Refactoring PlannerCode refactoring planner with incremental step-by-step approach, testing strategy, and rollout plan.