Back to Learn

    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
    Line-by-line reasoning for the prompt above
     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 FeaturesPriority 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 stackWithout 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 frontStates, 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:

    1. 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.

    2. 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.

    3. 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”.

    4. 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

    Common prompt failures and their fixes
     What happensWrite 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 promptEverything 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 statesThe 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 entirelyYou 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?
    Long enough to carry priority, build order and constraints, which in practice is a few hundred words. The 101 prompts in our library average around 140 words for the base version, and the channel-optimized versions run roughly twice that. Short prompts are not faster: the time comes back as rebuild rounds, and on Lovable's usage-based Build mode, rebuild rounds are literally what you pay for.
    Should I use Plan mode or Build mode first?
    Plan mode first, and this is a cost statement rather than a style preference. Lovable's documentation prices Plan mode at a flat one credit per message and it never modifies code, while Build mode is usage-based and scales with how much of your codebase it has to read. Working out the approach in Plan mode and then issuing one specific Build instruction is usually cheaper than three exploratory Build messages.
    Why does Lovable ignore parts of my prompt?
    Usually because everything in it has equal weight. An unordered feature list makes Lovable spread effort evenly and decide priority for you. Numbering features, stating a build order, and putting constraints in their own section is what makes the important parts arrive first. That is the whole argument for a structured prompt over a paragraph.
    Do these techniques work for other AI builders like Bolt or v0?
    The structure transfers, the costs differ. Bolt meters tokens that scale with project size and v0 meters dollar credits per model, so the discipline of scoped, specific prompts pays on all of them. Our comparison pages cover where the platforms genuinely differ.

    Written by

    Marco Kohns

    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.