AI Code Review: A Copyable Prompt and 7 Tools Compared

In brief

For a one off AI code review, paste the diff into Claude or ChatGPT, whose free plans cost $0, as of November 2026. A GitHub bot pays off when every pull request needs one, such as CodeRabbit at $24 per developer a month billed annually. Copilot Free does not include code review.

What prompt gets a useful AI code review?

Paste this into Claude, ChatGPT, Gemini or Whizi, fill the brackets and add your diff underneath. It turns a vague "any thoughts?" into a ranked list you can act on.

An open notebook of printed code on a black plinth, with a small rainbow glass magnifying lens resting on one line, beside a terracotta Claude starburst, a brushed silver OpenAI knot and a rainbow glass Gemini star on their own plinths, in a charcoal studio under white rim light.

Review this change like a senior engineer who has to approve it. The change is for [goal in one sentence], written in [language and framework]. List problems from most to least serious. For each one give the line, why it is wrong, and an input or situation that makes it fail. Then list what you could not judge from this diff alone. Do not rewrite the code or comment on style unless it hides a bug. Diff: [paste git diff here]

Each part removes a failure. "Most to least serious" stops a typo from outranking a security hole. The failing input makes the model prove the finding. The last list tells you what a human still has to read.

What does a good AI review look like on real code?

These three are examples of the kind of change developers bring. The code and the findings are written for this page, not the output of a named model, so use them to judge your own results.

Example 1: a Python endpoint. The diff adds cursor.execute("SELECT * FROM users WHERE name = '" + name + "'") to a search route. Use the prompt above with the goal "search users by name". A good review ranks the string built SQL first, names name as the injection point and gives an input such as a quote followed by an always true clause. It should suggest a parameterized query and flag that SELECT * returns columns the route may not need to expose.

Example 2: a JavaScript counter. The diff adds const next = await getCount(); await saveCount(next + 1); to a function that two requests can call at once. A good review finds the lost update: both read 5, both write 6. It should describe the interleaving in order, then offer an atomic increment or a lock. A review that only says "consider error handling" has missed the point.

Example 3: a pagination change. The diff changes items.slice(page * size, page * size + size) and the page numbers now start at 1. A good review catches that page 1 skips the first size items, gives a concrete case such as page 1 of 10 items per page returning items 10 to 19, and asks whether the callers still pass zero based pages. That question belongs on the list of things it could not judge.

In all three, the useful answer names a specific input. If a reply gives you adjectives and no failing case, don't accept it. Ask for the input and the expected output.

Which AI code review tool should you use?

A chat app reviews what you paste. A GitHub or GitLab bot reviews every pull request on its own and comments inline. The table lists what each one states on its own pricing or docs page, read on 21 November 2026. Where a page was silent, the cell says so.

ToolFree usePaid priceRuns onBest at
CodeRabbitFree reviews for public repositories; 14 day trial on paid plansEssentials $30 a month, $24 billed annually, per userEvery pull requestAutomatic inline reviews with a per developer hourly allowance
GreptileStarter: 1 developer, 50 free credits a monthPro $1 per credit; a base review is 1 creditEvery pull requestCross repo context and a credit per review
GitHub CopilotFree plan does not include code reviewPro $10 a month, Pro+ $39, Max $100, Business $19 per seatPull requests and IDEsReview inside the tools your team already uses
DeepSourceFree for open source; 14 day trial with up to $50 in AI Review creditsTeam $24 per user a month billed yearly; AI Review $8 per 10K lines on StandardEvery pull requestAI Review and Autofix billed on usage
ChatGPTFree $0, limited messages with uploadsGo $8, Plus $20 a monthWhat you pasteOne off reviews and explanations
ClaudeFree $0, limited usage every 5 hours and every weekPro $20 a month, or $17 billed annuallyWhat you pasteCareful reading of a long diff
Whizi10 messages a day on Whizi AI, Auto and Claude Haiku, no cardPro $29.99 a monthWhat you pasteAsking Claude, GPT and Gemini the same review

