Guides
What Makes a Good Prompt for a Code Generator
Two thousand words on how to actually write prompts that produce shippable apps, not generic demos.
By Thomas — 2026-04-09, last updated 2026-04-09
The people who get great output from CONTENTFORGER write prompts that look nothing like the people who get mediocre output. The difference is not cleverness. It is structure.
Here is the structure that works.
Start with who it is for
Bad: build me a project management app.
Better: build a project management app for solo freelancers managing five to ten active clients.
Good: build a project management app for solo freelancers juggling five to ten active clients who need to track project status, log billable hours, and send invoices. The user logs in once a day to see what is due.
The user description shapes every decision the model makes about feature scope, complexity, and polish. A tool for solo freelancers looks very different from a tool for teams of fifty.
Name the core loop
Every app has one main thing the user does repeatedly. Identify it. State it explicitly.
For the freelancer tool above, the core loop is: open dashboard, see what is due today, mark items complete or log hours against them, close dashboard.
Stating this focuses the model on making that specific loop excellent. Secondary features become secondary. Primary features get the attention they deserve.
Specify the data model
This is where most prompts fail. The model will invent a data model if you do not provide one, and the invented model is usually overcomplicated.
For the freelancer tool: - Users have Clients. - Clients have Projects. - Projects have Tasks and TimeEntries. - TimeEntries and Tasks both belong to a Project. - Projects roll up to an Invoice when closed.
Ten lines of data model specification save you from rebuilding later.
Name the stack
Every AI generator has default stack choices. Sometimes those defaults fit your project. Often they do not. Be explicit.
Stack for this project: Next.js 15, TypeScript strict, Tailwind, Clerk auth, Supabase postgres, Stripe for invoicing, Resend for email.
This produces much cleaner output than letting the model guess.
State the non-negotiables
What must the generated app absolutely not do. List it.
Must not use dark navy backgrounds. Must not use react-icons. Must use next/image for all images. Must await params in all dynamic routes. Must validate env vars at startup.
These are the rules that catch the model's common failures. CONTENTFORGER bakes many of these in already, but stating them in your prompt adds belt and braces.
Describe the first page in detail
If you describe all fifteen pages at once, each page gets thin treatment. Describe the first page with care and let the rest be inferred from the pattern.
The home page for a logged-in user shows: a list of projects sorted by most recent activity, a prominent "log time" button, a sidebar showing today's tasks across all projects, and a header with current client count and hours logged this week.
That level of detail produces a well-thought-out home page. The model will apply the same care to subsequent pages if you ask it to maintain the pattern.
Leave space for defaults
This is the subtle one. Experienced prompters know what not to say.
Do not specify things you do not care about. Font choice, colour palette details, animation timing, loading state appearances. If you specify them, you are committing to decisions before you have seen the output. If you leave them blank, the model makes sensible defaults you can iterate on.
Lean prompts with clear priorities outperform thick prompts with everything specified.
The minimum viable prompt structure
For a weekend CONTENTFORGER project, the prompt should contain:
- One sentence on who uses this. - One sentence on the core loop. - A data model, ten lines or less. - A stack line. - A detailed description of the most important page. - A short list of non-negotiables.
That is it. Everything else flows from this. If your prompt fits on one screen, you are probably in the right zone.
What goes wrong with giant prompts
Counterintuitively, prompts that are too long produce worse output than prompts that are focused.
When you specify every detail of every page, the model dedicates equal attention to trivial concerns and critical ones. It fills every screen with the average amount of effort instead of concentrating effort where it matters.
When you specify the core loop clearly and leave the rest to inference, the model can allocate more attention to making the core loop excellent.
Quality comes from focus, not from volume.
Iteration after first generation
First output is never final. Plan to iterate.
First generation: does the data model match what I described. Does the main page show what I said to show. Does the auth flow work end to end.
If yes to all three, move on to polish. If no to any, correct that specific thing in the next prompt. Do not rewrite everything.
Second generation target: one specific fix. Not five.
Third generation target: another specific fix. Still not five.
This discipline is how serious CONTENTFORGER users ship weekend projects. One big generation plus three targeted iterations. Not ten broad regenerations.
The hardest part of prompt writing
The hardest part is not knowing what you want. Most people start prompting because they have a vague idea and hope the tool will help them discover the details.
It will not. The tool will produce whatever average thing fits the vague idea.
Before you open CONTENTFORGER, write the data model on paper. Write the core loop on paper. Name the user on paper. Only then open the tool.
This feels like extra work. It saves ten times the work later. Every experienced CONTENTFORGER user eventually adopts this pattern.
One final note
If a prompt is not working, stop blaming the tool. Read the prompt again as if you are the model. Is the user clear. Is the data model stated. Is the core loop named. Are the non-negotiables listed.
Ninety percent of bad output is bad prompt. The remaining ten percent is genuine model limitation. Focus on the ninety first.