How to Write Vibe Coding Prompts That Work
Your app is only as good as your prompt. The AI does not guess what you mean — it builds what you wrote. A vague prompt gives you a vague app. A clear prompt gives you the app you imagined.
This post teaches you how to write prompts that work: the 4-part formula, copy-paste examples for real projects, and the two prompts every beginner needs — the fix-the-error prompt and the safety-check prompt.
If you have not written a prompt yet, start with Vibe Coding Prompts for Beginners — 15 ready-made prompts. The workflow behind every prompt here is in How to Vibe Code: Step-by-Step Guide for Beginners.
Table of contents
- The 4-part prompt formula
- Part 1: What it is
- Part 2: Who it is for
- Part 3: What it looks like
- Part 4: What it must do
- The formula in action: three copy-paste prompts
- How to ask for one change at a time
- The fix-the-error prompt
- The safety-check prompt
- Good prompts vs bad prompts
- Frequently asked questions
- What to read next
The 4-part prompt formula
Every prompt that works has the same four parts:
- What it is — the kind of app, in one line.
- Who it is for — the person using it.
- What it looks like — colours, layout, style.
- What it must do — the features, in order.
Miss one part and the AI fills the gap with a guess. Miss two and you get a generic page. Write all four and the app comes back close to what you imagined — usually on the first try.
Part 1: What it is
Name the app and its one job. "A to-do app" is a start. "A to-do web app called 'My Tasks'" is better — a name makes the app feel real, and the AI treats it as a product, not a demo.
Part 2: Who it is for
One line about the user changes everything. "For local customers who want to see the menu and order" tells the AI the page needs prices and an Order button. "For me, to track my own habits" tells it the app needs no login and no sharing. If you skip this part, the AI builds for everyone — which means it builds for no one.
Part 3: What it looks like
You do not need design words. Say the colours and the layout in plain language: "Warm colours — cream background, brown text, orange buttons." "Three cards in a row on a laptop, stacked one below the other on a phone." "Big headline at the top, menu below it." The AI handles the rest.
Part 4: What it must do
List the features in the order the user meets them. "It should have a text box and an Add button at the top, a list below, and each task should have a checkbox and a delete button." Features in order become a page in order. Features in a jumble become a jumble.
The formula in action: three copy-paste prompts
A bakery website:
"Build a one-page website for a small bakery called 'Crumb & Crust'. It is for local customers who want to see the menu and order. It should have a big headline, three cards with prices, and an Order button. Warm colours — cream background, brown text, orange buttons."
A habit tracker:
"Build a habit tracker web app called 'Daily Habits'. It is for me, to track my own habits every day. It should have a list of habits, a checkbox for each day, and a streak count that shows how many days in a row I did it. Clean design — white background, green buttons, dark text."
A landing page:
"Build a landing page for a free online course called 'Learn Guitar in 30 Days'. It is for complete beginners who have never played guitar. It should have a big headline, a short video section, three benefits in cards, and a big Sign Up button. Dark blue background, white text, yellow button."
Copy one, change the details to your idea, and send it. That is the whole method.
How to ask for one change at a time
After the first build, every fix is a small prompt of its own. One change per message. "Make the button bigger." Then test. "Change the background to light blue." Then test. Five changes in one message means three done, one broken and one forgotten — the most common beginner mistake, covered in full in Vibe Coding Mistakes Beginners Make.
The fix-the-error prompt
When something breaks, do not write "it doesn't work". The AI cannot see your screen. Copy this prompt and fill in the blanks:
"When I click [the button / the link / the form], I expected [what should happen], but instead [what actually happens]. Here is the exact error message: [paste it here]. Please fix only this problem and do not change anything else."
Three things make this prompt work: what you clicked, what you expected, and the exact error. With those three, the AI usually fixes it in one try. Without them, it guesses — and a guess can break something that was working.
The safety-check prompt
Before you publish anything that handles other people's data, send this:
"Please check this app for security problems before I publish it. Tell me: does it store user data safely? Does it ask only for the data it needs? Is there any way a stranger could see or change another user's data? List every problem you find and fix them one at a time."
Then read the answer yourself. If the AI lists a problem you do not understand, ask it to explain in plain words. Never publish an app that handles names, emails or messages until you understand what it does with them. The full picture is in Is Vibe Coding Bad?.
Good prompts vs bad prompts
| Bad prompt | Good prompt | Why it works |
|---|---|---|
| "Make me a website" | "Build a one-page website for a bakery called 'Crumb & Crust', for local customers, with a headline, three cards with prices and an Order button" | Names the app, the user, the features |
| "Build me an app" | "Build a to-do web app called 'My Tasks' with a text box and Add button at the top, a list below, and a checkbox and delete button on each task" | Features in the order the user meets them |
| "It doesn't work" | "When I click the Order button I expected a confirmation message, but nothing happens. The error says: 'undefined is not a function'. Fix only this." | What you clicked, what you expected, the exact error |
| "Make it look better" | "Change the background to cream, the text to dark brown, and make the button orange and bigger" | Exact colours and exact changes |
Frequently asked questions
How long should a prompt be? As long as it needs to be — usually 3 to 5 sentences. One sentence per part of the formula. A prompt that is too short leaves the AI guessing; a prompt that is too long buries the important part.
Should I write the prompt in my own words? Yes. Plain words work best. You do not need technical language — "a box where I type my task and a button that adds it" is a better prompt than "implement a controlled input component with state management".
What if the AI builds the wrong thing? It usually means one part of the formula was missing. Read your prompt again: does it say what it is, who it is for, what it looks like and what it must do? Add the missing part and send it again.
Can I reuse the same prompt for a different project? Yes — the formula is the same every time. Change the details, keep the structure. After three or four projects you will write good prompts without thinking about it.
What is the first prompt I should write? Your first app's prompt, written on paper before you open the tool. The bakery website prompt above is a good first one — it is small, it is real, and it teaches you the whole workflow.
What to read next
- Vibe Coding Prompts for Beginners — 15 copy-paste prompts for real projects.
- How to Vibe Code a Website: A Beginner's Step-by-Step Guide — the full 7-step workflow, applied to one real website.
- Vibe Coding Mistakes Beginners Make — the eight mistakes that break a good prompt, and the fix for each.
- How to Use Lovable for Beginners: Build Your First App Step by Step — where to paste these prompts first.
Write your next prompt on paper first. Four parts, three to five sentences, one idea — then send it.
Written by Samiullah Channa, Vibe Coding Guide. Published 27 November 2026.




Comments
Post a Comment