/anglesite:deployfrom anglesite
Builds, security scans, and deploys a site to Cloudflare Workers (Static Assets) via Wrangler. Handles first-time Cloudflare setup, domain config, and gated pre-deploy scans.
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.
Build, scan, and deploy the site to Cloudflare Workers (Static Assets). On first deploy, this also handles Cloudflare account creation, Wrangler authentication, and domain configuration.
The site deploys via Wrangler: npm run deploy builds the site (astro build) and publishes the resulting Worker + static assets to Cloudflare. The draft branch is still pushed to GitHub on every deploy as an off-site backup, but it is no longer the trigger for a preview build — preview deploys use wrangler versions upload instead.
AGENTIC_CRAWLERS intent rather than a separate opt-in flagRead 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.
If any wrangler command (build, login, versions upload, deploy) returns an error, or if Cloudflare-side behavior surfaces during a deploy step (custom domain not attaching, SSL stuck, account validation mismatch, Workers limit hit), look for a Cloudflare search_cloudflare_documentation tool (tools are found by suffix — see ${CLAUDE_PLUGIN_ROOT}/docs/cloudflare-mcp.md) and call it with the error code, error message, or the symptom in plain words (e.g., "wrangler 10021", "Workers script size limit", "custom domain pending SSL"). Read the result before suggesting a fix — Cloudflare's wrangler error catalog and Workers limits change over time, and stale advice wastes the owner's time. If nothing useful comes back, say so to the owner rather than guessing.
This applies anywhere a Cloudflare-side step fails in this skill — not only the auth-error path in Step 7.
If this is the first time running /anglesite:deploy, the owner needs a Cloudflare account.
Tell them: "To put your website on the internet, we need a free Cloudflare account. It's where your site will live — fast and free."
Ask: "Do you already have a Cloudflare account, or should we create one?"
If they need one, tell them to open the sign-up page in their browser: https://dash.cloudflare.com/sign-up
Walk them through: click "Sign in with Apple", approve, done. Wait for confirmation before continuing.
Skip this step entirely on subsequent deploys.
First make sure the Content-Security-Policy allows every provider configured in .site-config (checkout, booking, comments, tracking). A missing domain does not fail the build — it silently breaks that feature on the live site:
npm run ai-csp
It edits public/_headers in place and prints anything it added; "up to date" is the normal result. If it reports that ai-csp is not a script, the site predates it — run /anglesite:update after this deploy.
Tell the owner: "I'm building your website — turning your posts and pages into the files that go online."
npm run build
If the build fails, explain what went wrong in plain language and fix it before proceeding.
Run the automated security scan:
npm run predeploy
This checks PII (emails, phone numbers), API tokens, third-party scripts, Keystatic admin routes, OG images, and the maintenance log. If any blocking check fails, it exits with code 1 and prints what went wrong. Fix the issues before proceeding.
The maintenance log is warn-only — it never blocks a deploy. The script reads MAINTENANCE_MONTHLY_LAST, MAINTENANCE_QUARTERLY_LAST, and MAINTENANCE_ANNUAL_LAST from .site-config and warns once any stamp is older than its grace window (35, 100, or 380 days). If any warning fires, surface it to the owner in plain language after the build — for example: "It's been about three months since your last health check — want me to run /anglesite:check before we publish?" — and let them decide whether to pause or continue. See docs/webmaster.md → Maintenance schedule.
If the site intentionally publishes a contact email (e.g., a mailto: link in the footer), tell the owner you'll add it to the allowlist so it doesn't block future deploys. Add to .site-config:
[email protected]
Multiple emails are comma-separated: [email protected],[email protected]
Similarly, if the site publishes phone numbers (business line, crisis hotlines), add them:
PII_PHONE_ALLOW=555-123-4567,1-800-662-4357
Numbers are matched by digits, so formatting differences don't matter.
Then re-run npm run predeploy to confirm it passes.
/anglesite:indieweb is set up)/auth, /micropub, /media, and /webmention are intentional public routes served by the site Worker — the scans expect them and never flag them. Two things the scan does enforce on an IndieWeb site:
TOKEN_SIGNING_KEY and GITHUB_TOKEN must be secret bindings (npx wrangler secret put … on the Worker, gh secret set … for the Actions workflow) — never literals in source, worker/, or the wrangler configs. The token scan blocks the deploy if either appears committed; rotate the leaked value first, then move it to the secret store.me (INDIEWEB_ME). Bearer-only Micropub clients — including micropub.rocks' default flow — won't authenticate. That's intentional security posture, not a deploy regression: never "fix" 401s from bearer clients by weakening the endpoint. See ${CLAUDE_PLUGIN_ROOT}/docs/platforms/dwk-workers.md.Run the SEO audit against the built output in dist/ — the same audit /anglesite:seo uses (per-page checks, duplicate titles/descriptions, sitemap, robots.txt):
npm run ai-seo
Exit code 1 means at least one critical issue (missing titles, missing descriptions) — pause the deploy. Present them to the owner with one-shot fix options. After fixes, rebuild and re-scan.
Warnings and Nice-to-haves are non-blocking. Log them to reports/seo-report.md (the reports/ directory is gitignored — regenerated on demand, never committed) and briefly mention to the owner: "I found a few SEO improvements you can make later — they're saved in reports/seo-report.md."
If the owner passes --skip-seo, skip this step and log a timestamped note to reports/seo-report.md: SEO audit skipped on YYYY-MM-DD HH:MM.
Read LINK_CHECK_DEPLOY from .site-config. If set to true, run the link checker against the built site:
npm run ai-linkcheck
If broken internal links are found, pause the deploy and present them to the owner. Offer to fix or allowlist each one. After fixes, rebuild and re-check.
This gate is off by default. Only runs when the owner has opted in via .site-config:
LINK_CHECK_DEPLOY=true
Orphaned pages and redirect chains are always non-blocking (info-level). Broken external links are non-blocking even when the gate is enabled — external sites may be temporarily down.
If the owner passes --skip-linkcheck, skip this step.
Read A11Y_GATE from .site-config. If unset or false, skip this step (the full accessibility audit still runs in /anglesite:check). If set to true, run the unified accessibility audit against the built site:
npm run ai-a11y
The script writes the report to reports/a11y-report.md (the reports/ directory is gitignored — regenerated on demand) and exits with severity-aware codes (1 for WCAG 2.1 AA errors, 2 for warnings, 0 for clean). When the gate is on:
Warn-only mode for sites mid-remediation. If A11Y_WARN_ONLY=true is set in .site-config (or the owner passes --warn-only), the audit always exits 0 regardless of findings, but the report is still written. Use this when a legacy site is being brought up to standard so deploys aren't blocked while the backlog clears.
This gate is off by default. Only runs when the owner has opted in via .site-config:
A11Y_GATE=true
A11Y_WARN_ONLY=false
If the owner passes --skip-a11y, skip this step.
For the audit to use the full pa11y/axe-core checkers (not just heuristics), the owner needs them installed once: npm install -D pa11y or npm install -D @axe-core/playwright playwright. Tell them this once when they enable the gate.
Read AGENTIC_CRAWLERS from .site-config. The default (when unset) is allow — Anglesite's default stance is that sites are open to humans and agents.
allow — a14y runs as a deploy gate. Inviting agentic crawlers and then ignoring how readable the site is to them is incoherent; the score is enforced. Read ${CLAUDE_PLUGIN_ROOT}/skills/deploy/a14y-gate.md and follow it.block — the owner has declared agentic crawlers shouldn't read this site. Skip this step entirely. (/anglesite:check still runs a14y informationally — useful for reference even when blocked, but never blocks deploy.)Translate the choice for the owner the first time you encounter a site where it isn't set: "Your site is open to AI agents (search summaries, chat browsers, content mappers). I'll check that they can actually read it before each deploy. If you'd rather block agentic crawlers entirely, set AGENTIC_CRAWLERS=block in .site-config and I'll skip this check."
Skip this step unless INDIEWEB_WEBMENTION is true in .site-config. Read ${CLAUDE_PLUGIN_ROOT}/skills/deploy/webmentions.md and follow it.
Read ${CLAUDE_PLUGIN_ROOT}/skills/copy-edit/SKILL.md and follow it in non-interactive deploy context. This scans all content pages for clarity, tone consistency, and missing CTAs.
No issues block the deploy. Write findings to reports/copy-edit-report.md (the reports/ directory is gitignored — regenerated on demand) and briefly mention to the owner: "I found a few copy improvements you can make later — they're saved in reports/copy-edit-report.md."
If the owner passes --skip-copy, skip this step.
Run the performance budget audit against the built site:
npm run ai-perf -- --warn-only
This walks dist/ and computes the JS + CSS weight referenced by each HTML page, comparing against budgets in .site-config:
PERF_BUDGET_JS — total JavaScript per page (default 51200 bytes / 50 KB)PERF_BUDGET_CSS — total CSS per page (default 51200 bytes / 50 KB)PERF_BUDGET_LCP_MS — Largest Contentful Paint target in ms (default 2500, only checked when Lighthouse runs)PERF_BUDGET_CLS — Cumulative Layout Shift target (default 0.1, only checked when Lighthouse runs)Per-template overrides match the first path segment. For example, if a /lab/* page uses creative-canvas and intentionally ships a heavier bundle, raise just that route's budget:
PERF_BUDGET_JS_LAB=512000
PERF_BUDGET_CSS_LAB=102400
The script writes both files into the gitignored reports/ directory (regenerated on demand, never committed):
reports/perf-report.md — human-readable per-page table (alongside reports/seo-report.md, reports/a11y-report.md)reports/perf-trend.json — rolling history (last 30 runs) used by /anglesite:stats to surface regressions1.1 ships warn-only. Findings never block the deploy. Mention the result to the owner in plain language ("All pages within budget" or "Two pages over the JS budget — saved to reports/perf-report.md"), then continue. Once defaults are tuned (1.2), PERF_WARN_ONLY=false will let owners opt into a hard gate.
If PERF_LCP_CLS=true is set in .site-config, also run Lighthouse against the preview server. This requires npm install -D lighthouse (one-time). Start the preview server, run the audit, then stop the server:
npm run preview -- --port 4321 &
Wait a couple of seconds for it to come up, then run the audit:
npm run ai-perf -- --lighthouse --url http://localhost:4321 --warn-only
Then kill the background preview process.
If the owner passes --skip-perf, skip this step entirely.
If this is the first deploy, offer a choice:
Tell the owner: "Your site is ready to go online. Would you like to:"
Before proceeding with either choice, run through the pre-publish education checklist from ${CLAUDE_PLUGIN_ROOT}/docs/education-prompts.md section 5 ("Pre-Publish Checklist"). For each item (PREPUB_PURPOSE through PREPUB_GAPS), check .site-config for the EDUCATION_<KEY>=shown flag — only surface items the owner hasn't seen. Present them as a quick check-in, not a gate: "Before we go live, a few quick things worth checking..." Write the flags to .site-config after surfacing.
If they choose preview first, push the draft branch to GitHub:
git add -A
git commit -m "Preview: YYYY-MM-DD HH:MM"
git push origin draft
Tell the owner: "Once we connect Cloudflare in the next step, your preview will be at a link like draft.YOUR-PROJECT.workers.dev. Let's set that up now."
If they choose go live, continue to Step 3.
On subsequent deploys, skip this step.
Read CF_PROJECT_NAME from .site-config. If not set, ask the owner what to name the Cloudflare project (suggest a slugified version of their site name), then add CF_PROJECT_NAME=project-name to .site-config using the Write tool (update the existing file).
Then sync the project name into wrangler.jsonc so Wrangler deploys to the right Worker. Read wrangler.jsonc, replace the "name": "..." line with the chosen CF_PROJECT_NAME, and write the file back. The scaffolded default is "anglesite-site" and must be replaced before the first deploy.
Tell the owner: "Now I'll connect this project to your Cloudflare account. A browser window will open — sign in with the same Cloudflare account you set up in Step 0, then approve Wrangler's access."
Authenticate Wrangler (one-time, opens a browser):
npx wrangler login
If the environment can't open a browser (e.g., Claude Cowork without a desktop), fall back to an API token: tell the owner to open https://dash.cloudflare.com/profile/api-tokens, click Create Token, choose the Edit Cloudflare Workers template, and paste the token. Save it as CLOUDFLARE_API_TOKEN in their shell or in a .dev.vars file (gitignored). Wrangler will pick it up automatically.
Owners who use Cloudflare for both personal and work projects (agencies, freelancers, side projects) often have access to multiple accounts. Don't rely on whatever wrangler whoami happens to return — pick the account explicitly so future deploys can't silently land in the wrong place.
Enumerate the accounts the owner can deploy to. Cloudflare MCP tools are named by suffix because the server prefix varies by install — read ${CLAUDE_PLUGIN_ROOT}/docs/cloudflare-mcp.md once. Call accounts_list if it is available; otherwise run npx wrangler whoami, which prints each account's name and ID.
One account — use it. No need to ask.
Multiple accounts — present a numbered picker with each account's name and ID, e.g.:
Which Cloudflare account should this site live in?
1. Jane Smith (personal) — abc123…
2. Smith Studio LLC (business) — def456…
Wait for the owner to choose. If a set_active_account tool is available, call it with the chosen account ID.
Save the chosen account ID to .site-config using the Write tool (update the existing file, adding CLOUDFLARE_ACCOUNT_ID=<id>). All subsequent deploys validate against this value.
If the owner chose preview first in Step 2.5, upload a preview version (does not promote to production):
npx wrangler versions upload
Wrangler prints a preview URL of the form https://<hash>-<project>.<account>.workers.dev. Share it with the owner and wait for their approval before continuing.
Once approved (or if they chose go live), publish the production version:
npm run deploy
This runs npm run build && wrangler deploy. The site is live at CF_PROJECT_NAME.<account>.workers.dev.
Tell the owner: "Your website is live! Anyone can visit it at CF_PROJECT_NAME.<your-account>.workers.dev — and we'll attach your custom domain in the next step."
On subsequent deploys, skip to Step 7.
Ask: "Do you want a custom domain for your website — like www.yourbusiness.com — or is the .workers.dev address fine for now?"
If they want to skip, that's fine. They can add a domain later by running /anglesite:deploy and asking about it.
Read ${CLAUDE_PLUGIN_ROOT}/skills/deploy/domain-setup.md and follow the
instructions to buy, transfer, point, or reuse a domain, then save
SITE_DOMAIN and update local HTTPS.
Once the domain is on Cloudflare (purchased, transferred, or pointed), attach it to the Worker via the Cloudflare dashboard.
Tell the owner: "I'm opening the Cloudflare dashboard so we can connect your domain to your website."
Open the Worker's settings → Domains & Routes page: https://dash.cloudflare.com/?to=/:account/workers/services/view/CF_PROJECT_NAME/production/domains
(Replace CF_PROJECT_NAME with the actual value from .site-config.)
Walk them through:
www.example.com or example.com)Tell the owner: "Done — Cloudflare is connecting your domain and setting up SSL. This usually takes a minute or two."
Save SITE_DOMAIN to .site-config if not already saved.
Update the site configuration (astro.config.ts reads SITE_DOMAIN from .site-config automatically, so no manual edit needed):
public/robots.txt: add Sitemap: https://SITE_DOMAIN/sitemap-index.xmldocs/cloudflare.md: note the domain and DNS setupRebuild and redeploy with the correct URLs:
npm run deploy
git add -A
git commit -m "Add custom domain: SITE_DOMAIN"
git push origin draft
Tell the owner: "Your website is now live at your custom domain! SSL is handled automatically."
Tell the owner: "Try pasting your website URL into a text message or social media post draft — you should see a nice preview card with your site name and description. If it doesn't look right, we can adjust the preview image and description."
Skip this step if CF_WEB_ANALYTICS_TOKEN is already set in .site-config. Read ${CLAUDE_PLUGIN_ROOT}/skills/deploy/web-analytics.md and follow it.
Before running wrangler deploy, confirm the deploy will land in the account chosen in Step 3. Read CLOUDFLARE_ACCOUNT_ID from .site-config. If accounts_list is available, call it and check which account is currently active. If it is not, run npx wrangler whoami and check that the configured ID is among the accounts listed — if it is missing, the owner is signed in to the wrong Cloudflare login: stop and say so.
<active-name> (<active-id>), but this site was set up to deploy to <configured-name> (<configured-id>). I'll switch the active account back before publishing." Then call set_active_account (if available) with the configured ID and continue. If switching fails, stop and surface the error rather than guessing.CLOUDFLARE_ACCOUNT_ID not set (older sites set up before this check) — list the accounts as in Step 3. If exactly one account is returned, save it to .site-config and continue. If multiple, run the picker from Step 3 once, then continue.Commit all changes on draft:
git add -A
git commit -m "Publish: YYYY-MM-DD HH:MM"
Push draft to GitHub (off-site backup):
git push origin draft
Publish to Cloudflare via Wrangler:
npm run deploy
This rebuilds the site (astro build) and runs wrangler deploy, which uploads the Worker and the static assets in dist/ to Cloudflare. The deploy is atomic — visitors keep seeing the previous version until the new one is fully uploaded.
Then mirror the publish to main (kept for off-site backup parity, no longer triggers a build):
git checkout main
git merge draft --no-edit
git push origin main
git checkout draft
If wrangler deploy fails with an auth error, run npx wrangler login to refresh credentials, then retry.
If the GitHub push fails (e.g., auth expired), tell the owner: "I couldn't back up to GitHub — let's fix the connection." Run gh auth login --web to re-authenticate, then retry.
Tell the owner: "Your changes are live! They'll appear on the site in about a minute."
Each helper Worker (contact, forms, subscribe, membership, ecommerce, review) ships with [observability] enabled, so failed invocations are retained as logs in the Cloudflare dashboard. If a worker was deployed in this run, surface the matching logs URL so the owner has a single click to debug a "the form isn't working" report later.
Read CLOUDFLARE_ACCOUNT_ID from .site-config and substitute into:
https://dash.cloudflare.com/<account-id>/workers/services/view/<worker-name>/production/observability/logs
For each helper Worker that exists in worker/ (look up the name = "..." field), include one line in the summary:
contact-formforms-handlernewsletter-subscribeanglesite-membershipecommerce-webhooksreview-formFrame it plainly: "If a [feature] submission ever fails, you can see the error here: . Logs are kept for a few days." Don't dump all six links if the site only uses one — only list workers actually deployed.
What SKILL.md sets; muted values are Claude Code's defaults
Use when the owner asks to publish, launch, go live, deploy, or push changes to their live website.
Three short reads, in order
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