Book a 20-min call

How to Edit Your Website with Claude Code (2026 Guide)

A step-by-step guide to editing a code-based website with Claude Code: install, set rules in CLAUDE.md, work on a branch, make safe changes, review the diff and publish.

Harish Malhi - founder of GoodspeedHarish MalhiFounder of GoodspeedUpdated7 min read

Summarise with AI

A terminal window beside a website preview with a highlighted code change

If your marketing site lives in a code repository, you can change it by describing what you want. Claude Code reads the files, makes the edit and shows you what changed. You still decide what goes live.

This guide is for marketing leads and founders who work with a developer or who are happy to open a terminal. It covers the setup, the routine and the mistakes to avoid. For a full migration rather than day-to-day edits, read our guide to migrating a website with Claude Code.

What is Claude Code and when does it fit a website?

Anthropic describes Claude Code as an agentic coding tool that reads your codebase, edits files, runs commands and integrates with your development tools. It is available in a terminal, an IDE, a desktop app and a browser. That means it works on sites whose source files you can open: Next.js, Astro, plain HTML, and static site generators.

Your site is on

Does Claude Code fit?

What to use instead

Next.js, Astro, or another code repository

Yes

This guide

Framer

Not directly, because the site is not a folder of files

Framer's own editor, or Framer's MCP connection to an AI tool. See our Framer MCP guide

Webflow, Wix or Squarespace

Not directly

The platform's editor

WordPress

Only for theme and plugin code

The WordPress editor for content

Step 1: Put the site in git

Git keeps a history of every change, so you can undo anything. If your developer hosts the code on GitHub, you already have this. Ask them for access to the repository and for the command that starts the site on your computer.

Step 2: Install Claude Code

Anthropic's overview page lists the install commands. On macOS, Linux or WSL the native installer is curl -fsSL https://claude.ai/install.sh | bash. Windows has PowerShell and CMD versions on the same page. When the installer finishes, open a new terminal, move into your site's folder and type claude. Check the current instructions at code.claude.com/docs because they change.

Step 3: Write a CLAUDE.md

CLAUDE.md is a markdown file in your project root that Claude Code reads at the start of every session. Use it for the rules a new colleague would need. For a marketing site, that usually means:

  • How to start the site and how to build it.
  • Where the page copy and the blog content live.
  • Your tone of voice: spelling, banned words and how headings should read.
  • What it must never touch, such as the checkout, redirects or tracking code.
  • What done means: the build passes and the page works on a phone.

Step 4: Work on a branch

A branch is a private copy of the site. Ask Claude Code to create one, for example copy-update-pricing. Your live site does not change until a person merges the branch.

Step 5: Ask for one change at a time

Small, specific requests give you a diff you can read. Here are examples and what to check for each:

Task

Example prompt

What to check

Change copy

On the pricing page, change the hero headline to 'Fixed prices, live in weeks'. Keep the spelling British.

Only the headline changed; the page title and metadata still match

Add a page

Add a page at /services/seo-audit using the same layout as /services/aeo. Draft the copy from this brief.

Layout matches, links work, page is in the sitemap

Fix links

Find every link to /old-page and point it to /new-page.

No other links changed; a redirect exists

Add schema

Add FAQ schema to the pricing page from the questions already on it.

Schema text matches the visible text

Speed

Find images over 300 KB on the homepage and suggest how to reduce them.

Images still look right; nothing deleted

Step 6: Review the diff

The diff is the list of lines added and removed. Read it before you accept anything. Ask Claude Code to explain any change you do not understand. Look for edits outside what you asked for, deleted content and changes to tracking or forms.

Step 7: Check a preview

Run the site locally or open the preview link your host creates for each branch. Check the page on a phone and a laptop. Click every link you changed. Check the title, description and canonical tag in the page source.

Step 8: Merge with a person's approval

Open a pull request and have someone else read it, ideally the developer who owns the site. Merge only after the preview looks right. Keep a rule that no one pushes straight to the live branch.

Mistakes to avoid

  • Asking for a redesign in one prompt. Large requests produce large diffs nobody reads.
  • Giving it production credentials. Keep keys and passwords out of the folder, and out of prompts.
  • Skipping the preview. A change can build correctly and still look wrong.
  • Letting it invent facts. Give it the copy, prices and claims. It should not make them up.
  • Forgetting redirects. If a URL changes, the old one needs a redirect. Our migration planner builds a map.

When to ask a developer or agency instead

Some changes are not day-to-day edits. A new design system, a CMS change, a migration from another platform or anything that touches payments or logins should have a developer in charge. If you are weighing Astro or Next.js for a site you will edit this way, read Framer vs Next.js and Astro vs Next.js.

Sources (checked 4 December 2026)

Updated 4 December 2026: first published.

How we wrote this

I run Goodspeed, a website studio, and the steps above are the routine I would give a marketing lead who wants to edit a code-based site safely. Facts about Claude Code come from Anthropic's own documentation, read on 4 December 2026. The example prompts are examples, not results from a client project. Tools change quickly, so check the documentation before you install.

Start with one small change on a branch

Start with one small change on a branch, read the diff and check the preview. Once that routine feels safe, widen the requests.

If your site is in Framer, or you are not sure which platform you should be on, send me your URL. In 20 minutes we will tell you what we would change and what it costs. Book a 20-min call.

Frequently asked questions

Can I edit my website with Claude Code?
Yes, if your site is in a code repository such as Next.js or Astro. Claude Code reads your files, edits them and runs commands. Framer, Webflow and Wix sites are edited in their own editors instead.
Do I need to know how to code to use Claude Code?
Not to make small copy and link changes, but you need to be able to open a terminal and read a diff, or have a developer review the work. For anything beyond that, ask a developer to own the repository.
How do I install Claude Code?
Anthropic's documentation lists a native installer. On macOS, Linux or WSL, the command is curl -fsSL https://claude.ai/install.sh | bash, and Windows has PowerShell and CMD commands. Check code.claude.com/docs for the current steps.
What is a CLAUDE.md file?
It is a markdown file in your project root that Claude Code reads at the start of every session. Use it for how to build the site, where content lives, your tone of voice and what it must not touch.
Is it safe to let an AI edit my live website?
Only if it works on a branch and a person approves the change before it goes live. Read the diff, check a preview and keep credentials out of the project folder.
Can Claude Code edit a Framer site?
Not directly, because a Framer site is not a folder of files. Framer has an MCP connection that lets AI tools work with a project. See our Framer MCP guide.

About the Author

Harish Malhi is the founder of Goodspeed. He left Google in 2019 to build his own product, and started Goodspeed to give other founders the same head start. Today the studio designs and builds websites and the whole digital experience around them for funded tech companies, at the moments that matter: a raise, a launch, a press cycle. Goodspeed is a Framer Enterprise Partner, was Bubble’s Agency of the Year in 2024-2025, and has shipped 300+ products, including launch pages for an NVIDIA-backed AI lab and a Webby-nominated site for a Boeing-backed aviation company. It holds a 5.0 rating from 47 reviews on Clutch.

Ready to see your go-live date?

Book a 30-minute call. We’ll scope it with you and give you a date.

Browse all articles