{"id":1363,"date":"2026-08-12T17:55:54","date_gmt":"2026-08-12T20:55:54","guid":{"rendered":"https:\/\/prompteiro.com\/en\/prompt\/review-your-code-before-you-ship\/"},"modified":"2026-08-12T17:56:04","modified_gmt":"2026-08-12T20:56:04","slug":"review-your-code-before-you-ship","status":"publish","type":"prompt","link":"https:\/\/prompteiro.com\/en\/prompt\/review-your-code-before-you-ship\/","title":{"rendered":"Review Your Code Before You Ship"},"featured_media":1364,"template":"","meta":{"_titulo_seo":"How to review code with AI before you ship","_prompt_text":"Act as an experienced code reviewer, the kind who has watched code that passed the local test break in production.\n\nContext: 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].\n\nTask: review the code before I ship it and tell me what is going to break.\n\nRules:\n1. 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).\n2. On each item, point to the line, explain in one sentence why it is a problem and write the corrected snippet.\n3. 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.\n4. Do not rewrite everything from scratch. If the snippet is fine, say it is fine and stop.\n5. If you use a technical term, define it in five words on the same line.\n\nResponse 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.\n\n[PASTE YOUR CODE HERE]","_como_usar":"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.\n\n1. Fill in the bracketed fields and paste the code at the end, where it says to.\n2. 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.\n3. Read the BREAKS block first. If it comes out empty, the other two can wait until tomorrow.\n4. Before you accept a fix, test the input that rule 3 pointed at. Watching it fail is faster than arguing.\n5. Once you have fixed it, paste the new version and ask again. The second pass finds what the first one created.\n\nTip: if you already have the error message, paste it in too. The review stops being generic and starts hunting the guilty line.","_views":27,"_likes":0,"_nota_sum":0,"_nota_count":0,"_nota_avg":0,"_nota_weight":0,"_i18n_grupo":1821},"macro":[3],"subcategoria":[1329],"prompt_tag":[1341,1343,1338],"ferramenta":[13,14,15],"class_list":["post-1363","prompt","type-prompt","status-publish","has-post-thumbnail","hentry","macro-text","subcategoria-programming","prompt_tag-code","prompt_tag-debugging","prompt_tag-programming","ferramenta-chatgpt","ferramenta-claude","ferramenta-gemini"],"_links":{"self":[{"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/prompt\/1363","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/prompt"}],"about":[{"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/types\/prompt"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/media\/1364"}],"wp:attachment":[{"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/media?parent=1363"}],"wp:term":[{"taxonomy":"macro","embeddable":true,"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/macro?post=1363"},{"taxonomy":"subcategoria","embeddable":true,"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/subcategoria?post=1363"},{"taxonomy":"prompt_tag","embeddable":true,"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/prompt_tag?post=1363"},{"taxonomy":"ferramenta","embeddable":true,"href":"https:\/\/prompteiro.com\/en\/wp-json\/wp\/v2\/ferramenta?post=1363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}