You paste a prompt into Lovable or Bolt, the build runs, and then: red text. The instinct is to type "it's broken, fix it", which is exactly the prompt that makes things worse, because the AI takes it as permission to rewrite everything. This kit replaces the panic with a system: one decoder prompt that forces a plain-English diagnosis and a single smallest fix, plus the five errors every builder hits and the exact prompt for each. No terminal, no jargon, one change at a time.
LAST VERIFIED 2026-07-09
The error is the tool talking, not you failing
A red error message feels like a verdict. It isn't. It's the machine doing the one polite thing machines do: telling you exactly what it needs. Professional developers see dozens of these a day; the difference between them and a panicking beginner isn't fewer errors, it's that they read the message instead of reacting to the color.
Here's the part nobody tells you: most errors aren't even about your code. A missing key, a service having a bad day, a usage limit. Four categories cover nearly everything, and three of them can't be fixed by rewriting code at all. Which is why the worst possible move is the one everyone makes first.
NOTE
Use this page as a prompt reference. Every file below is built to be handed straight to an AI. Download it, drop it into Claude, ChatGPT, Cursor, or Lovable, and say "use this as my playbook." The prompts on this page are copy-paste ready.
The worst prompt is "it's broken, fix it"
Type "fix it" with no other instruction and the AI does what eager assistants do: it rewrites the component, and while it's in there, it "improves" three other things. Now you have the original bug plus whatever the improvements broke, and no idea which change caused what. Two more rounds of "still broken, fix it" and the app is unrecognizable.
The fix is a rule you can hold in one hand: one change per attempt. The AI diagnoses first, proposes the single smallest fix, applies only that, and reports what it changed. If that didn't work, you know one thing for certain (that theory was wrong) instead of knowing nothing about five changes at once.
You type
The AI does
You end up with
"It's broken, fix it"
Rewrites the file, improves 3 other things
The old bug plus new ones, no idea which change did what
The decoder prompt below
Explains, classifies, changes one thing, reports
Either a fix, or one theory eliminated. Both are progress
The decoder prompt: paste it, paste your error, send
This is the main event. Copy the whole thing, paste your full error message at the bottom (all of it, even the parts that look like noise), and send. The numbered steps are not decoration: they force the AI to diagnose before it operates, and step 5 is the one-change rule in writing.
PROMPT: THE DECODER PROMPT (paste with your error underneath)
I hit an error in my app. The full error message is pasted below.
Before you change ANY code, do this in order:
1. EXPLAIN: Tell me what broke in plain English. 2 sentences maximum,
no jargon. Pretend I have never written code.
2. CLASSIFY: Tell me which of these it is (pick exactly one):
a) A problem in the app's own code
b) A missing or wrong key/credential (an API key, a password, a setting)
c) An outside service being down or unreachable
d) A limit being hit (rate limit, quota, plan limit, size limit)
Say which one and why you think so.
3. PROPOSE: Describe the SINGLE smallest change that would fix it.
One change only. If you think it needs several changes, tell me the
first one and stop there.
4. WAIT-CHECK: If the fix requires something only I can do (paste a key,
upgrade a plan, wait for a service to come back), say so and stop.
Do not write workaround code for a problem that isn't code.
5. APPLY: Make only that one change. Do not refactor, do not clean up,
do not improve anything else you noticed, do not touch any other file.
6. REPORT: Tell me exactly what you changed (which file, what it does now
that it didn't before) and what I should see when I try again.
If the error message doesn't give you enough to be confident, say
"I'm not sure yet" and tell me the ONE thing to check or paste next.
Guessing is worse than asking.
HERE IS THE ERROR:
[PASTE YOUR FULL ERROR MESSAGE HERE]
WATCH OUT
Paste the whole error. The instinct is to paste just the first line. The useful part (which file, which line, which service said no) is often in the middle of the wall of text. More context in, better diagnosis out.
Variant: there's no error, just a blank page
A blank white page is still an error, it just crashed before it could tell you. The real message is hiding in the browser console (the log your browser keeps of what went wrong). This variant sends the AI hunting instead of guessing:
PROMPT: THE BLANK PAGE DECODER
My app shows a blank page (or a white screen). There is no error message
visible to me. Do NOT start changing code. A blank page means something
crashed before the screen could load, and the real error is hidden.
Find it first:
1. HUNT: Look for the hidden error. Check, in order:
a) The browser console (the log web browsers keep of what went wrong;
if I need to open it myself, tell me the exact keys to press:
usually F12 or Cmd+Option+J, then the "Console" tab)
b) The build or deploy logs (the record of what happened when the
app was assembled and published)
c) The server logs, if this app has a backend
2. If you can see those logs yourself, read them and quote the first
red/error line you find. If you cannot see them, tell me exactly
where to click to find them and what to copy back to you.
3. Once we have the real error, treat it like this: explain it in plain
English (2 sentences max), classify it (app code / missing key /
service down / limit hit), propose the single smallest fix, apply
only that, and report what you changed.
Do not rewrite any component, page, or config "to be safe" while we
are still hunting. One error, one fix.
Variant: you've tried twice and it's getting worse
Two failed fix attempts means the AI is now debugging its own patches, not your bug. The rule of holes applies: stop digging. This prompt makes the AI list everything it changed, revert what didn't help, and start clean:
PROMPT: THE STOP-DIGGING PROMPT
STOP. We have tried to fix this at least twice and it is getting worse,
not better. Do not attempt another fix yet. Do this instead, in order:
1. LIST: Write out every change you have made since the original error
first appeared. Every file touched, every setting changed, every
package added. A numbered list. If you are not sure you remember
them all, say so.
2. SORT: For each change, answer honestly: did it help, did it do
nothing, or did it make things worse or add a new error?
3. REVERT: Put back everything that did not clearly help. I want to
get back to having ONE problem, the original one, instead of the
original problem plus your patches. Tell me each thing you put back.
4. CONFIRM: Tell me what the current error is NOW, after the cleanup.
Quote it exactly. It may be the original error again. That is good.
That is progress.
5. DIAGNOSE FRESH: Now treat that error as brand new. Explain it in
plain English (2 sentences max), classify it (app code / missing
key / service down / limit hit), and propose the single smallest
fix. Do not apply it yet. Wait for my go.
Rule from here on: one change per attempt, and you report what changed
after each one. No batches.
The five errors you will definitely hit (and their fix prompts)
These five cover most of what goes wrong in a vibe-coded app. Read them once now; next time one appears you'll recognize the shape, and recognition kills the panic. Each has a purpose-built prompt that's faster than the general decoder because the diagnosis is already done.
1. Missing or invalid API key (401 / 403)
Looks like:Error 401: Unauthorized or Incorrect API key provided: sk-proj-****. Means: the app tried to use a paid service and the password for it (the API key) is missing, mistyped, or expired. Your code is fine. Don't let the AI rewrite anything; make it point you to the right slot.
PROMPT: FIX PROMPT: API key errors
I'm getting an authentication error (401/403/invalid API key). Do not
rewrite any app code; this is a credentials problem, not a code problem.
1. Tell me exactly which service is rejecting us (the name of it).
2. Tell me exactly where in this project that service's key is supposed
to live (the name of the setting or environment variable, which is a
named slot where apps store secrets).
3. Tell me whether that slot is currently empty, or filled with something
that looks wrong (wrong format, extra spaces, quotes around it).
4. Tell me the exact page where I get a fresh key for this service, and
the exact place in my tool where I paste it (which menu, which button).
5. Do not put the key directly into the code files, ever. Keys live in
the settings slot only.
I will paste the new key myself. After I do, tell me how to confirm it
worked.
2. CORS blocked
Looks like:blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present. Means: CORS (a browser safety rule about which websites may talk to which servers) refused to let your app call another service from the browser. Your code is knocking on a door the browser won't open from this side. Two legitimate fixes exist; the prompt makes the AI pick the smaller one and bans the dangerous shortcuts.
PROMPT: FIX PROMPT: CORS errors
I'm getting a CORS error (the browser safety rule that blocks one website
from calling another server directly). The full error is pasted below.
1. Explain in one sentence which two addresses are refusing to talk:
my app's address and the server it tried to call.
2. Tell me which fix applies here (pick one, smallest first):
a) The service I'm calling has a setting where I add my app's address
to its allowed list. If so, tell me where that setting is.
b) The call should be made from my app's backend instead of from the
browser (servers are not bound by this browser rule). If so, move
ONLY this one call to the backend. Do not restructure anything else.
3. Do NOT "fix" this by disabling security, using a random public proxy
from the internet, or adding headers to my own app (my app's headers
cannot fix this; the permission has to come from the other side or
the call has to move).
4. Apply the one fix, then tell me what you changed and how to test it.
HERE IS THE ERROR:
[PASTE THE CORS ERROR HERE]
3. Build failed / syntax error
Looks like:Build failed with 1 error: src/components/Dashboard.tsx:42:18: ERROR: Expected ")" but found "{". Means: a typo-level mistake (missing bracket, misspelled name, import pointing at a file that doesn't exist) and the app can't start until it's corrected. The good news: the message almost always names the exact file and line, so the fix should be surgical.
PROMPT: FIX PROMPT: build failures
The build failed (the app can't start because of a code mistake). The
full error is pasted below.
1. The error names a file and usually a line number. Go to exactly that
spot. Quote me the broken line.
2. Explain in one plain-English sentence what's wrong with it (missing
bracket, misspelled name, importing a file that doesn't exist, etc.).
3. Fix ONLY that line (or the smallest edit that resolves it). Do not
rewrite the file, do not "clean up while you're in there", do not
touch any other file.
4. If fixing it reveals a SECOND build error, stop and show me the new
error before fixing it. One error per attempt.
5. Report: the before line, the after line, and confirmation the build
passes.
HERE IS THE ERROR:
[PASTE THE BUILD ERROR HERE]
4. The blank white page
Looks like: nothing. That's the problem. Means: the app crashed while drawing the screen, before it could show you anything, and the real error is in the browser console. A blank page is never "nothing happened", it's "something happened too early for you to see it." Use the Blank Page Decoder from the section above; it's the same situation.
5. Rate limit / quota exceeded (429)
Looks like:Error 429: Too Many Requests or You exceeded your current quota, please check your plan and billing details. Means: a service you use has a ceiling (requests per minute, per day, or dollars per month) and you hit it. No prompt can code around a ceiling, but the AI can tell you which ceiling, when it resets, and whether your app is calling the service more than it needs to.
PROMPT: FIX PROMPT: rate limits and quotas
I'm hitting a rate limit or quota error (429 / quota exceeded). This is
a usage ceiling, not a code bug, so do not rewrite app logic to "fix" it.
1. Tell me exactly which service's limit I hit, and which kind:
a) Too many requests too fast (resets in minutes)
b) A daily/monthly cap (resets on a schedule)
c) A spending or plan limit (resets when I pay or upgrade)
2. Tell me, from the error message, when it resets or what upgrading
costs, if that information is in there.
3. Tell me if my app is calling this service more than it needs to
(for example, calling it on every keystroke instead of on submit,
or calling it in a loop). If yes, propose the ONE change that cuts
the most calls, and apply only that.
4. If the app's usage is reasonable and I simply need a bigger plan,
say so plainly with the service's pricing page, and change nothing.
Bonus: "it worked yesterday and I changed nothing"
You will say this sentence. Everyone says this sentence. The uncomfortable truth: something changed. Computers don't develop moods. A package updated itself, a trial expired, a key rotated, a service changed its rules. Don't argue with the app; make the AI find the change.
PROMPT: FIX PROMPT: find what changed
This app worked yesterday (or recently) and now it doesn't. I have not
knowingly changed anything. Something DID change; help me find it before
we fix anything.
Check each of these and report what you find, one line each:
1. CODE: What are the most recent changes to this project's files?
List the last few edits with dates if you can see them.
2. DEPENDENCIES: Did any package (third-party code this app is built on)
get updated or reinstalled recently? Packages can change under you
even when your own code doesn't.
3. KEYS AND SERVICES: Could any API key, trial, or plan have expired?
Look at the actual error we're getting now; does it smell like
auth (401/403), limits (429), or a service being down (500/503)?
4. THE OUTSIDE WORLD: Is the error coming from a service we call, rather
than from our code? If so, that service may have changed or gone down,
and no local fix will help.
Then tell me your best single theory for what changed, and the smallest
way to confirm it. Do not fix anything until we've confirmed the theory.
When to stop fixing and just go back
Sometimes the fastest fix is no fix. If you've been going in circles for 30 minutes, or the app is now worse than when the error first appeared, revert: throw away today's changes and return to the last version that worked. This is not giving up. Professional developers do it constantly; it's why they keep every version of their work in the first place.
[ ]30-minute rule: if you're on attempt four with no progress, stop prompting and revert.
[ ]Worse-than-start rule: if the app is more broken than when the error appeared, revert first, then run the decoder on the original error from a clean slate.
[ ]Tool undo: Lovable, Bolt, and Replit all keep version history. Look for "History", "Restore", or a version list in the left panel or top bar, and roll back to the last version that worked.
[ ]GitHub undo: if your project is connected to GitHub (the site that keeps every saved version of your project), you can go back to any saved point. The full plain-English walkthrough is in GitHub for Normal People.
PAYOFF
Reverting costs you an afternoon of changes. A broken app costs you the project. The builders who last aren't the ones who never break things; they're the ones who can always get back to a version that works.
When you outgrow this kit
The decoder handles the everyday errors: read the message, classify it, fix one thing. When you start hitting bugs with no error message at all, bugs that only happen sometimes, or bugs where the fix keeps not working, you're ready for the full investigation system: The Debug Loop, 10 prompts that take an AI from "reproduce it on demand" through "prove it can never come back." Same one-change discipline, much bigger toolbox.
Get the next drop
Every new Vault system ships to the list first. Twice a week, free.