4.0Guide
Build a website with AI coding agents: the practical guide
How to build your own site with a coding agent on an Astronomic theme or the free kit: pick a start, brief the agent, make a change, review it and ship.

On this page8 sections
A coding agent is a tool that reads your project, edits its files and runs commands when you ask in plain language. Running your own site with one can lower your costs and gives you full control. Start from an Astronomic theme or our free kit, so the agent has a working site and written rules from the first request, then ask for one change at a time and check each one before it goes live.
What does a coding agent do?
A chat window answers with text that you copy into your project yourself. A coding agent works in the project. It reads your code, edits files and runs commands, such as the build, the step that turns your project into the files a browser loads. So it can make a change, run the build, read the error and try again.
Claude Code, Codex, Cursor and Copilot are all coding agents. Claude Code is our worked example here. It runs in a terminal, the text window where you type commands, and also in code editors, a desktop app and the browser. Most ways of using it need a paid plan or a developer account.
The steps below repeat for every change, and a failed check never goes live:
Once
1. Pick a theme or kit
2. Set up the project
Every change
3. Ask for one change
4. Review the result
5. Ship the site
The next change starts again at step 3.
Step 1: Pick a theme or the free kit
Start from a site that already works. The agent then has real pages and conventions to work from, and you spend your requests changing a site instead of describing one. The Astro docs give the same advice: ask AI tools to start with an existing template.
| Your site | Start from | Type |
|---|---|---|
| A personal blog and portfolio | Vesper | Free theme |
| A product, app or open-source project, or pages of your own | Starter | Free kit |
| A newsletter with public, members and paid stories | Dispatch | Paid theme |
| A firm that sells expert services | Lodestar | Paid theme |
| A design studio or creative agency | Apogee | Paid theme |
| A small real estate agency, with a map | Vega | Paid theme |
Pick a theme if it fits your kind of site. The pages, content types and look are already there, so most of your requests will replace content and adjust settings. Open its demo from the theme page and check that it has the pages you need.
Pick the free kit if no theme fits, or you want to build your own pages. Astronomic UI is our set of Astro parts, such as heroes, feature grids, forms and footers, and its free parts are the kit. It isn’t a package you can install on its own yet, so you get it through the Starter: a small working site made from those parts, which you then change. Browse the parts to see what you and your agent can use.
Step 2: Set up the project
You need Node.js 22.18 or later, pnpm and Git. Node.js runs the project’s tools, pnpm installs its packages, and Git tracks its changes.
Each product’s install guide has the exact commands: Vesper, Starter, Dispatch, Lodestar, Apogee and Vega. For a paid theme, you first accept the GitHub invite you get after you buy, then clone the code into a repository of your own. A repository is a project’s folder and its Git history. Don’t fork a paid theme, because a fork of a private repository is deleted when your access ends.
Then install the packages and run the site, from the project’s top folder:
cd my-site
pnpm install
pnpm dev
Open the address that Astro prints, usually http://localhost:4321. In a second terminal window, in the same folder, start the agent:
claude
Your agent starts with more than the code:
| What’s in the project | What it gives the agent | Where |
|---|---|---|
AGENTS.md |
The commands, a folder map, rules to keep and how to check its work | Every theme and the Starter |
| Setup check | A build that stops on a broken setting or leftover placeholder, and lists each one | Vesper, Lodestar, Apogee, Vega |
packages/ui |
The kit’s parts and design tokens, as code it can read | Every theme and the Starter |
/system page |
A page in pnpm dev that shows the design system, for you to look at |
Every theme and the Starter |
Design tokens are the named values for color, type and spacing that the parts use. The AGENTS.md tells the agent to style with them instead of hard-coding colors.
Before you ask for a change, check that the agent has read the file:
Read AGENTS.md. Tell me which commands check your work and which
file sets the site's look. Do not change anything yet.
AGENTS.md is a plain text file, and many agents read it when they start. Claude Code reads it when the project has no CLAUDE.md. Our article AGENTS.md vs CLAUDE.md covers which tool reads which file. Add your own rules to it as you go, such as your site’s tone or pages the agent should leave alone.
Astro’s docs also warn that agents may use older APIs. Its free docs server gives them the current docs, through MCP, a standard way to connect an AI tool to outside information. In Claude Code, you add it with this command:
claude mcp add --transport http astro-docs https://mcp.docs.astro.build/mcp
Step 3: Ask for one change
First, save a checkpoint. A commit is a saved snapshot of your project in Git.
git add -A
git commit -m "Before the new look"
Then make one specific request. A vague one leaves the agent to choose the scope and what “finished” means:
Make my home page better.
A specific one names the task, the limits and the check. Changing the look makes a good first request, because it touches little and you can see the result at once. On Vesper:
In src/theme.config.ts, set the look to "field" and the accent to "moss".
Change nothing else. Then run pnpm check and pnpm build and show me the output.
On the Starter:
In src/styles/global.css, uncomment the line for the soft look.
Change nothing else. Then run pnpm check and pnpm build and show me the output.
We ran both changes on the current code, and both builds passed. On another theme, use the file the agent named in Step 2.
If you dislike the result, this discards everything since your last commit, new files included:
git restore .
git clean -fd
For larger work, ask for a plan first, and read it before the agent edits anything. Claude Code has a plan mode for this: press Shift+Tab, or start your request with /plan.
When you add a section on the Starter, say so in your request: “Use the kit’s parts. Don’t write a new component for something a part already does.” Its AGENTS.md has the same rule.
Step 4: Review the result
A message that says “done” is not a check. Claude Code’s own best practices put it plainly: “Claude stops when the work looks done.” Run these checks yourself:
- List the changed files. Run
git status. Did the agent touch anything you didn’t ask for? - Read the diff. A diff shows the lines that were added and removed. Run
git diff, and open any new files too, becausegit diffleaves them out. Look for new packages, keys or passwords, invented facts and leftover placeholder text. - Run the checks. Run
pnpm check, which checks the code’s types, andpnpm build. Each one passes or fails. - Open the page. With
pnpm devrunning, look at the changed pages in light and dark mode and at phone width. Click the links and forms. - Get a second opinion on bigger changes. Ask a fresh session that didn’t write the code. In Claude Code,
/code-reviewdoes this in the terminal.
If a check fails, send the error back to the agent and review again. When a change passes, commit it.
Step 5: Ship the site
To deploy is to put your site online. Before the first deploy, replace the demo’s details with your own.
If your theme has a setup check, turn it into your to-do list. The demo allows its placeholders through a setting, sampleContent, in content/site.json. Turn that off and the build stops and lists what’s left. This is the start of the list from Vesper:
Vesper setup: 9 problem(s).
Placeholders to replace (allowed only while sampleContent is on, as in the demo):
- newsletterAction: https://newsletter.example/rowan/subscribe
- socials[0] (Instagram): https://instagram.example/rowanellery
Hand that list to the agent:
Turn off sampleContent in content/site.json and run pnpm build.
For each problem it lists, ask me for the real value. Do not invent any.
The Starter and Dispatch have no setup check, so search the site for demo text yourself, and check where each form posts. The Starter’s content guide lists what to replace.
Then put the site online. Each product’s deploy guide covers Cloudflare Workers Builds: see Vesper’s or the Starter’s, and the same page in your theme’s docs. In short:
- Set your site’s public address, with the
SITE_URLvariable or thesiteline inastro.config.mjs. The feed and sitemap use it. - Add the
wrangler.jsoncfile from the guide. - Push your repository to GitHub.
- In the Cloudflare dashboard, create a Worker from that repository, with
pnpm buildas the build command.
To use another host, Astro has deploy guides for Netlify, Vercel, GitHub Pages and more.
From then on, each new commit you push to the main branch rebuilds and republishes the site:
git push
Tell the agent not to push until you have reviewed the change.
Once the site is live, check the real address, the home page on a phone and any forms. If something is wrong, this undoes your last commit and publishes the fix:
git revert --no-edit HEAD
git push
Common mistakes
Asking for the whole site in one request. The result is too large to review. Split it up.
Taking “done” at face value. Ask for the command the agent ran and its output, then run the checks in Step 4.
Turning off the setup check. When a build stops, an agent may try to get around the check. Tell it to fix the setting. The theme’s AGENTS.md says the same.
Letting the agent invent facts. Privacy pages, customer quotes and reader counts need your real details. Give the agent the facts, or have it leave the marker in place.
Vibe coding a site people rely on. Andrej Karpathy coined the term for a way of working where you “forget that the code even exists.” It’s a good way to try an idea. You don’t need to read every line of a real site, but you do need to check the result.
Pasting API keys into chat or code. A key is a password for a service. Once it’s committed, it’s in your repository’s history. Keep keys in your host’s settings.
Following old guides. Check the date on any guide, and compare its Astro version with yours. For your own site, trust your theme’s docs and AGENTS.md first.
What to do next
Compare the themes, or browse the free kit’s parts. Then follow the install guide for the one you pick, and read AGENTS.md vs CLAUDE.md when you are ready to add your own rules.




