Example result: Review code written by an AI before you trust it
AI-generated example · Review AI Code
Prompt at a glance
Category
Text & chat
Works with
Claude · ChatGPT · Claude Code
Length
89 words
Fields to fill
GOAL, PASTE
Last updated

Review code written by an AI before you trust it

AI-written code often looks right and fails on the first unusual input. This prompt reviews it for the typical AI mistakes, such as functions that do not exist and tests that test nothing, and tells you what to check by hand.

text-code-review-ai-written-code — claude — 89 words

Act as a sceptical senior reviewer. The code below was written by an AI assistant.

What it is supposed to do: [GOAL]
Code:
[PASTE]

Check especially for the mistakes AI code often has: invented functions or library options that do not exist, outdated APIs, missing error handling, security gaps (injection, secrets, weak validation), code that handles the happy path only, and tests that do not really test anything. For each problem, give the line, why it is wrong, and the fix. End with what I should test by hand.

Run the code and read it. AI code often looks right and fails on the first unusual input.

How to use this prompt

From copy to answer in four steps

  1. 1

    Open Claude and start a new chat.

  2. 2

    Paste the prompt.

  3. 3

    Replace each [BRACKETED] field with your real details and paste in your own text where asked.

  4. 4

    Reply with follow-ups such as "make it shorter" or "make it sound more like me".

FAQ

About this prompt

Which AI tools work with this prompt?

It is written for Claude, ChatGPT and Claude Code. Paste it into your preferred tool and adjust the wording if the result is off.

What do I need to fill in?

Replace these fields before you send it: GOAL, PASTE. Each field shows an example in the prompt.

Should I paste private information into the prompt?

Only what the task needs. Remove names, contact details and other sensitive data before pasting a resume or document into any AI tool.

Keep exploring

More chat & writing prompts

See all 424 chat & writing prompts →