/anglesite:exportfrom anglesite
Produces a portable export of an Astro site (built HTML, content, media, migration guide) so the owner can self-host or move to another platform.
Ships in anglesite. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Produce a portable, self-contained export of the site so the owner is never locked in. The output is a folder the owner can hand to a new developer, upload to any static host, or archive. This is a trust feature — the explicit "you can leave any time, here's how."
Anglesite is built so this export is always possible: content is .mdoc
Markdown, media is plain files in public/, the build output is plain HTML in
dist/, and the source is a standard Astro project with no Anglesite runtime.
Nothing in the export depends on the Anglesite plugin to work.
.mdoc files so it's portable by designdist/ is self-contained, no runtime dependency on external scriptsRead EXPLAIN_STEPS from .site-config. If true or not set, explain before every tool call that will trigger a permission prompt — tell the owner what you're about to do and why in plain English. If false, proceed without pre-announcing tool calls.
Tell the owner, in plain language:
"I'm going to package up your whole website so you can take it anywhere — to a different host, a new developer, or just keep as a backup. Nothing about this site is locked to Anglesite. When this finishes you'll have a folder that includes:
dist/— the finished website, ready to upload to any hostcontent/— your blog posts and pages in plain Markdownpublic/— your images and other mediaMIGRATING.md— step-by-step instructions for self-hosting on common platforms (Netlify, Vercel, GitHub Pages, S3, or any web server)"
Then ask:
"Do you also want me to include a copy of the source code in the export? That's useful if you plan to keep editing the site outside of Anglesite."
Store the answer as INCLUDE_SOURCE (true / false).
The export is only useful if the site builds. Build first.
npm run build
If the build fails, tell the owner what went wrong in plain language and stop.
Do not produce a partial export. Run /anglesite:check to diagnose, then
re-run /anglesite:export once the build succeeds.
Read SITE_NAME from .site-config. Slugify it (lowercase, spaces and
non-alphanumeric characters replaced with -, collapsed and trimmed) and
combine with today's date for the export folder name:
EXPORT_DIR=export/{slug}-{YYYY-MM-DD}
For example: export/pairadocs-farm-2026-05-06.
Use Glob (export/{slug}-{YYYY-MM-DD}*/**) to see whether an export from
today already exists. If it does, append -2, -3, etc. — never overwrite a
previous export. No command is needed to create the folder: the copy in Step 3
creates it.
The copy commands in Steps 3–6 use Node (already installed for the site) so
they behave the same on macOS, Linux, and Windows. Replace EXPORT_DIR with
the real path in each one.
Add export/ to .gitignore if it isn't already, so exports don't get
committed. Use the Read tool to load .gitignore, then the Edit tool
to append export/ if missing.
The built site in dist/ is self-contained static HTML, CSS, and JS. It can
be uploaded to any static host as-is.
node -e "require('fs').cpSync(process.argv[1], process.argv[2], { recursive: true })" dist EXPORT_DIR/dist
Markdown sources are the canonical content, independent of the build output. Copy the whole content tree:
node -e "require('fs').cpSync(process.argv[1], process.argv[2], { recursive: true })" src/content EXPORT_DIR/content
This includes posts, pages, and any custom collections defined in
src/content.config.ts. The .mdoc files are standard Markdoc and can be
opened in any text editor or imported into another CMS.
node -e "require('fs').cpSync(process.argv[1], process.argv[2], { recursive: true })" public EXPORT_DIR/public
This copies images, fonts, manifests, redirects, and the robots.txt — the same static assets that ship with the deployed site.
If INCLUDE_SOURCE is true, copy the project sources so the owner can keep
building. Skip build artefacts, dependencies, and local-only files:
node -e "const fs=require('fs'),path=require('path');const skip=new Set(['node_modules','dist','.astro','.cache','.wrangler','export','.env','.DS_Store','.git']);const keep=(p)=>{const b=path.basename(p);return skip.has(b)===false&&b.startsWith('.env.')===false};for(const e of fs.readdirSync('.')){if(keep(e))fs.cpSync(e,path.join(process.argv[1],e),{recursive:true,filter:keep})}" EXPORT_DIR/source
It copies everything in the project except node_modules, dist, .astro,
.cache, .wrangler, export, .env, .env.*, .DS_Store, and .git.
This produces a clean Astro + Keystatic project that builds with npm install && npm run build on any machine. It still has .site-config so future
Anglesite sessions work, but nothing in the source requires Anglesite — it's
standard Astro.
Read SITE_NAME, SITE_DOMAIN (if set), and GITHUB_REPO (if set) from
.site-config. Use the Write tool to create EXPORT_DIR/MIGRATING.md
using the template in the next section, substituting {SITE_NAME},
{SITE_DOMAIN}, {GITHUB_REPO}, and {DATE} (today's YYYY-MM-DD).
If SITE_DOMAIN isn't set, omit the domain-specific paragraphs and use a
generic placeholder. If GITHUB_REPO isn't set, skip the "back into Anglesite"
section's git clone reference and tell the reader to use the source folder
directly.
The template lives in ${CLAUDE_PLUGIN_ROOT}/skills/export/MIGRATING.template.md. Read it and use its full text as the body of MIGRATING.md — change nothing except the placeholders.
{GITHUB_CLONE_BLOCK} is the literal text:
2. **From GitHub** — clone https://github.com/{GITHUB_REPO} and run
`/anglesite:start` in the cloned folder.
3. **Fresh import** — ...
When GITHUB_REPO is set. Renumber the list as needed. Otherwise omit it
entirely.
Confirm the export contains what it should. Use Glob to check each of these matches something:
EXPORT_DIR/dist/index.htmlEXPORT_DIR/content/**/*EXPORT_DIR/public/**/*EXPORT_DIR/MIGRATING.mdEXPORT_DIR/source/package.json (only if INCLUDE_SOURCE)Sanity-check sizes (prints each folder's size in MB):
node -e "const fs=require('fs'),path=require('path');const size=(d)=>fs.readdirSync(d,{withFileTypes:true}).reduce((n,e)=>n+(e.isDirectory()?size(path.join(d,e.name)):fs.statSync(path.join(d,e.name)).size),0);for(const d of process.argv.slice(1))console.log(d,(size(d)/1048576).toFixed(1)+' MB')" EXPORT_DIR/dist EXPORT_DIR/content EXPORT_DIR/public
If any of these checks come back empty, tell the owner what's missing and offer to re-run the affected step. Don't claim success on a partial export.
Tell the owner in plain language:
"Your export is ready at
EXPORT_DIR.Inside you'll find:
dist/— your finished website, ready to upload anywherecontent/— every post and page as Markdownpublic/— your images and other mediaMIGRATING.md— step-by-step instructions for self-hosting and re-importing {SOURCE_BULLET}The whole thing is yours. You don't need Anglesite, Claude, or anyone else to use it. Open
MIGRATING.mdfirst — it walks through the most common options for taking the site somewhere new.A few things to keep in mind:
- This export captures the site as it is right now. If you make more changes here, run
/anglesite:exportagain to refresh.- The export folder is in
.gitignoreand won't be committed — it's for your records, not for the site itself.- Your domain, analytics, and email are separate accounts in your name. Moving the website does not affect any of them."
Where {SOURCE_BULLET} is - \source/` — the full project source code,
ready to rebuild from scratchif INCLUDE_SOURCE istrue`, otherwise omitted.
Ask the owner what they want to do next:
"Want me to do anything else with this export? For example:
- Zip it up so it's easy to email or hand off
- Walk through one of the hosting options in
MIGRATING.mdtogether- Nothing — just leave it there for now"
If they ask to zip:
zip -rq EXPORT_DIR.zip EXPORT_DIR
Tell them where the zip is. zip ships with macOS and most Linux systems but
not Windows — if the command isn't found, tell the owner: "Right-click the
export folder and choose Send to → Compressed (zipped) folder (on
Windows 11: Compress to ZIP file)."
If they ask to walk through a host, follow the matching section in
MIGRATING.md and help them through it.
The export pipeline depends on a working build. If npm run build fails,
stop in Step 1 with a clear explanation. Do not produce a partial export —
that breaks the trust the export is meant to deliver.
dist/ is hugeIf the size check in Step 8 reports more than ~200 MB for dist, mention it:
"Your built site is on the larger side — that's usually images. Most static
hosts handle this fine, but if you hit upload limits, ask me to optimize your
images before exporting again." (Image optimization is
${CLAUDE_PLUGIN_ROOT}/skills/optimize-images/SKILL.md — not a slash command.)
.site-config keysIf SITE_NAME is missing, ask the owner once: "What name should I use for
the export folder?" If SITE_DOMAIN is missing, generate MIGRATING.md
without the domain-specific paragraphs and tell the owner: "Your site doesn't
have a domain set yet, so I left those instructions generic. Once you do have
one, you can update MIGRATING.md yourself or run /anglesite:export again."
If the owner says they just want a quick zip of the site, skip the source
copy and the MIGRATING.md walk-through and produce a minimal export with
dist/, content/, public/, and a one-paragraph MIGRATING.md. The full
guide is overkill for "I just want a backup."
After this skill runs, no project docs need updating — the export is a side-effect, not a state change. The export folder itself is the deliverable.
What SKILL.md sets; muted values are Claude Code's defaults
Use when the owner wants to leave Anglesite, self-host elsewhere, move to another platform, or keep a portable copy of the whole site.
npx claudepluginhub anglesite/anglesite-skills --plugin anglesite56 skills in this plugin
/bookingEmbed appointment scheduling (Cal.com or Calendly) into the siteOther plugins' skills for the same job