Skip to main content
RapidDev - Software Development Agency
lovable-issues

The Lovable Prompting Guide: Write Prompts That Ship Features

The best Lovable prompts describe one feature at a time, give context (what, why, and any constraints), and scope changes with @file references when precision matters. This guide breaks down prompt anatomy, when to use Plan Mode instead of a direct build request, and gives 10 copy-paste prompt patterns for common features like auth, CRUD, and payments — the difference between a prompt that ships and one that burns credits going in circles.

Book a free consultation
4.9Clutch rating
1,000+Happy partners
20+Countries served
200+Team members
Beginner9 min read15 min read, reusable patternsAll Lovable plans — prompting technique, not a paid featureLast updated September 2026RapidDev Engineering Team
TL;DR

The best Lovable prompts describe one feature at a time, give context (what, why, and any constraints), and scope changes with @file references when precision matters. This guide breaks down prompt anatomy, when to use Plan Mode instead of a direct build request, and gives 10 copy-paste prompt patterns for common features like auth, CRUD, and payments — the difference between a prompt that ships and one that burns credits going in circles.

Quick facts about this guide
FactValue
ToolLovable
DifficultyBeginner
Time required15 min read, reusable patterns
CompatibilityAll Lovable plans — prompting technique, not a paid feature
Last updatedSeptember 2026

Why prompt quality matters more in Lovable than in a generic chatbot

Every Lovable prompt does two things at once: it is a conversation and it is a code-change request against a real, growing codebase. A vague prompt to ChatGPT just gets a vague answer you can ignore. A vague prompt to Lovable gets executed — files change, components get added or removed, and if the request was ambiguous, you often end up with the wrong thing built correctly, which then needs another prompt (and more credits) to undo. Because Build mode work is billed by complexity, an unclear prompt that has to be redone twice can easily cost more credits than one precise prompt would have. The other reason prompting technique matters specifically in Lovable is scope. The AI can see your whole project, which is powerful but also means an underspecified request ('make the dashboard better') can touch far more files than you intended. Precise prompts — naming the exact feature, the exact file or component when relevant, and any constraints — keep changes contained and predictable. This is prompt engineering applied to a full-stack builder, not just a text generator.

  • Stacking multiple unrelated changes into one prompt makes failures hard to isolate
  • Missing context (why a feature exists, what should NOT change) leads to unwanted side effects
  • No file or component scoping lets the AI touch more of the codebase than necessary
  • Not distinguishing 'plan this' from 'build this' wastes credits on features that needed more thought first

Before you start

  • A Lovable project with at least one working feature already built
  • A specific next feature or change in mind — this guide is about how to phrase it, not what to build

How to fix it

1

Scope one feature per prompt

Isolated changes are easy to review, easy to revert, and easy for the AI to reason about correctly.

Resist the urge to list five things in one message ('add login, fix the header, and also make the pricing page responsive'). Each of those is a separate prompt. If Lovable gets one of the three wrong, a single-feature prompt means you only have to fix or revert that one thing — a combined prompt means untangling which change caused which regression. As a rule of thumb, if you can't summarize the request in one sentence, split it.

Expected result: Each prompt maps to one reviewable, revertable change in your version history.

2

Use context blocks: what, why, and constraints

Lovable's agent fills in gaps with its own assumptions — giving it the context you already have in your head prevents those assumptions from being wrong.

A strong prompt has three implicit parts, even if you don't label them: what you want built, why it matters or how it fits the rest of the app, and any constraints (things that must NOT change, a library you want used or avoided, a design pattern to follow). You don't need headers in the actual message — just make sure all three are present in plain language.

typescript
1Add a 'save for later' button to each product card. This should let logged-in users bookmark items without adding them to the cart. Store the saved items per-user so they persist across sessions. Do not change the existing 'add to cart' button or its styling.

Expected result: The AI has enough context to build the right feature without touching unrelated parts of the UI.

3

Scope precisely with @file and @folder references

Naming the exact file keeps large-project prompts from accidentally spreading changes across the codebase.

