/webflow-to-astro:webflow-to-astrofrom webflow-to-astro
Migrates a Webflow site to Astro + Tailwind on Cloudflare Pages, preserving URLs, SEO tags, forms, CMS content, and analytics. Use when leaving Webflow, cutting costs, or rebuilding a Webflow site in a static stack.
Ships in webflow-to-astro. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
A playbook for moving any Webflow site off Webflow: a company or product
site, a portfolio, a shop, a restaurant, a nonprofit, a publication. The
steps are the same for all of them. What the site is for changes the
details (references/site-types.md). It covers the whole move: inventory, backup, rebuild, forms,
CMS, video, parity checks, performance, deploy, domain switch, and what the
owner clicks at the end. Search and AI visibility improve at each step
along the way. The scripts in scripts/ and templates in templates/ are
the working parts; references/ has the detail for each step.
The result: an Astro 7 + Tailwind 4 repo of its own, fully prerendered (only gated pages, if any, render on request), on a Cloudflare Pages project (never a Worker on workers.dev), forms through a Pages Function, content in a CMS the owner can edit, every Webflow-hosted file served from Pages, the domain on Cloudflare.
scripts/parity.py, not by eye.seo-aeo-geo
skill as each step starts and make that step's improvements as you go
(see "seo-aeo-geo along the way" below).
docs/move.md, or this skill.
wrangler secret put.A move rewrites every page's markup, so it's the cheapest moment to make a
site easy for search and AI engines to read and cite. Load the
seo-aeo-geo skill (its references/audit-checklist.md and
references/schema-patterns.md) at these points:
docs/seo.md, each tagged with the step that
will fix it and whether it needs the owner's OK.header, nav, main and footer in the Layout.src/data/entity.ts) and referenced
from every page. Its type comes from the site: Organization, a subtype
such as LocalBusiness or NGO, or Person for a portfolio
(references/site-types.md). It carries sameAs. WebSite on home,
BreadcrumbList from the page's crumbs.templates/src/lib/schema.ts).references/page-brief.md, "Search and answer engines"). Wording ideas
come back to you as proposals.datePublished and dateModified from the CMS.docs/seo.md goes to the owner as one
list of proposals.seo-aeo-geo is a separate skill
(adamperlis/claude-skill-seo-aeo-geo).
If it isn't installed, the move still works: make the improvements each
point above names from this skill's own notes (step 8's audit list,
references/page-brief.md, references/site-types.md), write the money
prompts yourself (the questions this site's audience asks an AI engine),
and tell the owner that the full audit and the off-site plan were skipped.
Run python3 -I scripts/inventory.py https://www.example.com > inventory.md.
It reads the sitemap, robots, every page's head (title, description, OG,
canonical, JSON-LD types, noindex), CMS lists (w-dyn-list), forms,
third-party hosts, GA/GTM/Pixel IDs, background videos and their sizes, and
the apex/www/MX/NS records. Then, with the Webflow MCP tools if connected
(data_sites_tool, data_cms_tool, data_forms_tool, data_webhook_tool):
list_collection_items limit 1 → pagination.total).references/inventory.md.references/domains.md).references/site-types.md covers what each
one changes: the entity's schema type, the conversions to keep counting,
and the features that need their own plan.Read references/inventory.md for what each finding means and the
questions to ask the owner (Zapier zaps, who edits content, analytics that
never worked).
Record an SEO baseline before anything changes (using the
seo-aeo-geo skill):
Keep it in docs/move.md. It's the before half of the comparison in
step 12. Then audit the live site with the same skill, into docs/seo.md
(see "seo-aeo-geo along the way").
python3 -I scripts/unzip_webflow.py (it repairs the
non-UTF-8 file names that make unzip fail with "disk full?").python3 -I scripts/mirror.py https://www.example.com reference/
saves each page's HTML to reference/live/ and every file on Webflow's
CDNs to reference/assets/<kind>/, with a manifest. Commit reference/live/
(the record of what was live); git-ignore reference/assets/.node scripts/shots.mjs https://www.example.com live
(desktop 1440 and phone 390). Webflow interactions hide elements until
they scroll into view, so blank areas in full-page shots are usually
unrevealed content: read the HTML.Copy templates/ into the new repo (templates/README.md maps each file).
Config: astro.config.mjs uses build.format: 'file' and
trailingSlash: 'never', because Webflow URLs have no trailing slash.
The dev toolbar is off so screenshots match.
Tokens: take them from the owner's design system if they have one;
otherwise use the Webflow CSS :root variables and type scale.
Shared pieces: Layout (head parity, analytics on the production
hostname only), Nav, Footer, the CTA blocks pages share, the lazy
BgVideo, and motion (reveals with a failsafe).
The search layer, from the start:
src/data/entity.ts, with facts from
the owner, not inferred from the old pages).Pages built on this shell inherit all of it.
Measure first: take live sizes with scripts/measure.mjs and build
the shared pieces to them.
Webflow behaviours to decide on:
.transition +
.transition-trigger + a jQuery snippet that clicks the trigger on load
and again on every internal link, then sets window.location after
~1s). Owners notice when it's gone and ask for it back. Rebuild it both
ways in plain CSS + JS, off under reduced motion:
webflow.js).#, not a new tab, not
a modified click) brings the cover down over the page and only then
navigates. Read the IX2 delays. A slide-in that waits 2s while the
snippet leaves after 1s only ever shows a dead pause on live. Build
what was meant (the cover down in about 0.8s), not the pause.pageshow with persisted, put the cover away, or the
page comes back from the history cache covered.display on live at 375 and
1440 (scripts/measure.mjs), not the CSS. A custom embed
(body .transition { display: block }) can beat the site's own ≤767px
display: none, so it shows on phones too.<category>-activated). GTM triggers built for
Finsweet then keep firing.Two CSS traps that cost hours:
body, never
html. On html, 1rem becomes 10px and every Tailwind spacing and size
renders at 62.5%.md:, lg:) with
px ones (min-[992px]:) on the same property in one file; Tailwind 4 can
order them wrongly. Use one kind per component.Give each agent references/page-brief.md (fill in the repo path, port,
shared components, tokens) plus its page's route, head values and section
list from the inventory, with sections marked hidden skipped. Group small
pages together, give big ones their own agent, and keep the form pages and
the shared shell for yourself. Tell them:
touch src/styles/global.css. Tailwind's dev server doesn't see classes
in files created after it started.measure.mjs.scripts/measure.mjs
and screenshots with scripts/shots.mjs, desktop and phone.docs/seo.md.When an agent reports a shared-file issue, fix it centrally and broadcast the change to the others (with what to re-check).
Generated data files become the source. Page families extracted from the
live HTML (src/data/<family>.ts, "generated, don't edit") stop being
regenerated once the site moves: owner-approved copy and facts get edited
there. When you do, change the file's header to say so ("then edited:
…; re-running the script would undo that"), so nobody re-extracts over it.
A Lottie hero with words in it. Webflow heroes often write their headline
with a Lottie (hero.json, hero-mobile.json). Before touching one, read
its JSON: layer names, text layers (t.d.k[0].s.t and the font), and the
mask and position keyframes tell you the motion exactly (say, a line rising
out of a mask, letters sliding in and overshooting, small words fading up
0.15s apart).
container-type: size and compute the words' top from the
viewBox ratio and where they start in the frame. Then check that it clears
the nav on short laptop screens (1366×768) as well as at 1440.Renaming nav links: longer labels can run into a centred logo. Measure the link row's right edge against the logo at 992, 1100, 1280 and 1440, on the old nav and the new one. If the new one is worse, use short labels on desktop and the full names in the phone menu.
Webflow forms stop working the moment the site leaves Webflow (its Turnstile key and reCAPTCHA are verified by Webflow's servers). Use the templates:
The function: functions/api/forms.ts, a Pages Function. One endpoint
for every form, validated per form, with a honeypot and a minimum time on
the form. Every entry goes to KV (scripts/inbox.mjs reads them).
The mailer: workers/forms-mail, a Worker with no routes, no
workers.dev address and no preview URLs. It's reached through a service
binding (Pages Functions can't hold send_email) and emails the owner
through Cloudflare Email Routing.
The client: forms.ts posts with fetch and shows Webflow's thank-you
and error panels, or follows data-redirect.
Keep Webflow's field names, so entries match old exports.
Bring the old entries over. Every past Webflow submission goes into
the same KV store, so npm run inbox shows the site's whole history, not
just what came in after the move. Use scripts/forms_to_kv.py:
export pulls every form and submission through the Data API (a
token with forms:read). Without a token, use csv with each form's
CSV download from Site settings → Forms. Do this before the owner
cancels the plan, because cancelling loses them.map lists each Webflow form with its count and a guessed kind.
Match each kind to a key of FORMS in functions/api/forms.ts, and
set cookie-preference widgets and test forms to null.kv writes the entries in exactly the shape the function stores, with
the original date, "source": "webflow", and keys built from
Webflow's submission ids.npx wrangler kv bulk put <file> --namespace-id <FORMS id> --remote. This bypasses the function, so nobody is emailed,
Slacked or added to the CRM for an old entry.
Mind the free plan's write limit. Workers Free allows 1,000 KV
writes a day for the whole account, and each entry is one write. One
big import can use up the day, and then every form on the account
stops storing entries until 00:00 UTC. They still email, because the
form function falls back to email, but the inbox script misses them.
Above about 900 entries, ask the owner whether to spread the import
over several days (kv … --per-file 900, one file a day) or to move
to Workers Paid ($5 a month) first. Don't start the import until they
answer.npx wrangler kv key list --prefix <kind>: …), and read a few with npm run inbox.Every file holds people's details. The script refuses to write inside a git work tree. Delete the files once the counts match, and tell the owner how many came over per form.
Where entries go: besides KV and email, the function can post to Slack
(SLACK_WEBHOOK_URL) and a CRM (CRM_WEBHOOK_URL). Each is a secret,
used only if set, and can never fail the form. That replaces Zapier zaps
triggered by "Webflow: New Form Submission"; ask what each zap did, rebuild
that directly, then turn the zap off.
Fill the destination the way the team uses it (a CRM, a help desk, a mailing list, a spreadsheet):
Confirm where the Slack webhook posts. The channel is fixed when the webhook is made, and a test can land in a channel the team didn't expect. Ask the owner which channel before the test entry.
Route by what the entry is: one contact form gets enquiries, support requests, applications, press and spam.
lead).Forms that aren't messages: newsletter signups, file uploads,
bookings and donations each have their own route
(references/site-types.md). An embed from the provider usually carries
over as it is.
Spam: Turnstile, not reCAPTCHA (free, no Google, usually invisible, managed mode). Its site key in the form, its secret as a Pages secret, and the function calls siteverify. The form must wait for the token before sending (an early send goes without it and is refused) and say plainly when Turnstile wants a tick. A browser driven by automation gets the tick box; don't click it, test with a preview deploy (which has no secret, so no check).
Test each outside call end to end from Cloudflare, not from your
machine: push a preview branch, post to its /api/forms, read
wrangler pages deployment tail <full deployment id>, and look for the
email the service sends. Ghost's members API (newsletter sign-ups)
answered 406 to a Worker because a Worker's fetch sends no User-Agent;
from a laptop it worked.
Don't count the wrong people as conversions: if GTM fires an Ads conversion on the thank-you page, send only leads there; keep the others on the page with their own thank-you.
A visitor who isn't a lead shouldn't write to you: when a contact form's first question sorts visitors ("buying or just browsing?"), the ones who aren't leads get what serves them (a page of resources and an in-place sign-up, just an email and "subscribe"), not a note box. Say exactly what they're joining, by the name its confirmation email uses (", our free newsletter: …"). Hide and disable the other side's fields (disabled fields are neither validated nor sent). The function waits for the sign-up service and reports a failure, since there's no stored note to fall back on.
Per-form name and email: each form names the fields that hold the
person's name and email (nameField, emailField), since Webflow forms
often end up with name-2 and Email-2.
Email Routing trap: check the domain's MX first.
forms.example.com,
nothing else touched).Test: curl each form against a preview deploy with clearly marked test
data. Confirm the entry in KV and the mailer's 204 (wrangler tail --config workers/forms-mail/wrangler.jsonc), then delete only the test entries.
See references/cms.md. The short version:
scripts/export_cms.py, using the Webflow API via MCP or a token. Rich
text, images, references, slugs and order all come along.seo-aeo-geo's freshness and schema
layers):
datePublished and dateModified come from the CMS's own
timestamps, and the sitemap's lastmod from the same.templates/workers/rebuild-cron, a Cron Trigger
that POSTs to the Pages deploy hook. It keeps the schedule in Cloudflare
with the site, where a GitHub Actions schedule needs a repo secret and is
switched off in a public repo after 60 days without commits./blog/[slug], /products/[slug],
/events/[slug]) become getStaticPaths pages at the same URLs.npx sanity exec <script> --with-user-token, with the script inside studio/. A script elsewhere
can't resolve sanity/cli. Delete it afterwards._updatedAt moves on any import or typo fix.gh api "repos/<o>/<r>/commits?path=<file>", then
contents/<file>?ref=<sha>. Seed a page per edition from that, then
archive each new month as it comes.cdn.prod.website-files.com,
uploads-ssl.webflow.com, assets.website-files.com or
d3e54v103j8qbb.cloudfront.net.display:none section that still downloads. Find the
bandwidth culprit before deciding R2 versus Pages; Pages bandwidth is free.scripts/compress_video.sh in.mp4 tries
x264 CRF 26 and 28 and reports size and SSIM. Keep the version with
SSIM ≥ 0.985.BgVideo loads lazily (preload none, plays near the viewport, pauses
off it, poster under reduced motion). Pass eager only for a hero.astro:assets <Image>, from the largest
original, not Webflow's -p-500 variants.python3 -I scripts/parity.py reference/live dist diffs every page's head
(title, description, OG/Twitter, canonical, robots, JSON-LD types) and
checks that every internal link and asset resolves, no Webflow host is
referenced, and no file exceeds 25 MiB.
format: 'file', home's path is /index, so the
canonical must strip it.User agents: Cloudflare blocks Python's default user agent with a 403, so give every checking script its own UA (the skill's scripts do). Check status codes with curl before trusting a surprise.
Lighthouse: run it in a clean headless Chrome
(scripts/lighthouse.sh https://<project>.pages.dev /about …). Browser
extensions inflate TBT and fail Best Practices. Usual fixes:
same-origin.includeSubDomains to HSTS only if every subdomain serves HTTPS.Visual check: shoot the deploy against live at 1440, 390 and one wide width (2000). At the wide width, check that hero content aligns with the nav's container.
SEO/AEO/GEO audit: once parity passes, load the seo-aeo-geo
skill and run its full audit (references/audit-checklist.md) on the
pages.dev build. Most of it should already pass, since the shell and the
pages built it in. What's left joins docs/seo.md.
references/schema-patterns.md): the site's entity
with sameAs on every page, WebSite on home, BreadcrumbList,
dateModified from the CMS's updated time, and each page's own type
(Product, Event, Article, Menu…; references/site-types.md).What Webflow sites reliably get wrong (check for every one):
src/data/entity.ts) and run each page's
JSON-LD through a normalizer in Layout (templates/src/lib/schema.ts):
{ "@id": ORG };serviceType moves to a Service;faq prop), never from copied schema.public/_headers
https://:project.pages.dev/* and https://:version.:project.pages.dev/*
with X-Robots-Tag: noindex (they never match the custom domain)._updatedAt, the newest ATS posting and a feed's own date instead.
git log -1 --format=%cI -- <the page, its write-up, its images>), not the build time. A shared component
changing shouldn't move every page's date.git archive: the archive has no history, so set
GIT_DIR to the repo's .git, or the dates vanish. With no history,
leave lastmod out rather than invent one.aria-hidden if it says
the same thing.A positioning shift (the owner wants new words for what they do, often decided during the move):
/new-term → /old-term).Report the findings as proposals and apply them only with the owner's
OK, in separate commits after the parity commit, so ranking changes can
be traced. Respect its "what not to do" list: don't add llms.txt (carry
over one that exists), and don't chunk or rewrite content for AI.
references/redirects.md covers all five layers:
Convert Webflow's CSV export with scripts/redirects.py from-csv, map
every dropped page to its nearest equivalent, and before the switch run
scripts/redirects.py check public/_redirects https://<project>.pages.dev.
It checks each rule's status and target and flags chains. For search, every
redirect is one hop to the closest page, never to home by default: a
redirect to an unrelated page is treated as a soft 404, and the old URL's
standing is lost.
Git-connected or direct upload? Decide before creating the project: a direct-upload project can never be connected to Git later, and only a Git-connected one has deploy hooks.
npx wrangler deploy. Delete it and start
again.) Install the Cloudflare Pages GitHub app on that one repo; preset Astro, build npm run build, output dist, env
NODE_VERSION = the .nvmrc version. Before that, build a fresh clone
(git clone --depth 1 file://$PWD /tmp/x && cd /tmp/x && npm ci && npm run build): the builder has none of the git-ignored reference/.
The build log should say it read wrangler.jsonc (its bindings).
Every push to main then deploys; npm run deploy still works for a
one-off. Then the deploy hook, the CMS webhook and the daily rebuild
(references/cms.md).Create a direct-upload project: wrangler pages project create <name> --production-branch main.
Deploy with --force: wrangler pages deploy --project-name <name> --branch main --commit-dirty=true --force. Newer wranglers otherwise try
the Workers-based Pages and land the site on the shared workers.dev
subdomain.
Deploy a commit, not the working tree, when other agents share the checkout:
git archive <sha> | tar -x -C /tmp/site-<sha>.node_modules in, and build there, with
GIT_DIR=<repo>/.git for anything the build reads from git (the
sitemap's dates).--commit-hash <sha>.Their uncommitted work never ships, and the deploy names exactly what's
live. Before deploying, git log <last deployed sha>..HEAD, so you know
what else goes out with yours.
Verify on the deploy's own address first (<hash>.<project>.pages.dev).
The custom domain can keep serving the previous deploy for a few seconds
after "Deployment complete", so a check that runs at once can fail for
no reason.
The share image: a move usually changes it, since Webflow's lived on its CDN.
/og.jpg?v=2) and bump it with every new card. X
and LinkedIn cache the image by its URL.Preview branches (--branch forms-test) are for form tests.
Bindings (KV, services) go in wrangler.jsonc with pages_build_output_dir.
Commit by path, after git status --short | grep -E '(^|/)\.env' comes
back empty. Push to a private repo once the owner agrees.
See references/domains.md (nameserver moves and registrar transfers) and
references/dns-and-email.md (records, Pages custom domains, email).
198.202.211.1 or CNAME to
proxy-ssl.webflow.com, and www to cdn.webflow.com.dig NS./cdn-cgi/l/email-protection script. Package versions in code samples
([email protected]) and handles with dots after the @ become
"[email protected]".
<!--email_off--> … <!--/email_off--> (Astro keeps HTML comments in
its output).seo-aeo-geo):
/_astro/).references/dns-and-email.md has the pace).Tell the owner exactly what's left for them to click, and write
docs/move.md in the repo: how it's set up, what was carried over or
dropped and why, and the forms, CMS, analytics and DNS details. Their clicks:
seo-aeo-geo skill's measurement section: Search Console clicks,
impressions and AI Overviews for the same pages and queries, and the same
money prompts in ChatGPT, Perplexity and Gemini, from the same country.
Report what moved and why.seo-aeo-geo skill. Most AI citations
come from other sites, so name the two or three channels the engines cite
most for this category, with the format for each and why. The site move
can't do this part; the owner has to.docs/seo.md: what was improved during the move, what's still
proposed, and when to re-measure.references/domains.md.privacy@), so the owner's own inbox stays off the page.docs/move.md, so the next person doesn't
ask again.
p=none record. "You'll see every service that
sends email as your domain, including anyone faking it. Nothing is
blocked yet."include: in the apex
SPF and every DKIM selector (dig TXT), say what each one is, and ask
which still send (their mail host, a newsletter tool, a CRM, Webflow's
own form mail). "Fewer services allowed to send as you makes your
domain harder to fake, and keeps you under a 10-lookup limit that
makes email checks fail when it's crossed." Remove only the ones they
confirm are gone. Never guess: removing one that's still in use breaks
that service's mail.
mailgun.org is often a Ghost blog's
newsletters. Ghost(Pro) and self-hosted Ghost both send bulk email
through Mailgun, often from the apex address even when the blog is on
a subdomain. Others: sendgrid.net, servers.mcsv.net (Mailchimp),
_spf.salesforce.com and a help desk's include. If there's a blog,
a newsletter or a CRM anywhere on the domain, assume its sender is
live until the owner says otherwise.p=quarantine, and later reject. "Email that
pretends to be you goes to spam instead of the inbox. Your own email
already passes, so it isn't affected." If the reports aren't clean
yet, put the date to look again in docs/move.md.references/transactional-email.md). It costs $5 a month (Workers
Paid, 3,000 emails included) and doesn't suit scheduled newsletters.
"Your apps' email moves to the same Cloudflare account as your site.
Each app switches with one setting and can switch back the same way."
Ask; do it only on a yes.scripts/:
inventory.py, unzip_webflow.py, mirror.py, export_cms.pyshots.mjs, measure.mjs, parity.py, redirects.py, compress_video.sh, lighthouse.shtemplates/ (README.md maps them): Astro config, global.css skeleton,
Layout, BgVideo, forms (function, mailer Worker, client), wrangler
configs, _headers, _redirects, sitemap endpoint, inbox script,
AGENTS.md, and studio/scripts/build-import.mjs (Webflow CMS JSON → Sanity).references/: inventory.md, site-types.md, page-brief.md, cms.md,
redirects.md, domains.md, dns-and-email.md, transactional-email.md.references/cms.md (opens in a new tab)references/dns-and-email.md (opens in a new tab)references/domains.md (opens in a new tab)references/inventory.md (opens in a new tab)references/page-brief.md (opens in a new tab)references/redirects.md (opens in a new tab)references/site-types.md (opens in a new tab)references/transactional-email.md (opens in a new tab)scripts/compress_video.sh (opens in a new tab)scripts/export_cms.py (opens in a new tab)scripts/forms_to_kv.py (opens in a new tab)scripts/inventory.py (opens in a new tab)scripts/lighthouse.sh (opens in a new tab)scripts/measure.mjs (opens in a new tab)scripts/mirror.py (opens in a new tab)scripts/parity.py (opens in a new tab)scripts/redirects.py (opens in a new tab)scripts/shots.mjs (opens in a new tab)scripts/unzip_webflow.py (opens in a new tab)templates/AGENTS.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub adamperlis/adam-plugins --plugin webflow-to-astroOther plugins' skills for the same job