Whizi loses to the bots on automation. It reviews what you paste into a chat, so it won't comment on a pull request by itself, scan files you didn't give it or block a merge. It also loses to the free tiers elsewhere: Greptile and ChatGPT cost nothing to try, and CodeRabbit reviews public repositories for free.

The split is simple. A bot earns its price when a team opens many pull requests and wants a first pass on each. A chat app is cheaper when you review your own change before you push, or look at code the bots do not reach.

Copilot is the one to read carefully. GitHub's code review docs say reviews use AI credits, and say Copilot Free does not include code review. Its plans page now lists monthly AI credit allowances too. Prices there are per month for Pro, Pro+ and Max and per granted seat for Business and Enterprise.

Where does a GitHub bot beat a chat app?

A bot beats a chat app when the job repeats, needs context outside the diff, or has to happen without anyone remembering to ask. Three cases show it.

  1. Every pull request gets a review. A bot runs when the PR opens, so nobody skips it on a busy Friday. In a chat app, you have to paste the diff each time.
  2. The review needs the rest of the codebase. Greptile lists cross repo context on Pro, and Copilot's docs describe cross repository context for code review as a public preview. A chat app only sees what you paste.
  3. The result has to live on the PR. Bots comment on the changed lines, apply suggestions in a couple of clicks, and keep the thread beside the human review. You will copy and paste with a chat app.

A chat app wins on three others. It costs nothing to start, it works on code in any host or no host, and you can ask a follow up such as "why would this fail with null?" Reviews from bots run on the vendor's settings, and some limit how many pull requests one developer gets per hour: CodeRabbit lists 5 on Essentials and 8 on Team.

Many teams do both. The bot does the first pass on the pull request, and a developer pastes the one risky function into a chat app for a second opinion. Best AI for coding compares the models you would pick for that second look.

What are the best AI code review prompts?

These twelve work by narrowing the question. A review for everything finds a little of everything, and a review for one risk finds that risk. Each takes a pasted diff or function.

Correctness

  1. Logic: "Trace this function by hand with these three inputs: [inputs]. Show each variable after each line and tell me where the output differs from [expected output]."
  2. Edge cases: "List ten inputs most likely to break this function, such as empty, null, negative, huge and duplicate values. For each, say what it returns now and what it should return."
  3. Concurrency: "Find any place two requests or threads could interleave and corrupt state. Describe the order of events that causes the failure."

Security

  1. Injection and input: "Find every place user input reaches a query, a shell, a file path or HTML without validation. Give an attack string for each."
  2. Secrets and access: "Look for hard coded keys, tokens in logs, missing permission checks and routes that return more fields than the caller needs."
  3. Dependencies: "List every new package this diff adds. For each, say what it is used for and whether the standard library or an existing dependency could do it."

Tests and maintenance

  1. Missing tests: "Write the five unit tests this change most needs, in [test framework]. Include one that should fail against the old code."
  2. Test review: "Here is a test file and the code it covers. Which behaviors have no assertion, and which assertions would still pass if the code were broken?"
  3. Readability: "Name the three places a new teammate would misread this code. Suggest a rename or a comment for each, and leave the logic alone."

Performance, pull requests and a second opinion

  1. Performance: "Find loops that run a query or request per item, and anything that grows with the square of the input. Give the cost at 10,000 items."
  2. PR description: "Write a pull request description for this diff: what changed, why, how to test it, and anything a reviewer should look at twice."
  3. Second opinion: "Another reviewer said: [paste their findings]. Check each against the diff. Say which are real, which are wrong and what they missed."

Prompt 12 is the one to run through a second model. A finding that two different models both make is worth your time first.

How do you get a good result from AI code review?

