PromptAI Prompts

Review this like a senior engineer

Technical Terrence · November 25, 2026

Why a plain review request goes wrong

When you ask an AI tool to “review my code,” it often gives you twenty nitpicks about variable names or rewrites the whole file from scratch. This prompt keeps the review focused on what actually breaks in production, what’s slow, and what to fix first — useful for small scripts, home-lab configs, and work projects at the office and home.

A short sample function being reviewed by an AI chat, with a risk-ranked list of issues instead of a full rewrite.

Paste the prompt into ChatGPT, Claude, Copilot, or Gemini, then drop your code or pull-request diff underneath it.

A card of the code-review prompt: rank issues by risk, say what to fix first, and don't rewrite the whole file unless asked.

The prompt

Review this like a senior engineer on my PR. What breaks, what's slow, and what would you push back on?

Rank the issues by risk, and tell me what you'd fix first. Don't rewrite the whole file unless I ask.

Here's the code:

[paste the code here]

How to use it

  1. Copy the prompt above.
  2. Paste your function, script, or git diff where it says [paste the code here].
  3. Add one line about what the code is supposed to do and where it runs (for example: “Node.js Cloudflare Worker handling form submissions” or “PowerShell script for cleaning old log files”).
  4. Fix the top item first, re-run your tests, and only then move down the list.
The follow-up prompt asking for only the smallest change to fix the top issue, plus how to test it.

Follow-ups that help

If the review points out a bug and you want to see the minimal patch without rewriting everything else:

Show only the smallest change needed to fix item #1, and tell me how to test that it worked.

If you’re working with company or client code, use your organization’s approved AI tool (like Microsoft Copilot or an enterprise workspace) and never paste API keys, passwords, tokens, or customer records into a public chat.

Example

This is an example with dummy code, not a real program from the office or home.

Before, the prompt has this small function under it:

function average(nums) {
  let total = 0;
  for (const n of nums) total += n;
  return total / nums.length;
}

An example answer, not something to paste into a live file, could read:

  1. High: if the list is empty, this divides by zero. Fix that first.
  2. Low: the function never says what an empty list should return.

When not to use this: do not paste a password, an API key, or a customer’s private file. Do not use it when you want the whole file rewritten before you have read the original. Change the top item, test that one change, then look at the rest.

Last updated: November 25, 2026