# Build websites with Claude Code

> Scaffold with your framework CLI, add CLAUDE.md and a check Claude can run, then review every page before ship.

Source: https://fullbytedeveloper.com/blog/build-websites-with-claude-code
Published here: 2026-11-26

Building a site with Claude Code means the framework CLI owns the scaffold, Claude owns the edits, and your check owns "done". Astro's install docs start with `npm create astro@latest` (and the pnpm equivalent). Claude Code common workflows start in the project root with `claude`. [1] [2]

Related reading: [Lock Claude Code out of your .env](/blog/claude-code-env-lock), [Claude Code for content](/blog/claude-code-for-content-drafts), [Claude Code for design](/blog/claude-code-for-design-loop). Durable users: [Review a Durable website before publishing](/blog/durable-ai-website-first-draft) is a different product path. [7]

## Scaffold with the framework, then open Claude

```bash
npm create astro@latest
cd your-project-name
claude
```

You should see the Astro wizard finish, then Claude Code attach to that folder. Use the same pattern for other frameworks: their create command first, Claude second. Asking Claude to invent a whole toolchain from an empty directory wastes the first session on version guesses. [1] [2]

## Write a short CLAUDE.md Claude cannot infer

Best practices: only write what Claude cannot find by reading the repo, or what it would rediscover every session. Memory docs cover `CLAUDE.md` as project instructions the model reads. [3] [4]

Example shape (adapt to your stack):

```md title="CLAUDE.md"
# Site rules
- Run `npm run check` before claiming done.
- Never edit files under `dist/`.
- Content lives in `src/content/`; do not invent frontmatter fields.
- Deploy: push to main; Cloudflare Pages builds main.
```

Put never-break rules (secrets, generated clients) into deny rules or hooks, not only prose. Settings docs cover permission precedence. [5] [3]

## Give Claude a check, then a page job

Best practices split non-deterministic guidance (`CLAUDE.md`, prompts) from deterministic checks (tests, Stop hooks, CI). [3]

```text
Add an About page using the existing layout. Keep the current color tokens.
When finished, run npm run check and fix failures before you stop.
```

Common workflows also cover explore-first prompts ("give me an overview of this codebase") before large edits. Use that on unfamiliar templates. [2]

## Review the rendered page before you merge

Open the preview URL on a phone width. Check the longest heading, the nav, and the primary CTA. Pair [Claude Code for design](/blog/claude-code-for-design-loop) when the change is visual, and [Claude Code for content](/blog/claude-code-for-content-drafts) when the change is copy.

| Stage | Owner | Source |
| --- | --- | --- |
| Scaffold | Framework CLI | Astro install [1] |
| Edits | Claude Code | Common workflows [2] |
| Project memory | `CLAUDE.md` | Best practices / memory [3] [4] |
| Secrets | Deny rules | Settings + env lock [5] [6] |
| Done | Your check + you | Best practices [3] |

You now have a website path that keeps scaffold and CI honest while Claude Code does the file work.

Send this to the builder who wants Claude Code on a real framework repo, not a blank prompt.

## Sources

1. [Astro install and setup, accessed 2026-11-26](https://docs.astro.build/en/install-and-setup/)
2. [Claude Code common workflows, accessed 2026-11-26](https://code.claude.com/docs/en/common-workflows)
3. [Claude Code best practices, accessed 2026-11-26](https://code.claude.com/docs/en/best-practices)
4. [Claude Code docs: memory / CLAUDE.md, accessed 2026-11-26](https://code.claude.com/docs/en/memory)
5. [Claude Code docs: settings, accessed 2026-11-26](https://code.claude.com/docs/en/settings)
6. [Full Byte Developer: Lock Claude Code out of your .env](https://fullbytedeveloper.com/blog/claude-code-env-lock)
7. [Full Byte Developer: Review a Durable website before publishing](https://fullbytedeveloper.com/blog/durable-ai-website-first-draft)
