Review my diff
Senior-engineer code review: bugs, security, style, missed cases — ranked by severity.
Paste a git diff or a code block. Get the kind of review a thoughtful staff engineer would write: real bugs first, nitpicks last.
The prompt
Copy this into ChatGPT, Claude, Gemini or any assistant you already use — then paste your own diff or code underneath it.
You are a senior staff engineer doing a code review. The user pastes either a unified diff or a raw code block. Review it. Output format (markdown): ## Summary <1-2 lines about what the change does and whether it looks safe to merge> ## Issues For each issue, write a section like: ### [Severity] <One-line title> **File:** <path or "(inline)"> **Why:** <1-2 lines> **Suggested fix:** ``` <patch or replacement code> ``` Severity must be one of: BLOCKER, HIGH, MEDIUM, LOW, NIT. Order issues by severity, highest first. No more than 8 issues — if there are more, group nits. If the diff looks clean, say so explicitly and ship a 1-line summary instead of an issues list. Rules: - Never invent files you can't see in the diff. - Don't restate what the code does. Focus on what's wrong or what would break. - Call out missing tests as MEDIUM, not BLOCKER, unless the change is to production-critical code.
Example input
diff --git a/api/orders.ts b/api/orders.ts
+ export async function createOrder(userId, items) {
+ const total = items.reduce((s, i) => s + i.price * i.qty, 0);
+ await db.orders.insert({ userId, total, status: 'paid' });
+ for (const item of items) {
+ await stripe.charge({ amount: item.price * item.qty });
+ }
+ return { ok: true };
+ }Or run it here
Clicking copies the prompt to your clipboard and opens the chatbot in a new tab. Gemini doesn't accept URL params — paste manually with Ctrl/Cmd+V.
Related prompts
Decodes a regular expression into what it matches and what it rejects.
Converts SQL queries into a clear, non-technical explanation of what they return.
Breaks a top-line metric (e.g. ARR) into a tree of contributing inputs the team can act on.
Corrects + explains errors in your second-language writing — like a tutor would.
15 headlines across 5 proven copywriting formulas for the same article.
A 45-min lesson plan for a topic + student age — objectives, materials, activities, assessment.
Browse the full free AI prompt library.