Follow the steps above, then avoid the five mistakes that ruin most reviews.

  1. Pasting the whole file. The model reviews code you did not change and buries the real issue. Fix: paste the diff and add only the functions it calls.
  2. No goal. The model checks syntax but can't see that the code does the wrong thing. Fix: put the goal in one sentence before the diff.
  3. Accepting a finding with no failing case. Fix: ask for the input that triggers it, then run it.
  4. Asking for style and bugs together. The style notes crowd out the bugs. Fix: run a correctness pass first and a style pass separately.
  5. Skipping the human. Fix: treat the AI review as a first reader, and have a person approve anything that touches money, auth or user data.

Models can also invent problems. If a finding names a function, a flag or an API version that you can't find in your code, it's probably made up. Don't act on it until you've opened the docs.

Can AI replace a human code reviewer?

No, and the vendors say so themselves. That's the line both GitHub pages draw. GitHub's guide to AI code reviews says "AI code review is best used as a complement to human review, not a replacement." Its Copilot docs warn that "Copilot is not guaranteed to spot all problems or issues in a pull request," and add that some file types are excluded, including dependency management files, log files and SVG files.

A reviewer sees things a diff does not show: why the change exists, what the team agreed last month, which customer will hit this path. A model reading a diff has none of that unless you paste it in. Business rules and architecture choices stay with people.

AI review also does not run your code. It reads text and predicts what the code does, which is why the step of running the failing case yourself matters. A passing review is a reason to look less hard in one place, never a reason to skip the tests. Why AI gets things wrong explains the mechanism.

Is it safe to paste private code into an AI chat?

That depends on the plan and the vendor's data terms, and a pricing page will not settle it. Read the privacy and data controls page of the tool you use before you paste anything covered by a client contract or an employer policy. Many companies set rules on this, and an employer's rule beats any plan setting.

Whatever you paste, remove secrets first. Replace keys, tokens, passwords and customer data with placeholders such as API_KEY_HERE, because a review does not need them. Paste the one function that matters instead of the whole repository. A bot installed on your repository reads the code by design, so a team should check the bot's data handling as part of choosing it.

Where does Whizi fit for code review?

Whizi is one app instead of a pile of single purpose tools, and it suits the second opinion. Paste the diff once and send it to Claude, then to a GPT or Gemini model, in the same app. Web search is on by default per chat, so a model can look up the docs for a library it flags.

On Pro, the side by side Compare mode runs two models on the same prompt in two columns. You can run prompt 12 that way and read only the lines where the two reviews disagree. Pro carries Claude, GPT and Gemini in one app, and its first week is $1.99. Compare is for Pro and Powerhouse, and each column is billed at its own model's rate. See Whizi pricing for the details.

The free plan gives you 10 messages a day on Whizi AI, Auto and Claude Haiku, with no card. That is enough to try the prompt on one pull request. For reviews that happen on every PR without anyone pasting, install a bot.

Workflow checklist
  • Paste the diff and the goal, not the whole file
  • Ask for ranked findings with a failing input for each
  • Ask what the model could not judge from the diff
  • Run each serious finding yourself before you change code
  • Remove keys, tokens and customer data before you paste
  • Keep a person as the approver for money, auth and user data
Common questions

Frequently asked questions

Can ChatGPT or Claude review code?

Yes, if you paste the code. ChatGPT Free lists limited messages with uploads and Claude Free lists limited usage every 5 hours and every week, as of November 2026. Give the goal, ask for failing inputs and run each finding yourself.

Is there a free AI code review tool?

Yes, for some cases. CodeRabbit says public repositories get free reviews with no time limit, DeepSource is free for open source, and Greptile gives one developer 50 free credits a month. Copilot Free does not include code review. Check each page for private repository terms.

Is AI code review better than static analysis?

They find different things. Static analysis applies fixed rules and is predictable, while an AI review reasons about intent and can miss a rule a linter never would. Run both, since neither one proves the code is correct.

Can AI code review catch security bugs?

It can catch common ones, such as injection and missing checks, when you name the risk in the prompt. It can also miss them, and GitHub says Copilot is not guaranteed to spot all problems. Treat it as a first pass and add a security review for sensitive code.