Vibe coding prompts: 12 copyable templates for every stage of a build
Good vibe coding prompts are short templates with the same parts: the goal, the limits, what must not change, and how you will check the result. Twelve are below, one for each stage of a build: planning, the first version, bug reports, explaining code, security checks, tests, refactors, restarting a drifting session and handing a project on. Fill in the brackets and paste.
What makes a good vibe coding prompt?
A good prompt gives the tool a job it can finish and a way for you to see that it did. Most failed prompts are not badly worded. They are too big, or they say what you want without saying what to leave alone, or they give no check. The templates below fix those three things.
These are the process prompts, the ones you reuse on every project. If you want a full first prompt for a specific app, such as a streak tracker or an RSVP page, the worked builds are in vibe coding examples, and starter ideas are in vibe coding project ideas. For the method behind all of them, read how to write an app build prompt.
| Part | What it does | Example wording |
|---|---|---|
| Goal | One outcome, not a list of wishes | “Add a delete button to each row.” |
| Limits | What the tool may not touch or add | “Do not change the calculation or add any new pages.” |
| Evidence | The input and the output you expect | “With 3 items it should show Total: 3.” |
| Report | What the tool tells you at the end | “List the files you changed and what you assumed.” |
Which vibe coding prompts should you copy?
They are in the order of a project. Replace everything in square brackets.
01 The plan-first prompt
Ask for a plan and questions before any code, so you fix a wrong idea while it is still cheap.
- Stage
- Start of a project or a large feature
- Why it works
- A wrong assumption in a plan costs one message; in code it costs an afternoon
I want to build [one-sentence description] for [specific user]. Do not write any code yet. 1. Ask me up to five questions that would change how you build it. 2. Then give a plan of at most eight steps, each one small enough to test by itself. 3. List what you would leave out of version one. Wait for my answers before you start.
Read the plan for features you did not ask for. Cut them before step one. Browser builders such as Bolt have a built-in planning mode for the same purpose (Bolt Plan Mode).
02 The one-screen first-build prompt
A compact spec for a first version, with a not-building list and a test you can run.
- Stage
- First version
- Why it works
- The not-building list stops the tool from adding unrequested features
Build [name]: a single-page web app. User: [who], who wants to [one task]. Screen: [the two or three things shown]. Behavior: when the user [action], the app [response]. Example: input [X] gives [Y]. Data: keep it in the browser for now. No login, no server, no database. Do not build: accounts, payments, settings, or anything not listed above. Done when: [the exact check you will run]. Afterwards, tell me how to run it and list your assumptions.
Always include one example with real numbers. It is both a spec and your test.
03 The scope fence
A short wrapper that confines each follow-up request to one change.
- Stage
- Every follow-up
- Why it works
- Most spirals begin with a request that touches more than you meant
Make exactly one change: [what and where]. Do not modify anything else, including [the parts that currently work]. If the change needs touching other files, stop and tell me which and why before editing. When done, list every file you changed in one line each.
The “stop and tell me” line is the most useful part. It turns a silent wide edit into a question.
04 The bug report
Input, wrong output, expected output and a constraint, which gets most bugs fixed on the first attempt.
- Stage
- Whenever something is wrong
- Why it works
- The tool can reproduce the problem instead of guessing at it
Bug: when I [action] with [exact input], I get [what happened]. Expected: [what should happen, with exact values]. Error text (paste in full, no summary): [error] Fix only this. Do not change [working parts]. Before editing, tell me in two sentences what you think the cause is.
Paste error messages whole, from the browser console or the terminal. A summary drops the line number the tool needs.
05 The explain-it-to-me prompt
Make unread code readable: a plain-language tour with the risky parts flagged.
- Stage
- Before you add anything big, and before you publish
- Why it works
- You cannot judge code you cannot read, so ask for a version you can
Explain this project to me as if I have never coded. 1. What does each file do, in one sentence? 2. Where does the data live, and what happens to it when I close the page? 3. Which parts talk to the outside world (servers, other services)? 4. Which two or three parts would be most dangerous to get wrong, and why? Do not change any code.
Treat answer 4 as your review list. Check those parts with a test or ask someone who reads code. Simon Willison's rule, that you should not ship code you cannot explain to someone else, is the standard to aim for (his post).
06 The secrets and access check
A review prompt that asks where keys live and who can read the data.
- Stage
- Before anyone else uses the app
- Why it works
- Exposed keys and open data are the two failures that cost the most
Review this project for security problems. Do not change code; report only. 1. List every secret or API key used, where it is stored, and whether it can be seen in the browser. 2. For every database table, say who can read and who can write, and which rule enforces that. 3. List every place user input reaches a database, a file, a page or a command. 4. Rate each finding high, medium or low and say how to test it. Be specific: file names and line numbers.
Then test the high findings yourself. Browser code is public, so any secret there is exposed; Vite states that VITE_ variables are bundled into client code (Vite docs). The full picture is in vibe coding security.
07 The add-tests prompt
Pin down what the app does now with tests, so later changes cannot silently break it.
- Stage
- After the first version works, before the second round of features
- Why it works
- Tests turn “it seemed fine” into a pass or a fail
Write automated tests for the current behavior of [the calculation / the rules / the form]. Use these cases: [input -> expected output], [input -> expected output], plus empty input, zero and a very large value. Tests must pass against the code as it is now. If one fails, tell me; that is a bug, not something to hide. Explain how to run the tests with one command.
Run the tests yourself. A tool that reports “all tests pass” without running them is a common failure; the command output is the evidence.
08 The safe-refactor prompt
Clean up messy generated code in small steps, with the tests as a safety net.
- Stage
- When the code has grown past what you or the tool can follow
- Why it works
- Behavior stays fixed while structure improves
Refactor [file or area] to reduce duplication and make it easier to read. Rules: no behavior changes, no new features, no new dependencies. Work in steps of one small change. After each step, run the tests and stop if any fail. At the end, summarize what moved where, in plain language.
Generated code often repeats itself. A GitClear analysis of 211 million changed lines found duplicated code rising and refactoring falling between 2020 and 2024, as summarised in Wikipedia's article. A scheduled clean-up keeps a project workable.
09 The add-a-database prompt
Move from browser-only data to a hosted database without leaving the door open.
- Stage
- When data must survive across devices or be shared
- Why it works
- It forces the access rules to be written at the same time as the table
Move the [list of items] from browser storage to a hosted database. Create one table with these columns: [columns and types]. Turn on row-level security. Rules: [who may read, who may write]. The browser may use only the public (publishable) key. The secret key must never appear in front-end code. Before finishing, show me the table definition and each rule, and give me two test steps to prove another user cannot see my rows.
Supabase says its publishable key is safe in a browser only when row-level security is on for every table, and that a secret key bypasses those rules (Supabase API keys).
10 The review-the-diff prompt
Ask a second session to review the changes the first one made, with no memory of writing them.
- Stage
- Before you merge or publish a larger change
- Why it works
- A fresh session has no stake in defending its earlier work
You are reviewing a change you did not write. Here is the diff: [paste]. Its goal was: [one sentence]. List: (1) anything that does not match the goal, (2) anything that could break existing behavior, (3) anything added that was not asked for, (4) missing tests. Do not rewrite the code. Report findings, most serious first.
Use git diff to produce the text, or ask your tool to show the changes. This habit moves you from vibe coding toward ordinary reviewed development, which is a good direction for anything that will last.
11 The reset prompt
Start a clean session when fixes keep breaking things, carrying over only what matters.
- Stage
- After three or more failed fixes in a row
- Why it works
- A long thread of failed attempts misleads the tool as much as it informs it
Fresh start on an existing project. Read the code first; change nothing yet. Goal of the app: [one sentence]. It currently works except for: [the one problem]. Things already tried that did not work: [list]. Find the root cause by reading the relevant code. Explain it in plain English and propose the smallest fix. Wait for my go-ahead before editing.
Before you open the new session, restore the last version that worked. Reset to a clean state, then ask again, instead of repairing a damaged one.
12 The handoff note prompt
Have the tool write the document a future session, or a human developer, needs to pick up the project.
- Stage
- End of a work session or before handing the project to someone
- Why it works
- Context lost between sessions is a common source of rework
Write a HANDOFF.md for this project, for a developer who has never seen it. Include: what the app does; how to run it and test it; the folder structure in a short list; where data is stored; every outside service and key it needs, by name only, never the values; known bugs; decisions we made and why; what to build next. Keep it under one page. Do not include any secret values.
A short note like this also makes a good start for a project instructions file. If you never plan to build the idea yourself, a handoff is what a builder wants; on the board, every idea gets a generated build prompt for the same reason.
How do you adapt these prompts to your own project?
Change the brackets, keep the structure. Three rules make them work better.
- Be exact where it counts. Numbers, names and expected outputs beat adjectives. “Show the total in cents, rounded down” beats “handle money properly.”
- Say no as clearly as yes. Every “do not” line is a feature the tool will not add on its own.
- Check the report. The last line of most templates asks for a list of files changed or assumptions made. Read it. Surprises there are cheaper to catch than in the app.
Different tools respond to different styles. Browser builders like short, outcome-focused messages; terminal agents like Claude Code handle longer instructions that name files and commands. If you use it, how to build an app with Claude Code covers that style, and coding prompts covers prompts for working developers.
| Problem | Use |
|---|---|
| Not sure how to start | The plan-first prompt |
| The tool keeps adding things | The scope fence, plus a not-building list |
| Something is broken | The bug report |
| You cannot follow the code | The explain-it-to-me prompt |
| Before sharing the link | The secrets and access check |
| Fixes make it worse | The reset prompt, after restoring a working version |
| You are done for the day | The handoff note prompt |
Frequently asked questions
What is a vibe coding prompt?
A vibe coding prompt is a plain-language instruction that tells an AI coding tool what to build or change. The best ones name one goal, state what must not change, include an example input and output, and ask the tool to report what it changed. Short and specific beats long and vague.
What is the best prompt to start a vibe coding project?
Ask for a plan before code. Tell the tool what you want to build and for whom, ask it to put up to five questions to you, then to propose a plan of small testable steps and what to leave out. Fixing a wrong assumption in a plan costs one message.
How long should a vibe coding prompt be?
As long as it needs to be to include the goal, the limits, an example and the check, which is usually under 150 words. First-build prompts run longer than follow-ups. Follow-ups should ask for one change. If a prompt asks for five things, split it into five.
Can you save vibe coding prompts to reuse them?
Yes. Put instructions you repeat in a project file the tool reads automatically, such as CLAUDE.md for Claude Code, rules files in Cursor or AGENTS.md. Bolt has a Prompt Library for saving prompts. Keep a plain text file of your own templates for any other tool.
Why does the AI ignore part of my prompt?
Long prompts with many asks get partly followed, and long threads bury early instructions. Split the request into single changes, put the most important limit in its own line, and restart the session with a short summary when the thread gets long. Ask the tool to repeat your constraints back before it edits.
Do these prompts work in Lovable, Cursor and Claude Code?
Yes. They are tool-neutral text. Browser builders like Lovable respond well to short outcome-based messages, and agents like Claude Code and Cursor handle longer instructions that name files and commands. Adjust the length, not the structure, and always run the tests the prompt asks for.
Created with AI assistance and edited for this site. Examples are illustrative and do not represent customer research. About the publisher.