← Back to libraryClean up
Code review before you ship
You cannot see the problems yourself - have AI be a harsh reviewer
The prompt
Do a strict code review of this. ``` {{paste code}} ``` Context: {{what it does, who uses it, roughly what scale}} Look for problems in these areas: 1. Will break: nulls, boundaries, concurrency, unhandled exceptions. 2. Will be slow: repeated work, queries or requests inside loops, render cost. 3. Is unsafe: unvalidated user input, secrets hardcoded in the frontend, missing permission checks. 4. Is unmaintainable: confusing names, muddled responsibility, missing comments where needed. Rules: - Rate severity for each issue (will crash / will misbehave / just ugly) with exact location and fix. - Do not pad the list. If something is fine, say it is fine. - If anything could cause a production incident, call it out separately at the very top.
Replace the {{}} parts with your own content
Why it works
- Four explicit lenses dig far deeper than "any problems?", especially on performance and security
- Severity ratings tell you what to fix first instead of drowning in "suggestions"
- "Do not pad the list" keeps the signal high, otherwise AI returns nitpicks for the sake of output
- Separating incident-grade issues is where a review earns its keep
What it looks like
Reviewing a submit form, AI flags missing client-side validation, no double-submit guard, and error toasts that leak raw backend messages to users.
Where it bites
- No context on users and scale means AI either applies big-tech standards to your toy or lets it slide
- Pasting thousands of lines at once yields only generic feedback - review module by module