{"slug": "building-a-real-website-with-claude-code-agents-md-templates-and-a-form-that", "title": "Building a real website with Claude Code: AGENTS.md, templates and a form that works", "summary": "A developer documented a workflow for building static sites with Claude Code that starts from a template repository rather than a blank folder, relying on an AGENTS.md file to encode conventions and known traps. The writeup details silent failures found while building the BootForm templates, including router-link components rendering as empty comments, absolute links that 404 on GitHub Pages subpaths, and Tailwind classes losing to unlayered CSS resets, plus a /bootform:add-contact-form command that creates a working form ID after a browser sign-in. Claude Code reads AGENTS.md automatically only when no CLAUDE.md exists in the working directory or above it, requiring v2.1.277 or later.", "body_md": "**In short:** start Claude Code from a template repository instead of a blank folder, keep the template's rules in an `AGENTS.md` file that Claude Code reads on its own, and give the contact form a real form ID as a separate step. The free BootForm templates ship with their form pointing at a placeholder, so it receives nothing until you replace it. One command, `/bootform:add-contact-form`, creates the form after a single browser sign-in (no API key) and puts its ID in the page.\n\nAsk Claude Code for \"a portfolio site\" in an empty folder and you get one. It builds, it looks fine on `npm run dev`, and it is wrong in ways nobody sees until it's live: links that 404 once it is deployed, styles that quietly lose to the framework's own, and a contact form that posts to nowhere. This post shows the setup that avoids all three, using a real portfolio as the example.\n\nThree things go wrong, and none of them shows up as an error.\n\n**The output drifts.** A site generated from scratch comes out different on every run, so there is nothing to test against and no way to fix a mistake once for good. Ask twice, get two sites.\n\n**Framework defaults win.** VitePress, for example, assumes you are writing documentation. Leave a page on its default `layout: doc` and your landing page gets a docs sidebar and a table of contents. An agent that doesn't know this produces a docs site wearing a marketing headline.\n\n**The failures are silent.** A few real ones, all found while building the BootForm templates:\n\n`<router-link>` wrapping a heading and a paragraph rendered as an empty `<!---->` comment in the built HTML: no content, no error, no build warning.`<a href=\"https://dev.to/work/\">` works in `npm run dev` and 404s on GitHub Pages, because a project site is served from a subpath and the dev server never uses it.`border-gray-300` on an input can lose to an unlayered CSS reset and render as if it weren't there.\nAnd then the form. A static site has no server, so there is nowhere for a form to send anything. Left alone, an agent writes `action=\"/contact\"` or an address it made up, and every message is lost.\n\nAn agent can't learn these from one run. They have to be written down where it will read them every time, and that is what `AGENTS.md` is for.\n\n**`AGENTS.md` is a plain markdown file at the root of a repository that tells a coding agent how to work in that repository: its conventions, its traps, and what not to touch.** It is the same idea as a README, written for the agent instead of the visitor.\n\n**Claude Code reads it on its own**, as long as the repository has no `CLAUDE.md`. From the [Claude Code memory docs](https://code.claude.com/docs/en/memory): \"By default, Claude reads `AGENTS.md` only when you have no `CLAUDE.md` in your working directory or above it.\" Reading it directly needs Claude Code v2.1.277 or later.\n\n| Your repository has | What Claude Code reads | \n|---|---|\n| `AGENTS.md` , no`CLAUDE.md` | `AGENTS.md` | \n| `AGENTS.md` and a`CLAUDE.md` | only `CLAUDE.md` , unless it imports`AGENTS.md` | \n| `CLAUDE.md` with an`@AGENTS.md` line | `AGENTS.md` first, then the rest of`CLAUDE.md` | \n\nIf you already keep a `CLAUDE.md`, add one line at the top of it so both files count:\n\n```\n@AGENTS.md\n\n## Claude Code only\n\nAnything that applies to Claude Code alone goes below the import.\n```\n\nThe BootForm templates ship an `AGENTS.md` and no `CLAUDE.md`, so they work in Claude Code (and in other coding agents) without any of this.\n\nThe rules worth writing are the ones an agent would break without noticing. A good entry says what to do, why, and how the rule was confirmed, so the agent doesn't \"fix\" it later. A few lines from the `vitepress-portfolio` template's `AGENTS.md`, shortened:\n\n```\n**Every page needs `layout: home` or `layout: page` in its frontmatter.\nNever leave a marketing page on VitePress's default `layout: doc`.**\n\n**`<router-link>` looked like the right tool for a card wrapping block-level\ncontent and isn't.** ... rendered as empty `<!---->` comment placeholders in the\nbuilt HTML, no visible content, no error, no build warning. Use `withBase()`\ndirectly, and verify by grepping the built `dist/` HTML for the real `href`.\n\n**Adding a new case study means adding one `.md` file under `docs/work/` with\n`title`, `description`, `image` and `order` frontmatter, and nothing else.**\n```\n\nNotice what is not there: no generic advice like \"write clean code\". Every line is a fact about this repository that cost someone an afternoon once.\n\n**A site template is a finished, working site in a repository you copy and change.** It turns \"build me a site\" into \"change this working site\", which an agent does far more reliably. The BootForm templates are free (MIT) and each one carries its own `AGENTS.md`:\n\n| Template | You get | \n|---|---|\n| [vitepress-marketing](https://github.com/BootForm/vitepress-marketing) | A company or product site: home page, pricing, blog | \n| [vitepress-portfolio](https://github.com/BootForm/vitepress-portfolio) | Case studies in a generated grid and a hire-me contact page | \n| [vitepress-blog](https://github.com/BootForm/vitepress-blog) | A post list, tags, RSS, authors and search | \n| [vitepress-villa](https://github.com/BootForm/vitepress-villa) | Rooms, a gallery, a local guide and a booking enquiry form | \n\nEach one has a finished contact form in the page, with every field, the styling and the spam trap in place. **What it doesn't have is a form ID.** The form's `action` is `https://f.bootform.com/__YOUR_FORM_ID__`, a placeholder, so it receives nothing yet. That is on purpose: a BootForm form ID works as the claim to the form, so a real ID printed in a public template would send every copy's messages to whoever claimed it first. You add your own ID as a step, covered below.\n\nThis builds a portfolio from `vitepress-portfolio` and ends with a contact form that delivers to your inbox. You need Claude Code, Node.js 20 or later, and the GitHub CLI (`gh`) signed in, since the first step creates a repository for you.\n\n[site-skills](https://github.com/BootForm/site-skills) is a Claude Code plugin marketplace with two plugins: `vitepress`, which starts and grows a site from the templates, and `bootform`, which makes the form work. In Claude Code:\n\n```\n/plugin marketplace add BootForm/site-skills\n/plugin install vitepress@site-skills\n/plugin install bootform@site-skills\n```\n\nThe skills are thin on purpose. They don't generate a site; they know which template to start from and tell Claude to read that template's `AGENTS.md` before changing anything.\n\n```\n/vitepress:portfolio-site my name is Maya, I'm a product designer in Portland\n```\n\nClaude creates your repository from the template (`gh repo create ... --template BootForm/vitepress-portfolio`), reads its `AGENTS.md`, then puts your name, nav and brand colour in and replaces the example case studies with yours. Each case study is one markdown file, and the home page and the Work page both pick it up without another edit.\n\nDescribe what you want, or use a command:\n\n```\n/vitepress:add-section     a three-tier pricing section on the home page\n/vitepress:add-collection  books, with the author and year on each card\n/vitepress:theme           make it dark green, with a serif font for headings\n/vitepress:icons           my Instagram and LinkedIn in the header\n```\n\nSections come from [site-sections](https://bootform.github.io/site-sections/), written to survive VitePress's own styles; `theme` checks the contrast of the colour you pick.\n\nAt this point the contact page looks finished and still loses every message, because its `action` holds `__YOUR_FORM_ID__`. Run:\n\n```\n/bootform:add-contact-form\n```\n\nThis is the step that turns the template's form into one that works:\n\n**MCP (Model Context Protocol) is the standard way an AI agent connects to an outside service's tools.** Here it lets Claude Code create and configure forms in your BootForm account.\n\n`/mcp`, pick `action`, keeping the hidden spam-trap field as it is.\nWe sent exactly this message from a copy of the template while writing this post. It arrived in the form's BootForm inbox a few seconds later.\n\nBefore you trust it:\n\n`npm run build`, and check `__YOUR_FORM_ID__` no longer appears anywhere under `docs/`;\nThen push. The template's GitHub Actions workflow builds and deploys to GitHub Pages once you set **Settings, Pages, Source** to **GitHub Actions**. If you name the repository something other than `vitepress-portfolio`, change `base` in `docs/.vitepress/config.mts` to match, or the deployed site comes out unstyled.\n\nThe plugin is the shortest path, not the only one. Every way ends with the same thing: your own form ID in the form's `action`.\n\n|  | With the `bootform` plugin | By hand, from the template's README | From the dashboard | \n|---|---|---|---|\n| **How** | `/bootform:add-contact-form` | Generate a random UUID, paste it in, send a test, claim it | Create a form at app.bootform.com and copy its ID | \n| **Account** | Signed in once in the browser | Only when you claim it | Yes | \n| **API key** | No | No | No | \n| **Where messages go** | Set up in the same step | Set when you claim it | Set in the dashboard | \n| **Watch out for** | Run it before the site goes live | Use a fresh random ID, never one printed in a doc; unclaimed messages are held 48 hours | Nothing extra | \n\nThe by-hand way is in each template's README (step 3): BootForm's [UUID generator](https://bootform.com/uuidgenerator) gives you an ID, the form works straight away, and you claim it with a free account to start receiving what was sent. It suits anyone using another agent or no agent at all.\n\nThe templates don't depend on it. `AGENTS.md` is a plain file any coding agent can read, and every skill's steps are readable markdown in the [site-skills repository](https://github.com/BootForm/site-skills), so you can follow them by hand. BootForm's [MCP server](https://bootform.com/mcp) also works with Cursor, VS Code, ChatGPT and other MCP clients, with the same browser sign-in.\n\nYes, from v2.1.277, when the repository has no `CLAUDE.md` in the working directory or above it. If it does have one, put an `@AGENTS.md` line in that `CLAUDE.md` and Claude reads `AGENTS.md` first, then the rest.\n\nThey come with a finished form whose `action` points at a placeholder, `https://f.bootform.com/__YOUR_FORM_ID__`, so it receives nothing until you put your own form ID there. `/bootform:add-contact-form` does that for you, or you can paste an ID in by hand.\n\nNo. The MCP server doesn't take API keys. You sign in to BootForm in the browser once and click Allow, and you can disconnect it any time under Settings, Connected Apps.\n\nThe templates and plugins are free (MIT). GitHub Pages hosts a public repository's site for free. BootForm's free plan includes 250 submissions a month for the whole account, with unlimited forms and email delivery. Claude Code itself needs a Claude plan.\n\nYes. `/bootform:add-contact-form` works on any site, not just VitePress: Astro, Hugo, Jekyll, Next.js or plain HTML. The [framework guides](https://bootform.com/docs/framework-vanilla-js) show the same form by hand.\n\nThe rules an agent would break without noticing: the framework default you've turned off, the link or base-path trap, the file that must not be edited, how to add one more item. Say why, and how you confirmed it. Leave out anything a competent developer would do anyway.\n\n*I build BootForm, the form backend used in this post. I wrote this article with help from AI (Claude) and checked every step and claim against the product myself. It first appeared on the [BootForm blog](https://bootform.com/blog/claude-code-website-agents-md-templates).*", "url": "https://wpnews.pro/news/building-a-real-website-with-claude-code-agents-md-templates-and-a-form-that", "canonical_source": "https://dev.to/menelaos_vergis_045957e7a/building-a-real-website-with-claude-code-agentsmd-templates-and-a-form-that-works-9di", "published_at": "2026-12-04 09:07:36+00:00", "updated_at": "2026-12-04 09:15:10.535589+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents"], "entities": ["Claude Code", "Anthropic", "BootForm", "VitePress", "GitHub Pages", "Tailwind"], "also_reported_by": [], "takeaway": "Starting Claude Code from a template repo with an AGENTS.md that records each silent failure (router-link rendering empty comments, absolute hrefs 404ing on GitHub Pages subpaths, Tailwind classes losing to unlayered resets) makes generated sites reproducible and testable.", "recommendation": {"advice": "Put an AGENTS.md at the repo root listing conventions and traps with why and how each was confirmed, and add @AGENTS.md to any existing CLAUDE.md so Claude Code reads both.", "playbook": "coding-agents", "playbook_url": "https://wpnews.pro/playbooks/coding-agents"}, "alternates": {"html": "https://wpnews.pro/news/building-a-real-website-with-claude-code-agents-md-templates-and-a-form-that", "markdown": "https://wpnews.pro/news/building-a-real-website-with-claude-code-agents-md-templates-and-a-form-that.md", "text": "https://wpnews.pro/news/building-a-real-website-with-claude-code-agents-md-templates-and-a-form-that.txt", "jsonld": "https://wpnews.pro/news/building-a-real-website-with-claude-code-agents-md-templates-and-a-form-that.jsonld"}}