Yesterday I built an entire web page with an AI coding agent. The About page. Layout, copy, images, the whole thing.
It took one pass. Most sections were right on the first try. I nudged some spacing, swapped a couple of images, adjusted a color or two, and it was done.
That is not how these sessions usually go. Most people who try to build with an AI agent end up in a wrestling match. The agent guesses. You correct it. It guesses again. An hour later you've typed more than you would have if you'd just built the thing yourself.
The first time I tried this, that was exactly me. I handed the agent a screenshot and a one-line prompt and hoped. I spent the next hour cleaning up after it.
This time was different. So I asked the agent a simple question. Why did this go so well? The answer was more useful than I expected, and it had almost nothing to do with the model being clever.
Here's the thing. A good AI build is decided before the agent writes a single line of code. It comes down to the context you hand it. Give it a clear, structured picture of what you want and where the truth lives, and it builds like it already knows your project. Give it a vague prompt and a screenshot, and you get a vague guess.
I believe most "AI can't really build anything useful" frustration is a context problem wearing a model costume. The agent isn't failing because it's dumb. It's failing because we hand it a sentence and a vibe and expect a finished page.
Now, I don't think this means you need to be a developer to pull this off. You don't. What you need is a way to hand the agent the same things a good new hire would need on their first day. That's the whole game.
Think of the agent as a new hire on day one
Picture bringing someone talented onto your team. They're capable and they're fast. But they've never seen your project, your house style, or your brand.
Sit them down with no documentation, no examples, and a one-line task, and they'll produce something. It just won't be what you wanted, because they had to invent every part you didn't give them.
Hand that same person a style guide, a finished page to copy the patterns from, and access to the real files, and they fit right in. An AI agent is no different. Everything below is just how you onboard it well.
Give it a contract, not a vibe
The single biggest reason my build went well was one document the agent reads first. In Claude Code that file is called CLAUDE.md. Other tools have their own version. Think of it as the project contract.
Mine wasn't just "here's the tech stack." It listed every component with its options, the rules for spacing and color, the system for making things responsive, and a list of things to never do.
That last part matters more than it sounds. An anti-patterns list tells the agent what wrong looks like, so it stops before the mistake instead of after.
With that in hand, the agent stops guessing and starts composing from a known vocabulary. It already knows the parts you've built and how they fit together. Most of my "right the first time" sections traced straight back to that one file.
Keep it current. A stale contract is worse than none, because the agent will trust it anyway.
Start with a design system, not a blank canvas
The contract only works if there's something real behind it. Before any of this, your starter project needs a design system. Utility classes for spacing, color, and layout. A set of components the agent can pull from instead of building each piece from scratch.
This is the difference between guardrails and a blank canvas. When the agent has a solid set of components and utility classes, and you tell it to stick close to them, it builds from what you already have instead of writing new CSS and inventing new pieces inside your project. Less new code means fewer surprises, fewer inconsistencies, and less to clean up later.
The stronger your design system, the better your components, the tighter those guardrails get. And tight guardrails are how you get great results every time, not just once.
Point at a page you've already built
Documentation tells the agent the rules. A finished page shows it the rules in action.
A real, polished page already existed in my project, so the agent had a working example for tone, structure, and the reusable pieces it should grab instead of building from scratch. It matched my style instead of inventing its own.
"Match how this existing page is built" is one sentence. It's worth a paragraph of instructions.
Hand over the source of truth, not a description of it
This is the part that saves you the most rework.
When you describe your content to an agent, it fills the gaps with guesses. When you connect it to the real source, it reads facts.
In my build, the agent pulled the exact copy, the team data, and the section structure straight from the live source through a connector. Almost nothing about the content was invented. So almost nothing about the content needed fixing.
The lesson is simple. Every gap you leave is a guess, and every guess is a correction you'll make later. Close the gaps up front by giving the agent the real thing.
Tell it which source wins for what
This was the most valuable sentence in the whole build, and it was one line: "the design is identical to another site we built, only the colors are different, so pull the copy, images, and colors from the live site." (In this instance, I was rebuilding a website that I had already built in the past to move it from a platform builder to custom code.)
That sentence told the agent exactly which source to trust for what. The design file was the layout. The live site was the content and the color. So when the design file showed one color and the live site showed another, the agent knew which one to use.
Without that line, it would have built the entire page in the wrong brand color, and I'd have spent the afternoon undoing it.
When you have more than one source, don't make the agent guess the hierarchy. Spell it out. Design file for layout. Live site for content. Your CMS for data. One sentence each.
Give feedback like a surgeon, not a critic
The few corrections I made were specific. "This section is text only, no images." "Use the dark theme here." "Use this exact photo for the founder."
Each one mapped to a single, safe change. The agent knew precisely what to do.
Compare that to "this feels off" or "make it pop." Vague feedback forces the agent to guess again, and you're back in the wrestling match. Tell it the exact thing in the exact place.
What to give your agent (the checklist)
Before you ask an agent to build anything, hand it these:
- The goal in one line. "Build the About page."
- Composition rules. Use the existing components, keep new code minimal, reuse before you invent.
- The design source, section by section, each with a short note on what you want done with it. Ideally, you will copy the link to the Figma file for that section. If you don't have a Figma file, then take a screenshot of each section and provide that.
- The content and color source, plus which source wins for what.
- Where your real data lives, so the agent wires it up instead of hard-coding it. If you're using a CMS, make sure to tell the agent ahead of time to create the content in that CMS instead of directly in the project.
- Specific feedback on each pass, never "this feels off."
A prompt you can copy
Here's a template you can fill in and paste. It bakes in everything above.
Build out the [PAGE NAME] page. Use the components from this project wherever
possible, and use the utility classes. Keep new code minimal, reuse what we
already have, and use our responsive system for breakpoints. Some sections may
need new markup, and that is fine, but build from existing components first.
Match how [REFERENCE PAGE] is built.
Important context: this design was originally built for [OTHER BRAND]. The
layout is identical and only the colors differ. So:
- Design file = the layout.
- The live site = the source for all copy, images, and colors.
Pull the colors from the live site (they should already be in the project) and
pull the copy and images from there too. Check the live site at multiple screen
sizes, because some sections stack or hide differently on mobile.
[DATA NOTE, if any]: e.g. "Team members come from our CMS, pull them from there."
Design, section by section:
- [section]: [link] (what to do, e.g. "make this a reusable component")
- [section]: [link] (e.g. "check the expanded state at all screen sizes")
Live site (copy, images, colors): [URL] Fill in the brackets, paste it, and watch how much less you have to correct.
Quick aside before the technical part. This systems-first approach is exactly how we build client sites at CL Creative. If you'd rather hand your next site to a team that already works this way, you can book a strategy session and we'll map out what your project actually needs.
Let the agent reach your sources
There are two different ways an agent touches the outside world, and they're governed separately. Reading through a connected tool, like your design file or your CMS, usually works out of the box. But when the agent's own workspace needs to reach the internet directly, to download an actual image file or run a build that pulls your data, that's a different door, and it's often locked by default.
In my case the agent could read everything but couldn't download the image files, so we needed a workaround. The fix was simple once I knew where to look. Add your real sources to the allowed list in your environment's network settings, and the agent can grab them directly. If you're using Claude, here's how you would do this: Configure your environment.
If a build stalls on something that should be easy, this is the first place to check. The agent can see your sources but can't reach out and pull the files. Open that door and the next build goes smoother.
Your tools are only as good as the context you give them
None of this is about a smarter model. It's about respect for where the agent starts. The build that went right the first time went right because the context was already there before I typed a word.
Document your system. Point at a finished example. Hand over the real source of truth, and say which source wins. Do that, and most builds will feel like the good one instead of the wrestling match.
So here's my question. Are you handing your agent a contract, or a vibe?
Want a website built on a system instead of held together with guesswork?
The same systems-first thinking that makes an AI build go smoothly is how we build every client site at CL Creative. A clear system, real sources, and reusable components are what let us build fast without breaking things.
Want a website built on a system, not guesswork?
Send me a message and tell me about your project. I'll come back with a clear picture of what your site needs to do and a rough budget range, whether you hire me or not.
Questions You Might Be Asking
No. You need to know what you want and where the real information lives. The agent handles the code. Your job is to hand it a clear goal, a finished example to match, and the true source for your content and design. The clearer that handoff, the less technical the work feels.
A project document that describes your components, your rules, and the things it should never do. This is the file the agent reads first, and it does most of the heavy lifting. It turns the agent from something that guesses into something that builds from a known set of parts.
Almost always because it doesn't have your real source of truth. When you describe your content instead of connecting the agent to it, the agent fills every gap with a guess. Connect it to the live site, the design file, or the CMS, and the guessing mostly stops.
It helps. Connectors let the agent read your real design and content directly instead of working from a description. You can still get good results by pasting in exact copy and links, but the more direct access the agent has to the source, the less it has to invent.
Once your context is set up, yes, and by a lot. The first build takes longer because you're writing the project document and wiring up your sources. After that, every page reuses the same foundation, and builds that used to take a day start taking an hour.