Seven prompt mistakes that quietly ruin your results
None of these cause an error message. They just make every answer a little worse. Here is how to spot each one and what to write instead.
Paste a function or file you didn't write and get a plain explanation of what it does, why it's built that way, and where it's likely to break.
I've inherited this code and I'll be the one maintaining it. Explain it to me properly. Language and framework, if it matters: [e.g. Python 3.12, no framework] What I already know about it: [e.g. it runs nightly and sends invoices, that's all I know] ``` [PASTE THE CODE] ``` Take it in this order: 1. What does it do, in two or three sentences? Speak to a developer who's never seen it. 2. Walk through it top to bottom. For each part, say what it does and, where you can tell, why it was done that way. 3. Anything surprising: hidden side effects, global state, things it assumes about its input, error handling that swallows problems. 4. Where is it most likely to break, and how would I notice? 5. If you had one hour to make it safer without changing what it does, what would you do first? Don't rewrite it unless I ask. And if you're guessing at the intent behind something, say "I'm guessing" rather than stating it as fact.
What it does. Once a night, it finds every subscription that renewed in the last 24 hours, builds a PDF invoice for each one, emails it, and records that the invoice was sent. If anything fails for one customer, it moves on to the next.
Lines 1 to 14, setup. It opens a database connection and an SMTP connection at import time, not inside the function. That means both connections are created the moment the module is imported, even by a test. I'm guessing that was done to reuse them across the loop.
Lines 16 to 31, the query. renewed_since(hours=24) looks at renewed_at, not at whether an invoice already exists. If the job runs twice in one day, customers get two invoices. There's nothing here that prevents it.
Lines 33 to 58, the loop. Each customer is processed inside a bare try/except that logs the exception and continues. Good for resilience, bad for visibility: a broken PDF template would fail silently for every customer and you'd only find out from support tickets.
Lines 60 to 71, marking as sent. invoice.sent = True is saved after the email call returns. If the process dies between the two, the invoice is emailed but never marked, and the next run sends it again.
customer.name goes in unescaped. A name containing < would produce broken HTML.The double-send problem. It needs two failures to happen (a re-run, or a crash mid-loop), both of which are ordinary events. You'd notice it as a customer replying "why did I get this twice?"
Make the query skip customers who already have an invoice for this renewal. That one change closes both double-send paths. Then move the connections inside the function so tests stop opening real SMTP sessions.
NoteThis is an example. Results change between runs and model versions. Claude Prompts is a fan project and is not affiliated with Anthropic.
Any time code lands on your desk without its author: a colleague left, a contractor's project came back, an old script started failing. It's also useful before a code review of something outside your usual area.
The "what I already know" line is worth filling in even when the answer is "almost nothing", because it sets the level of the explanation. Paste one function or one file at a time. A whole module produces an explanation nobody reads.
The prompt asks Claude not to rewrite the code, and that's deliberate. A rewrite of code you don't understand yet is how bugs get a second life. Understand it first, then decide what to change. Pay attention to the "I'm guessing" markers in the answer. Those are the places to check with someone who was around when the code was written.
Use the copy button above. The full text is included, nothing is cut off.
Everything highlighted in yellow is a placeholder. Swap it for your own topic, audience or data.
If the result helped, press the heart. Votes decide which prompts make the weekly top 10.
In one paragraph. This is a bookings app for small gyms. A React front end talks to an Express API in /server. Data lives in Postgres and is accessed through Prisma. Anything slow (emails, PDF invoices) goes through a job...
Paste a file tree and a few key files and get the tour a senior engineer would give you: how a request flows, where things live, what to avoid.
What the error means. Cannot read properties of undefined (reading 'map') means orders was undefined at the moment the component rendered. The array never arrived, or it arrived under a different name. Most likely causes 1...
Stops Claude from patching symptoms. It ranks the likely causes, tells you what to check first, and only then writes the fix.

Six lightweight loading indicators in pure CSS. Each has a reduced motion fallback, and one variable changes the colour of all of them.
None of these cause an error message. They just make every answer a little worse. Here is how to spot each one and what to write instead.
Most disappointing answers come from prompts that are missing one of five parts. Here is what each part does, with a before and after you can copy.