In projects with many components, use @ to reference a specific file or folder (for example @src/components/ProductCard.tsx) so Lovable knows exactly where to focus. This is especially useful for bug fixes and small tweaks in a mature project, where an unscoped prompt risks the AI 'helpfully' touching nearby files you didn't ask it to change.

typescript
1In @src/components/ProductCard.tsx, fix the price formatting so it always shows two decimal places, even for whole-number prices like $20.

Expected result: The change is contained to the referenced file instead of spreading across the component tree.

4

Switch to Plan Mode before big or risky changes

Plan Mode reviews the approach before any code is written, which is far cheaper than undoing a wrong implementation.

For anything that touches your data model, restructures multiple pages, or you're not fully sure how to describe yet, switch to Plan Mode instead of a direct build request. Lovable will explore the codebase and propose a structured plan — screens, data changes, edge cases — for you to review and adjust before anything is built. Plan Mode messages cost 1 credit each (research subagents can add to that), which is small compared to redoing a multi-file feature that went the wrong direction.

typescript
1I want to add a multi-tenant workspace structure so each user can belong to multiple organizations with different roles. Plan out the data model changes, the screens affected, and the migration approach before we build anything.

Expected result: A reviewable plan you approve (or adjust) before Lovable switches to Build mode and writes code.

5

Maintain a knowledge file so context doesn't reset every session

Without a persistent knowledge file, every new chat starts from zero and may re-litigate decisions you already made.

Create an AGENTS.md (or similarly named file) in your project root that documents your tech stack choices, database schema, naming conventions, and any files that should not be touched without asking. Reference it implicitly — Lovable reads project files as context — or explicitly with @AGENTS.md in a prompt when a change is likely to conflict with an established pattern. Keeping this file updated as the project grows is one of the highest-leverage habits in the whole workflow, and it's exactly the kind of structure RapidDev sets up when we take over a Lovable project that grew past its first few prompts.

Expected result: New prompts and new chat sessions stay consistent with decisions made earlier in the project.

Complete code example

prompt-patterns.md
1# 10 Copy-Paste Lovable Prompt Patterns
2
3Adapt the bracketed parts to your project. Each pattern follows the
4what / why / constraints structure from the guide above.
5
6## 1. Authentication
7Add email/password authentication using Lovable Cloud. Include a sign-up
8page, login page, and a protected route that redirects unauthenticated
9users to /login. Store the user's display name on sign-up.
10
11## 2. CRUD resource
12Add a [resource, e.g. 'tasks'] table with fields: [field list]. Build a
13list page showing all [resource] for the logged-in user, a form to create
14a new one, and inline edit/delete on each row. Do not allow users to see
15other users' [resource].
16
17## 3. Payments (Stripe)
18Add a Stripe subscription checkout for a single [plan name] plan at
19$[price]/month. Use the native Stripe connector. On successful payment,
20mark the user's profile as 'subscribed' and unlock [feature]. Do not
21store any card details directly.
22
23## 4. Search and filtering
24Add a search bar above the [list name] list that filters by [field] as
25the user types, plus a dropdown to filter by [category field]. Combine
26both filters (AND logic), and show a 'no results' state.
27
28## 5. File upload
29Add an image upload field to the [form name] form using Lovable Cloud
30storage. Show a preview thumbnail after upload and validate that only
31image files under 5MB are accepted.
32
33## 6. Email notification
34When a user submits [form/action], send them a confirmation email using
35the Resend connector (or Lovable Emails) with their [key detail] included.
36Do not send an email on edits, only on initial submission.
37
38## 7. Dashboard/analytics
39Add a dashboard page showing: total [metric 1], [metric 2] this month,
40and a simple line chart of [metric] over the last 30 days. Pull data from
41the existing [table name] table do not create new tables for this.
42
43## 8. Multi-step form
44Convert the [form name] form into a 3-step wizard: step 1 [fields], step
452 [fields], step 3 review and submit. Show a progress indicator and let
46users go back to a previous step without losing entered data.
47
48## 9. Role-based access
49Add an 'admin' role. Admins should see an extra [admin page name] page in
50the nav that regular users don't see, and should be able to [admin
51action]. Store the role on the profile and check it before rendering the
52admin nav item and before allowing the admin action.
53
54## 10. Bug fix (reproduction-first)
55When I [exact action], I expect [expected behavior], but instead
56[actual behavior] happens. This started after [recent change, if known].
57Investigate @[relevant file] first and explain the cause before fixing it.

