πŸ’» Coding
#code-review#best-practices#refactoring#senior

Senior Code Reviewer

Paste your code into this prompt and get a senior-engineer-grade review: bugs, security holes, performance traps, and readability issues β€” each with the fix. It's like a staff engineer on call, 24/7.

A brutally honest senior engineer review β€” bugs, security holes, and perf issues, ranked by severity.

You are a staff-level software engineer doing a rigorous code review. I will paste code. Review it in this order: 1) CORRECTNESS β€” bugs, edge cases, off-by-ones, race conditions, 2) SECURITY β€” injection, auth, data exposure, 3) PERFORMANCE β€” complexity, N+1s, unnecessary work, 4) READABILITY & MAINTAINABILITY β€” naming, structure, dead code. For each issue give: severity (critical/major/minor), the exact line or block, why it matters, and a corrected snippet. End with a verdict: APPROVE, APPROVE WITH CHANGES, or REQUEST CHANGES β€” and defend it in one sentence. Be blunt. No praise for trivial things. Here is the code:
More coding prompts
Try it now ChatGPT β†— Grok β†—
Example output

See what this prompt creates

AI-generated example output for the 'Senior Code Reviewer' prompt
Example output generated by AI with this prompt. Your results will vary by tool and the details you fill in.

What this prompt does

Junior devs write code; senior devs read it with suspicion. This prompt brings that suspicion on demand: it reviews your diff like a staff engineer who has been burned before β€” checking correctness first, then security, then performance, then readability. Every finding comes with severity, explanation, and a concrete fix, so the review teaches instead of just criticizing.

How to get the best result

Paste focused chunks (one function or one file), not your whole repo β€” reviews get sharper as context gets tighter. Include the language, framework, and what the code is supposed to do; a reviewer who knows the intent catches logic bugs, not just style nits. Ask follow-ups (β€œshow me the fixed version”) rather than accepting the first pass.

Common mistakes to avoid

Don't paste secrets: strip API keys, tokens, and credentials before anything touches an AI chat. And don't outsource judgment entirely β€” the model occasionally flags correct code or misses domain-specific invariants only you know. Treat it as a brilliant, tireless junior reviewer: verify the important calls.

Try these variations

Scope it: β€œreview for security only” before a deploy, or β€œreview for performance” on hot paths. For legacy messes, pair it with the legacy refactoring plan prompt β€” review finds the wounds, the refactor plan schedules the surgery. More in the coding prompts collection.

How to use this prompt

  1. Copy it β€” hit the copy button above to grab the raw prompt text.
  2. Fill the brackets β€” replace anything in [BRACKETS] with your own details.
  3. Paste into your AI tool β€” works with ChatGPT, Claude, Gemini for text prompts; Midjourney, DALL-E or Stable Diffusion for image prompts; Runway, Pika or Sora for video.
  4. Iterate β€” tweak one bracket at a time until the output is exactly right.

Frequently asked questions

Can AI code review replace human reviewers?

No β€” it replaces the tedious parts. AI catches bugs, security issues, and style problems tirelessly, but it can't judge product intent, team conventions, or whether the code solves the right problem. Use it as a pre-review pass so human reviewers spend time on what matters.

Is it safe to paste my company's code into ChatGPT?

Only if your company allows it. Many firms restrict code in public AI tools β€” use your company's approved AI tier (many now offer them) or a self-hosted model. At minimum, strip secrets, customer data, and proprietary algorithms first.

What languages does it review well?

All mainstream ones: Python, JavaScript/TypeScript, Go, Java, Rust, C++, SQL, and more. It shines brightest in widely-used languages where its training data is deepest, and can still help with niche languages on syntax and logic.

How do I get it to stop nitpicking style?

Tell it your priorities up front: β€œfocus on bugs and security, ignore formatting β€” we use an autoformatter.” The prompt is structured so you can dial each review dimension (correctness, security, performance, readability) up or down per run.

Related prompts

Keep exploring the vault.

API Documentation Writer

Turns your endpoints into Stripe-quality docs β€” examples, error tables, and auth flows included.

#api#documentation#rest#developer-experience
View β†’

Explore more categories

More prompt collections worth your time.