12 Prompt Patterns for Building Apps with AI
Good prompts for app building are not clever wording. They are a handful of reusable shapes. Here are twelve, each with a template you can paste and adapt.

Key takeaways
- Most strong app-building prompts reuse a few shapes: a fence around what must not change, a list of states, the data before the screen, and a check that proves it works.
- Keep a personal library of these templates and fill in the blanks instead of writing every request from scratch.
- Patterns that ask the agent to look before it acts (questions first, read-only audits, explain then fix) prevent the most expensive mistakes.
The prompt patterns that work best for building apps with AI are reusable templates for recurring situations: adding a feature without breaking others, describing every state of a screen, defining data before UI, and asking for proof that a change works. Below are twelve, each with the situation it solves and a template you can paste into Startbase and fill in.
This is a companion to our guide on describing an app so the AI builds it right, which covers the first brief and the iteration rhythm. Here the focus is the second week of a project, when you are adding, changing and fixing, and the same shapes come up again and again.
Patterns for before you build
1. Questions first
Use it when you know the goal but not the details. The agent surfaces decisions you had not thought about, and you answer them before any code exists. Startbase also has this built in: switch the composer to Plan and the agent asks its questions as cards you tap.
I want to add team accounts so several people can share one workspace in this app. Before you change anything, ask me every question you need to understand how invites, roles and billing should work. Do not write code yet.
2. Data before screens
Use it for any feature that stores something. Naming the records and their fields first produces a cleaner database and fewer migrations later. List each thing, its fields, and who can see or change it.
“Before building the screens: we need Projects (name, client, due date, status: active, paused or done) and Tasks (title, project, assignee, done yes or no). Members see only projects they are on. Only the owner can delete a project. Set up the tables and access rules, then build the list screen.”
3. Reference plus delta
Use it when an existing product is close to what you want. Name it, then say exactly what is different. The difference is the part the agent cannot guess. Attach a screenshot when you can; the agent sees images you add with the + button.
“Make the pricing page work like a typical SaaS pricing table with three tiers, but with a monthly and yearly switch that shows the yearly price as a per-month figure, and no feature comparison grid below it.”
Patterns for changing a working app
4. The fence
Use it whenever a change sits near something that already works. Say what must not change, by name. This is the single most useful habit for avoiding regressions, and it costs one sentence.
“Add a search bar to the recipes page. Do not change the recipe card design, the navigation or the filters on the left.”
5. The state table
Use it for any screen that loads data. Agents build the happy path by default. Listing the other states gets them built too: empty, loading, error, and the edge case specific to your app.
“For the orders screen, handle: no orders yet (friendly message and a button to browse products), loading (skeleton rows), failed to load (short message and Retry), and an order with 40 items (scroll inside the card, not the page).”
6. Per-role walkthrough
Use it when the app has more than one kind of user. Describe what each role sees on the same screen. It catches permission gaps that a single description hides.
“On the booking page: a guest sees open slots and a sign-in prompt. A signed-in client sees open slots and their own bookings. Staff see every booking with the client's name and phone. Admins also see a Block time button.”
7. Point, then say
Use it for small visual fixes. Instead of describing where an element is, select it in the preview with Visual edit and use Edit Element, which sends the exact element to the agent. For text, edit it in place and skip the agent entirely.
Patterns for proof and quality
8. Acceptance check
Use it for anything with logic. End the request with how you will know it works. The Startbase agent already opens the app in a browser and can fill forms and tap buttons before it finishes, so giving it the exact scenario makes that check meaningful.
“Done means: I can add a 15 percent discount code, apply it at checkout, see the total drop by 15 percent, and the same code fails the second time for the same account.”
9. Real content
Use it for any page people will read. Paste your actual headline, product names and prices. Real copy changes layout decisions: a two-line headline, a long product name, a price with cents. Placeholder text hides all of that until launch week.
10. Critical-area caution
Use it before touching sign-in, payments or anything that deletes data. Prepend a short instruction to slow the agent down.
“The next change touches authentication. Read all related code first, change only what this task needs, explain your plan before editing if anything is unclear, and check that existing email sign-in still works afterwards. Task: add Google sign-in.”
Patterns for when things go wrong
11. Read-only audit
Use it when the project feels tangled or slow. Ask for a report, not changes. In Plan mode file edits are blocked, so this is safe by design; in Build mode, say it explicitly.
“Review the whole project and list: duplicated components, logic in the wrong place, and anything that loads data more than once per page. Rank by impact. Do not change any code.”
12. Explain, then fix
Use it when the same bug has come back. Ask for the cause in plain words and for what has already been tried, then decide on the fix together. Patching a symptom twice is the signal to stop and use this pattern. Our guide to fixing bugs with AI goes further.
Turn the patterns into a library
The point of patterns is reuse. Three places to keep them so you stop retyping:
- Project knowledge. Rules that should hold for every turn in one project (the fence around your checkout flow, the brand voice, the roles) go in Knowledge from the project menu. The agent reads it at the start of every turn.
- Global instructions. Habits you want in every project, such as “always handle empty and error states”, go in Settings, Knowledge.
- A text file of your own. Templates 2, 5, 6 and 8 with blanks, ready to paste.
For a complete walkthrough of the tools these patterns lean on, the Startbase docs cover prompting best practices and Plan mode.
Frequently asked questions
What is the best prompt structure for building an app with AI?
There is no single structure. Match the shape to the situation: questions first when the details are unclear, data before screens for anything stored, a fence when changing something near working code, and an acceptance check for anything with logic.
Should I write one long prompt with every feature?
No. One feature per message, checked in the preview before the next, produces better results and uses less work per change than a long list of requests in one message.
How do I stop the AI from changing things I did not ask for?
Name what must not change in the request itself, and put lasting rules in project knowledge so the agent reads them on every turn. If a change still spills over, Undo on the turn receipt rolls the project back to before that turn.

