/anglesite:updatefrom anglesite
Updates an Anglesite site to the latest template version and dependencies, including npm updates and Astro checks. Use for maintenance, dependency fixes, or security updates.
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.
None: SKILL.md is the whole skill.
Update the owner's site to the latest Anglesite template and dependencies. This is the ongoing maintenance command — safe, incremental, and explained in plain English.
Read 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. If false, proceed without pre-announcing tool calls.
Read .site-config and confirm the site was scaffolded with Anglesite (ANGLESITE_VERSION should be present). If ANGLESITE_VERSION is missing, the site predates version tracking — tell the owner: "This is your first update — I'll set up version tracking so future updates are even smoother." Proceed normally; the script will treat the site as version 0.0.0.
Run a baseline build to make sure the site is healthy before making changes:
npm run build
If the build fails, stop and fix it first. Don't update a broken site — tell the owner: "Let's fix this build issue before updating. You can run /anglesite:check to diagnose it."
Before changing anything, save the site exactly as it is so the update can be undone. Tell the owner: "First I'll save a snapshot of your site as it is right now, so we can go back if anything goes wrong."
Check which branch is active — the owner's work lives on draft, and this skill never commits to main:
git rev-parse --abbrev-ref HEAD
If it isn't draft, switch to it:
git checkout draft
If that fails because draft doesn't exist yet, create it:
git checkout -b draft
Then check for unsaved work:
git status --porcelain
If the output is empty, the last saved snapshot is already the restore point — skip the commit. Otherwise commit everything:
git add -A
git commit -m "Pre-update snapshot — YYYY-MM-DD"
Replace YYYY-MM-DD with today's date. Don't push — Step 6 saves the finished update.
To undo the update (any time before Step 6), stage everything so newly added files are included:
git add -A
Restore the snapshot:
git restore --source=HEAD --staged --worktree -- .
Then reinstall the packages the snapshot expects:
npm install
To undo a single changed file instead, run git restore --source=HEAD --staged --worktree -- <path> with that file's path.
Run the update comparison script to see what's changed between the site and the latest template:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/update.sh" .
The script outputs a categorized file list:
A path — New file in the template that the site doesn't have yet. Safe to add.= path — Identical to the template. Already up to date. Nothing to do.M path — Modified — the site's version differs from the template. Could be a user customization, a template improvement, or both. Needs careful review.Parse the output and group files by category.
A)Add all new template files to the site. These are files that didn't exist when the site was scaffolded — new scripts, docs, or config improvements.
For each new file, copy it from the template:
${CLAUDE_PLUGIN_ROOT}/template/<path>./<path> in the site directoryTell the owner what was added: "I've added [N] new files that weren't in your original setup — [brief description of what they do]."
M)This is the careful part. For each modified file, determine whether the difference is:
User customization — The owner (or their agent) changed this file on purpose. Examples: src/styles/global.css (brand colors), src/layouts/BaseLayout.astro (custom layout), src/pages/*.astro (custom pages), content files in src/content/.
Outdated template code — The file hasn't been touched by the owner but differs because the template was improved. Examples: scripts/setup.ts, scripts/check-prereqs.ts, docs/workflows/*.md.
Both — The template improved AND the owner customized the file.
To tell the difference:
Rules for modified files:
| File type | Action |
|---|---|
src/styles/global.css | Never overwrite. Contains brand colors and custom styles. If the template added new utility classes or fixed a bug, add only those specific changes. |
src/layouts/*.astro | Merge carefully. Preserve the owner's structure. Add new template features (accessibility improvements, meta tags) without replacing custom layout. |
src/pages/*.astro | Never overwrite. These are the owner's pages. Only update if the page is completely unmodified from the template. |
src/content/** | Never overwrite. This is the owner's content. |
scripts/*.ts | Safe to update unless the owner has customized them (rare). Replace with template version. |
docs/** | Safe to update. These are reference docs. Replace with template version. But preserve docs/brand.md, docs/architecture.md, and any other site-specific docs. |
package.json | Merge dependencies. Don't replace the whole file — update dependencies and devDependencies versions to match the template. Preserve any packages the owner added. |
astro.config.ts | Merge carefully. The owner may have added integrations. Update template portions, preserve additions. Two template settings are required — add each if missing, whatever else the owner changed: (1) session: { driver: sessionDrivers.lruCache() } in defineConfig, with sessionDrivers added to the astro/config import — without it the Cloudflare adapter adds a SESSION KV binding that duplicates every kv_namespaces entry in wrangler.jsonc, and Wrangler refuses to run once any KV namespace is bound; (2) the sitemap filter that skips /ab/ pages (A/B variant pages). |
wrangler.jsonc | Merge carefully — never overwrite. It holds the owner's Worker name, SITE_URL, and every binding id the skills filled in (KV, D1, R2, queues). Preserve all of those, including blocks the owner's site has uncommented, and apply only additive template changes. The required addition is the run_worker_first array inside the assets block, copied exactly from ${CLAUDE_PLUGIN_ROOT}/template/wrangler.jsonc ("/*" plus the ! exclusions for build output, images, fonts, and static file types) — without "/*" Cloudflare serves built pages directly and worker/site-entry.js (membership gate, A/B routing, consent geo) never sees them; without the exclusions every image invokes the Worker and counts toward the plan's daily request limit. Add it if the assets block has no run_worker_first. If the site has the older two-entry form ["/*", "!/_astro/*"], replace it with the template's list; leave any other owner-edited value alone. Also copy over any commented-out binding blocks the template added (e.g. the EXPERIMENTS / ANALYTICS block) when the site has neither the commented nor the live form. Tell the owner the site needs a redeploy for the change to take effect. |
keystatic.config.ts | Merge carefully. The owner may have added or modified content collections. Update template portions, preserve additions. |
worker/*.toml | Merge carefully. The owner has pasted real ids into these (KV namespace ids, D1 database_id, account names, SITE_DOMAIN, etc.) — never overwrite. Read both versions, preserve every owner-supplied value, and apply only the additive template changes. The current required addition is an [observability] block (enabled = true, head_sampling_rate = 1.0) right after compatibility_date — add it if missing. If the file is otherwise identical to the template apart from owner-supplied ids, that's expected; don't flag it. Tell the owner the worker needs a redeploy for changes to take effect. |
.gitignore | Append only. Add new entries from the template without removing existing ones. |
Config files (tsconfig.json, etc.) | Safe to update unless customized. |
For each modified file you update, keep a note of what changed for the summary.
For files you skip (user customizations), note them too — the owner should know what was left alone and why.
Check for outdated packages:
npm outdated
Update dependencies to match the template's package.json versions:
npm install
If the template has newer dependency versions than the site, update them. For each package:
npm install package@version
Use the exact versions from the template's package.json (${CLAUDE_PLUGIN_ROOT}/template/package.json), not @latest — the template versions are tested together.
After updating, check for security issues:
npm audit
If npm audit finds vulnerabilities, try npm audit fix. Report anything that can't be auto-fixed.
Run the full build to make sure nothing broke:
npx astro check
npm run build
If the build fails after updates:
git restore command from "Safety snapshot" in Step 0 (for a dependency, restore package.json and package-lock.json, then run npm install). If you can't isolate the cause, undo the whole update with the full restore sequence from the same section.Update ANGLESITE_VERSION in .site-config to the current plugin version. Read the version from ${CLAUDE_PLUGIN_ROOT}/package.json.
Use the Edit tool to update .site-config — read the current contents and replace the ANGLESITE_VERSION line (add it if it's missing), leaving every other line as it is.
In the same edit, update the maintenance log: set MAINTENANCE_QUARTERLY_LAST to today's date in YYYY-MM-DD format, and also refresh MAINTENANCE_MONTHLY_LAST (running /anglesite:update exercises the build and dependency checks that the monthly health pass would cover). If today is on or after the existing MAINTENANCE_ANNUAL_LAST plus 365 days — or if MAINTENANCE_ANNUAL_LAST is missing — also stamp MAINTENANCE_ANNUAL_LAST and walk the owner through the annual checklist yourself (see docs/webmaster.md → "Annually"). The owner should never be asked to read a doc; you read it and surface concrete recommendations:
SITE_DOMAIN from .site-config. Remind the owner to check when the registration renews (Cloudflare emails reminders, but flag it now) — the date is in their Cloudflare dashboard under Domain Registration..site-config (e.g., BOOKING_PROVIDER, ECOMMERCE_PROVIDER, NEWSLETTER_PROVIDER) and ask: "Are you still using each of these? I can wire down anything you've stopped using."Frame it as a short conversation, not homework. See docs/webmaster.md → Maintenance schedule for what each stamp covers.
Commit the finished update to draft (the branch Step 0 switched to):
git add -A
git commit -m "Update: Anglesite <old-version> → <new-version>"
Replace <old-version> and <new-version> with the actual versions from the comparison output.
Present a plain-English summary. No file paths, no package names, no version numbers in isolation. Translate everything into what it means for their site.
Template:
"I've updated your website from version [old] to [new]. Here's what changed:
Added:
Updated:
Left alone (your customizations):
Security:
Your site builds successfully and everything looks good. Want me to deploy the update?"
If nothing meaningful changed (site was already up to date), keep it short: "Your site is already up to date — no changes needed."
If template docs were updated, the site's docs/ directory may have new or updated workflow guides. Mention this to the owner: "I also updated your documentation with the latest guides."
What SKILL.md sets; muted values are Claude Code's defaults
Use when the owner asks to update the site, get the latest Anglesite features, or fix outdated dependencies or security warnings.
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