How to Write Prompts for Lovable AI
Lovable turns natural language into working applications, which means the prompt is the specification. This guide covers the structure Lovable responds to, why that structure is also the cheap way to build under Lovable's own pricing, and an actual prompt from our library annotated line by line.
Updated
Why structure beats prose, in Lovable's own terms
Two facts from Lovable's documentation decide how you should prompt. First, Plan mode never modifies your code and costs a flat one credit per message, while Build mode is usage-based. Second, Lovable states that in Build mode "small, focused edits usually cost less than larger generations, multi-step changes, or requests that require more codebase exploration."
Read those together and the conclusion writes itself: cost scales with how much Lovable has to figure out, not just with how much it writes. A vague paragraph makes the model explore, guess priority, and produce something you then correct, and every correction is another billable Build round. A structured prompt removes the guessing, which is why every prompt in our library uses the same section skeleton. Sources: Lovable's credits and usage documentation and Lovable's own prompting handbook, both read on 30 July 2026.
The seven sections of an effective Lovable prompt
This is the exact skeleton our generator produces and all 101 library prompts follow. Each section exists to remove one specific failure mode.
- # Context
- What the app is, who it is for, and the one job it has to do. Lovable builds the wrong thing most often when this is vague.
- ## Core Features (Priority Order)
- Numbered, so Lovable builds the load-bearing feature first instead of spreading effort evenly across everything you mentioned.
- ## Visual Style & Design
- Named shadcn/ui components and concrete spacing rules rather than adjectives like clean or modern.
- ## Technical Requirements
- Breakpoints, loading states, validation, and accessibility, stated up front so they are not retrofitted later.
- ## Implementation Strategy
- The build order. This is what stops Lovable from generating a UI it cannot wire up.
- ## Safe-Guard Instructions
- Constraints that survive later edits, so iterating on one screen does not quietly break another.
- ## Growth Features (Required for Distribution)
- The section no other prompt tool writes: the mechanics that make the finished app reachable through the channel you picked.
A library prompt, annotated
This is the opening of "Landing Page + Email Opt-In" from the library, verbatim, followed by why each choice is there. Nothing below is a mock example written for this article.
# Context
Build a single-purpose landing page: capture an email address before a product launches. The visitor arrives from one known traffic source, so the page carries one offer and one action, and nothing that competes with them.
## Core Features (Priority Order)
1. Hero: the offer in one sentence, the form visible without scrolling
2. Email capture writing to Supabase with UTM parameters stored per signup
3. Inline success state replacing the form, no redirect, no alert
4. Duplicate handling: resubmitting the same address confirms instead of erroring
5. A substantive copy body below the fold: what it is, who it is for, three concrete FAQs
## Capture & Consent
- Client and server-side email validation; the server is the one that counts
- Store source, utm_source, utm_medium, utm_campaign and referrer on every row
- One-line consent text under the form stating what will be sent and how to leave
## Copy & Conversion
- One accent color, used by the submit button and nothing else
- Proof elements are placeholders clearly marked as placeholders; never invent names or numbers
- Maximum 65 characters per line of body copy; generous vertical rhythm
## Build Order
Static page with final copy first, so something exists to index. Then the form and write path with duplicate handling, then UTM capture, then analytics last.
## Safe-Guard Instructions
- The signups table accepts inserts and forbids reads from the client, with no exceptions for debugging
- No second call to action anywhere on the page
- The form must not lose the typed address on a validation error| Why it is written that way | |
|---|---|
| The job stated in line one | “Optimized for lead generation” appears before any feature. Lovable weighs early context heavily, so the first sentence decides what gets built carefully versus incidentally. |
| Numbered Core Features | Priority is explicit. If credits run short or attention drifts, items 1 and 2 exist before item 5, instead of five half-built features. |
| Supabase named in the stack | Without a named destination, Lovable happily builds a form with nowhere for the address to go. Naming it forces the write path to exist. |
| Validation asked for up front | States, not just screens. Validation, loading and error handling are the most common omissions in generated apps, so they are requested in round one rather than paid for in round two. |
The full prompt, including the visual style, implementation order and safeguard sections, is free in the library.
Progressive prompting: the working rhythm
One prompt does not build a finished product, and trying makes the first generation worse. The rhythm that holds up, and matches how Lovable prices its two modes:
Plan the approach in Plan mode
Flat one credit per message and it cannot touch your code. Compare approaches, settle the data model, decide the build order here, where thinking is cheap and safe.
Issue one structured Build prompt for the foundation
The seven-section skeleton above, scoped to the core loop: one read path and one write path working end to end beats six screens of placeholders.
Extend with scoped, specific requests
Name the screen or component you are changing. Lovable bills partly for how much codebase it reads, so “add sorting to the members table” is cheaper than “improve the dashboard”.
Correct the miss, never restate the feature
When a generation is 80% right, describe the 20% that is wrong. Restating the whole feature triggers a large regeneration and risks breaking the 80% that worked.
The patterns that fail, and what to write instead
| What happens | Write instead | |
|---|---|---|
| “Build me a modern, clean dashboard” | Adjectives carry no instruction. Lovable picks defaults and you pay a second round to change them. | Name components and values: shadcn Card and Table, a 4px spacing grid, 8px corners, one accent color for primary actions. |
| The whole app in one prompt | Everything arrives half-built, and fixing it costs more than staging it would have. | Foundation first, then features by priority. Our library sequences every category this way. |
| No empty, loading or error states | The happy path works in the demo and breaks the first time a list is empty. | One line: “include empty, loading and error states for every list and form.” |
| Distribution ignored entirely | You get an app with no reason anyone will find it: features floating with no channel. | State the channel and what it needs: indexable pages for SEO, an invite loop for product-led growth. This is the section most prompt guides skip. |
The full failure catalogue, with before-and-after prompt pairs, is in common mistakes when using Lovable.
Where to go from here
If you would rather start from a working prompt than write one, the library has 101 of them, each following this structure and tagged with the growth channel it serves. The generator writes one for an idea that does not match an existing pattern. And since structure is also the cost lever, how Lovable credits work explains the billing mechanics this guide keeps referring to.
Frequently asked
How long should a Lovable prompt be?↓
Should I use Plan mode or Build mode first?↓
Why does Lovable ignore parts of my prompt?↓
Do these techniques work for other AI builders like Bolt or v0?↓
Written by

Marco Kohns
Founder of ProtoBites - Venture Growth Studio
Growth PM at a Silicon Valley scale-up (a16z and General Catalyst backed), ex-Techstars where he consulted 13 early-stage startups, Reforge-trained. Every prompt on this site comes out of shipping ProtoBites' own portfolio products.