Skip to content
Climb Google Maps: Google Business Profile optimization.

AutomationGuide

How to Build a Website With Claude: A Step by Step Setup for Fable 5.2 and Opus 5.5

Claude Fable 5.2 arrived on Nov. 9. This is the setup we would give anyone who wants to build a real website with Claude Code: where to run it, which model to pick, the instruction file that keeps it on track, the prompts, and a small SEO check script we ran on our own site.

A laptop on a wooden desk with a code editor open on the screen

Key takeaways

  • To build a website with Claude, use Claude Code, which edits files, runs commands and checks its own work, rather than pasting code from a chat window.
  • Claude Code installs with one command and runs in the terminal, the desktop app, VS Code, JetBrains or the browser at claude.ai/code; most of these need a paid Claude plan or an Anthropic Console account.
  • Pick Claude Fable 5.2 with /model fable for the first build or a redesign, and Opus 5.5 or Sonnet 5.5 for everyday edits, since Fable costs twice as much as Opus 5.5 on the API.
  • A CLAUDE.md file in the project root holds the commands, rules and style decisions Claude Code reads at the start of every session, so it stops repeating mistakes.
  • Check every built page before launch: our 30-line script found 5 of 58 pages on this site with a description or title longer than search results show.

The best way to build a website with Claude is Claude Code, not the chat window. Claude Code works inside your project folder: it writes and edits the files, runs the build, opens the result and fixes what broke. With Claude Fable 5.2 released on Nov. 9, 2026, it is a good week to set it up properly.

This guide is the setup we use for this site, which is built and run with Claude Code. Every command below is from Anthropic's own documentation, linked at the end.

Step 1: Install Claude Code where you are comfortable

Claude Code runs in five places, all with the same engine:

  • Terminal (macOS, Linux, WSL): curl -fsSL https://claude.ai/install.sh | bash, then open a new terminal and run claude --version to confirm.
  • Windows PowerShell: irm https://claude.ai/install.ps1 | iex
  • Desktop app for macOS and Windows: sign in and open the Code tab. It includes Claude Code, so there is nothing else to install.
  • VS Code or JetBrains: install the Claude Code extension or plugin.
  • The browser: claude.ai/code, with no local setup, for projects kept on GitHub.

Then go to your project folder and start it:

mkdir my-site && cd my-site
claude

It asks you to log in the first time.

Can Claude build a website for free?

Not with Claude Code. Anthropic's documentation says most Claude Code surfaces need a Claude subscription or an Anthropic Console account, and the desktop app needs a paid subscription. The website itself can cost very little to host: a static site, the simplest kind to build and host, runs on free tiers such as Cloudflare Pages, where this site is hosted.

Step 2: Pick the right model for each job

Claude Code doesn't use Fable unless you ask for it. The documentation says no Fable model is the default on any plan.

  • For the first build, a redesign or a migration: /model fable in a session, or start with claude --model fable. It needs Claude Code 2.1.321 or later (claude update).
  • For everyday edits: /model opus (Opus 5.5) or /model sonnet (Sonnet 5.5).

The reason is cost. On the API, Fable 5.2 is $8 per million input tokens and $40 per million output tokens, twice Opus 5.5's $4 and $20. On a subscription, Anthropic says Fable is included for up to 50% of weekly usage limits on Pro plans and standard Team seats, and on some plans it draws on usage credits instead. Spend it where planning and judgment matter: the structure of the site, the templates, the build setup. A typo fix doesn't need it.

Effort is a second dial. /effort medium is the default for Fable 5.2 and fine for most work; /effort xhigh or the word ultrathink in a prompt is for the hard parts.

Step 3: Write a CLAUDE.md before the first prompt

CLAUDE.md is a plain text file in the project root that Claude Code reads at the start of every session. It is the single most useful thing you can write, because it turns one-off corrections into standing rules. Ours lists the commands, the hosting, the house style and the rules every page must follow. A starting version for a small business site:

# Site: <business name>, <city>
 
Static site, built with <Astro or Next.js static export>, hosted on <host>.
 
## Commands
npm run dev     # local preview
npm run build   # must pass before any change is done
 
## Rules for every page
- One H1 per page. A unique <title> under 60 characters and a meta description under 160.
- Every image has alt text that describes it. Images are compressed and sized.
- Name, address and phone are identical on every page and match the Google Business Profile.
- No invented reviews, numbers or awards. Ask me when a fact is missing.
 
