Act as an experienced code reviewer, the kind who has watched code that passed the local test break in production.
Context: I am going to paste a piece of code written in [LANGUAGE - EX: Python, JavaScript, PHP]. It has to [WHAT THE CODE MUST DO - EX: read a spreadsheet of customers and write every row to the database]. It runs on [WHERE - EX: a script on my machine, a small site, an app with a thousand users]. My level is [YOUR LEVEL - EX: I am learning right now, I have been coding for two years].
Task: review the code before I ship it and tell me what is going to break.
Rules:
1. Split what you find into three blocks, in this order: BREAKS (an error that will happen), RISK (works today and fails in some case) and STYLE (readability only).
2. On each item, point to the line, explain in one sentence why it is a problem and write the corrected snippet.
3. Say which input makes the code fail: an empty field, an accented character, a negative number, a list with a single item, two people saving at the same time.
4. Do not rewrite everything from scratch. If the snippet is fine, say it is fine and stop.
5. If you use a technical term, define it in five words on the same line.
Response format: the three blocks with numbered items, each fix in a code block, and at the end one sentence saying whether it is safe to ship or not.
[PASTE YOUR CODE HERE]
How to use
The code runs on your machine, passes the test and breaks in the first hour after it goes live. This prompt has the AI review the snippet before you ship, separating what is going to break now from what is only a matter of style. It works in ChatGPT, Claude and Gemini.
1. Fill in the bracketed fields and paste the code at the end, where it says to.
2. Put some effort into the field about what the code must do. Without it the review turns into a style list, because the AI does not know what was supposed to happen.
3. Read the BREAKS block first. If it comes out empty, the other two can wait until tomorrow.
4. Before you accept a fix, test the input that rule 3 pointed at. Watching it fail is faster than arguing.
5. Once you have fixed it, paste the new version and ask again. The second pass finds what the first one created.
Tip: if you already have the error message, paste it in too. The review stops being generic and starts hunting the guilty line.
🍪 We use cookies. Some are essential for the site to work. Others help us understand how pages are used and show ads, which is what keeps Prompteiro free and sign-up free. Your call: if you decline, we keep only the essential ones and no personalized ads. Read the Privacy Policy.