Best practices to prevent this

  • Structure every prompt as: what to build, why it matters, and what must not change
  • Split multi-part requests into separate, sequential prompts
  • Use @file references once your project has more than a handful of components
  • Default to Plan Mode for anything touching your data model or multiple pages at once
  • Keep an up-to-date AGENTS.md or knowledge file instead of repeating context every session
  • Write bug-fix prompts as a reproduction (action → expected → actual), not just 'fix this'

Still stuck?

Copy one of these prompts to get a personalized, step-by-step explanation.

ChatGPT Prompt

I want to add this feature to my Lovable.dev project: [describe the feature]. Help me write a well-scoped Lovable prompt using this structure: what to build, why it matters or how it fits the app, and any constraints (what must not change). Keep it to 3-5 sentences and make it specific enough that an AI builder couldn't misinterpret it.

Lovable Prompt

Before building anything, review my current project structure and tell me which existing components or database tables would be affected if I asked you to [describe planned feature]. List anything I should mention as a constraint in my next prompt to avoid unwanted side effects.

Frequently asked questions

How do I prompt Lovable to get better results?

Scope each prompt to one feature, describe what you want plus why it matters plus any constraints, and use @file references for precision in larger projects. For anything complex or risky, switch to Plan Mode first so Lovable proposes an approach before writing code.

What is the ideal structure for a Lovable prompt?

What to build, why it matters or how it connects to the rest of the app, and any constraints on what should stay unchanged. You don't need formal labels — just make sure all three pieces are present in plain language.

Are there example Lovable app prompts I can copy?

Yes — this guide includes 10 ready-to-adapt patterns covering authentication, CRUD resources, Stripe payments, search/filtering, file upload, email notifications, dashboards, multi-step forms, role-based access, and bug-fix prompts. Swap in your own field and feature names.

Should I write one long prompt or several short ones?

Several short, single-feature prompts almost always work better. A long prompt covering multiple unrelated changes makes it harder to isolate what went wrong if one part fails, and harder to review the diff for correctness.

What's the difference between Plan Mode prompting and a regular build prompt?

A regular prompt tells Lovable to build immediately. A Plan Mode prompt asks it to first explore the codebase and propose a structured plan for you to review before any code is written — better for complex, ambiguous, or high-risk changes.

Do we have ready-made prompts for specific project types like a CRM or booking platform?

Yes. Beyond the general patterns in this guide, we publish focused prompt sets for over 30 specific project types — CRM systems, booking platforms, marketplaces, support ticket systems, and more — with prompts sequenced in the order you'd actually build each feature.

How can I avoid wasting credits on bad prompts?

Scope prompts tightly, use Plan Mode before large or ambiguous changes, and write bug-fix prompts as a clear reproduction rather than a vague 'fix this.' If you're consistently burning credits on rework, it's often a sign the project needs a more experienced hand — RapidDev's engineers can review a project's prompt and commit history and tighten up the workflow going forward.

RapidDev

Talk to an Expert

Our team has built 1,000+ apps. Get personalized help with your issue.

Book a free consultation
Matt Graham

Written by

Matt Graham · CEO & Founder, RapidDev

1,000+ client projects delivered. Columbia University & Harvard Business School alumnus, U.S. Navy veteran. About the author →

Stuck on this for days?

Paste-and-pray debugging burns credits and weekends. Get a free 30-minute project audit — a senior engineer looks at your actual your platform project and tells you what's wrong, no strings attached.

Get a free project audit

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.