## Style
- Colors, fonts and spacing come from the theme file; never hard-code a color in a page.
- Plain, short sentences. US spelling.

When Claude Code gets something wrong twice, add a line to this file. That habit is most of what keeps a long project consistent.

Step 4: Build in stages, not in one prompt

One giant prompt produces a site that looks finished and isn't. Ask for one stage at a time and check each one in the browser:

  1. Plan: "Read CLAUDE.md. Propose a site map and page templates for a [type of business] in [city]. Don't write code yet."
  2. Scaffold: "Set up the project with the stack in CLAUDE.md, a home page and one service page, and run the build."
  3. Design: "Create the theme: colors, fonts, spacing and a header and footer. Show me the home page at phone and desktop width."
  4. Content: "Add the remaining pages from the site map, using only the facts I've given you. List every fact you still need from me."
  5. Search basics: "Add a sitemap.xml, a robots.txt, LocalBusiness structured data with my real details, and canonical URLs."

Give real material at each step: your services, prices, photos and the wording customers use. Left to fill gaps on its own, any AI model can write plausible text that is wrong, like an address with the wrong suite number.

Step 5: Check every page before launch

Claude Code can write the checks as well as the pages. This is a 30-line Node.js script (Node 18 or later, no packages) that reads every built HTML page and flags a missing or long title, a missing or long description, anything other than one H1, and images without alt text:

// seo-check.mjs: node seo-check.mjs <folder of built HTML>
import fs from 'node:fs';
import path from 'node:path';
 
const root = process.argv[2] ?? 'dist';
const pages = fs.readdirSync(root, { recursive: true }).filter((f) => f.endsWith('.html'));
let problems = 0;
 
for (const file of pages) {
  const html = fs.readFileSync(path.join(root, file), 'utf8');
  const title = html.match(/<title[^>]*>([^<]*)<\/title>/i)?.[1]?.trim() ?? '';
  const desc = html.match(/<meta[^>]+name="description"[^>]+content="([^"]*)"/i)?.[1] ?? '';
  const h1s = (html.match(/<h1[\s>]/gi) ?? []).length;
  const noAlt = (html.match(/<img(?![^>]*\balt=)[^>]*>/gi) ?? []).length;
 
  const issues = [];
  if (!title) issues.push('no title');
  else if (title.length > 70) issues.push(`title ${title.length} chars`);
  if (!desc) issues.push('no meta description');
  else if (desc.length > 160) issues.push(`description ${desc.length} chars`);
  if (h1s !== 1) issues.push(`${h1s} H1 tags`);
  if (noAlt) issues.push(`${noAlt} images without alt`);
 
  if (issues.length) {
    problems++;
    console.log(`${file}: ${issues.join(', ')}`);
  }
}
console.log(`\n${pages.length} pages checked, ${problems} with problems`);
process.exitCode = problems ? 1 : 0;

We ran it on this site's own build on Nov. 10. It checked 58 HTML pages and flagged 5: four descriptions between 161 and 172 characters, and one title of 73 characters. Every page had exactly one H1 and alt text on every image. None of the five is broken, but all would be cut off in search results, which is exactly the kind of thing that slips through when nobody looks. With a stricter 60-character title limit, it flagged 26 pages, so set the limit to match how your titles are written. The script is a quick filter, not a full audit: it reads the HTML text and doesn't run JavaScript.

Ask Claude Code to run it after every build ("run the build and seo-check.mjs, and fix anything it reports"), and add that rule to CLAUDE.md. Our pre-launch QA checklist covers what a script like this can't see.

Which Claude model is best for building a website?

For the first build, Fable 5.2: Anthropic's own results put it ahead of Opus 5.5 on agentic coding (69.9% against 62.3% on FrontierSWE v2) and on computer use (89.3% against 87.2% on OSWorld 2.1). Those are Anthropic's numbers, not ours. For the months of small edits after launch, Opus 5.5 or Sonnet 5.5 cost less and do the job. The documentation's own advice is to start with Opus 5.5 and move up to Fable when Opus at higher effort still falls short.

Want to see how this works on real projects? We wrote up how we build WordPress sites and run this news site with Claude Code, including what broke.

Sources

Photo of Kiran Dasgupta

About the author

Kiran Dasgupta, Editor

Kiran runs Kihan Marketing, a web design, SEO and ads agency, and manages dozens of websites across real estate, home services and healthcare. He writes about SEO, AI search and paid ads news, and what it means for the people who run websites.