What to Include in a Website Prompt for an AI Coding Agent
A clear prompt structure for giving Codex, Claude, or another coding agent enough product, design, and technical context to build a useful first version.
A strong website prompt gives an AI coding agent a goal, audience, content hierarchy, visual direction, technical constraints, assets, and a testable definition of done. It should explain what the page must communicate and how it should behave—not only ask for a particular aesthetic.
What are the essential parts of the prompt?
Begin with the user and the outcome. Then describe the page structure, the source of truth for copy and assets, the visual language, the framework or runtime, and the constraints that cannot be compromised.
Keep unknowns explicit. Ask the agent to flag missing information instead of filling gaps with made-up testimonials, metrics, customer logos, or product capabilities.
- Audience, context, and primary task
- Page sections and content hierarchy
- Visual system and interaction direction
- Routes, data sources, and technical boundaries
- Accessibility, performance, and responsive acceptance checks
How can a reference improve the prompt?
A reference gives the agent a shared visual anchor, but it should be annotated. Explain which parts show the desired hierarchy, pacing, or interaction and which parts are intentionally out of scope.
Use Peak Sitebook analyses as a starting point for this annotation. They identify what to inspect so your prompt can carry a decision rather than a vague mood.
What does done look like?
Define checks that can be verified in the browser: the main journey works, content is readable without motion, the layout works at mobile and desktop widths, links are real, and the page passes your typecheck, lint, and test commands.
Finish with a review request. Ask the agent to list assumptions, files changed, checks run, and any remaining risks so the next iteration starts with a reliable record.
Common questions
Should a website prompt specify a word count?
Specify the content and reading job instead of an arbitrary word count. Clear hierarchy and useful information matter more than filling a target length.
Which AI coding agent should I use?
Use the agent that fits your repository, deployment, and review workflow. The prompt structure is portable across tools; the quality of the inputs and review loop matter more than a brand name.
