/anglesite:backupfrom anglesite
Commits all changes to a draft branch and pushes to GitHub, or restores a previous snapshot. Useful for saving work or undoing changes.
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.
Save the owner's work by committing all changes and pushing to GitHub, or restore a previous snapshot if something went wrong. Never pushes to main — that's the deploy skill's job.
If the owner asks to "restore", "roll back", "go back to a previous version", "undo my changes", "recover", or otherwise wants to retrieve an earlier state, jump to the Restore flow below. Otherwise continue with the backup steps.
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 in plain English. If false, proceed without pre-announcing tool calls.
git status --porcelain
If the output is empty, tell the owner: "Everything is already backed up — no new changes to save."
If there are changes, continue to Step 1.
Read the git status --porcelain output and categorize the changes (scripts/backup-summary.ts holds the same rules as a library — it is not a CLI, so don't run it):
src/content/posts/src/pages/ (use the page name, not the file path)src/content/<collection>/ (services, team, testimonials, gallery, events, faq)src/styles/src/layouts/.site-config, astro.config.ts, keystatic.config.tsTell the owner what changed in plain language before committing. For example: "You've made these changes since your last backup: 2 new blog posts, updated About page, and some style tweaks. I'll save all of this now."
Never commit or push to main. Check the branch before staging anything:
git rev-parse --abbrev-ref HEAD
If it prints main, tell the owner: "You're on the production branch. Let me switch to the draft branch first." Then switch (uncommitted changes come along):
git checkout draft
If draft doesn't exist yet:
git checkout -b draft
Stage all changes:
git add -A
Generate a descriptive commit message from the changes. Use a human-readable format, not generic messages like "updated files". Examples:
Commit with the generated message:
git commit -m "MESSAGE"
Push to the draft branch only:
git push origin draft
If the push fails (auth expired), tell the owner: "I couldn't connect to GitHub — let's fix that." Run gh auth login --web and retry.
Read GITHUB_REPO from .site-config. Tell the owner:
"Your site is backed up! Here's what was saved: [plain-language summary of changes]."
"Your backup is on GitHub: https://github.com/GITHUB_REPO"
Include the date: "Last backup: [today's date and time]."
If the owner asks to see their backup history, show recent commits:
git log --oneline -10 --format="%h %ar — %s"
Present the results in plain language: "You have [N] backups. Here are the most recent ones:" followed by a readable list.
Read GITHUB_REPO from .site-config and remind them: "All your backups are safe on GitHub: https://github.com/GITHUB_REPO"
Use this when the owner wants to roll back to an earlier snapshot — for accidental deletions, a bad import, a broken design experiment, or any "I want to go back to how it was yesterday" request.
Restore touches src/content/ and public/ only. Code, configuration, and dependencies (src/pages/, src/layouts/, astro.config.ts, package.json, .site-config) are left alone, since rolling those back would usually break the build.
Pull the latest from GitHub so the snapshot list reflects all backups, not just local ones:
git fetch origin
If fetch fails (auth expired, no network), tell the owner what happened in plain English and stop — restoring against stale local history would hide their newest backups.
Show the owner the most recent backups on draft plus any tags:
git log --format="%h | %ar | %s | %D" -25 origin/draft
Each line is short hash, relative date, subject, and any tags or branch names.
Present the list to the owner with one line per snapshot: relative date, commit subject, and short hash. Example:
1. 2 hours ago — Update About page (a1b2c3d)
2. yesterday — Add 3 blog posts (e4f5g6h)
3. 3 days ago — Initial setup (i7j8k9l) [tag: v1.0]
Ask which snapshot they want to restore. Accept either the number from the list or the short hash. If the owner is unsure, offer to git show --stat <hash> for more detail.
Before any files change, show what the restore would do. Compare the chosen snapshot against the current working tree, scoped to content and public assets:
git diff --stat HEAD <snapshot> -- src/content/ public/
If the diff is empty: tell the owner the snapshot already matches their current state and stop — there's nothing to restore.
If the diff is large (more than ~30 files), summarize by category instead of dumping the full list. Always include:
Tell the owner exactly what will happen, in plain language, and wait for a clear yes:
"I'm about to replace your current
src/content/andpublic/files with the versions from [date / message]. That means [N] files will change, and [M] files you've added since then will be removed. I'll save your current state to a recovery branch first so we can undo this if needed. Should I proceed?"
Do not proceed on a vague answer ("ok", "sure, but…"). Ask again until you get an unambiguous yes.
Make sure the owner is on draft. If they're on main, switch first (same rule as backup — never restore over main directly):
git checkout draft
If the working tree has uncommitted changes, commit them so they're recoverable:
git add -A
git commit -m "Pre-restore snapshot — YYYY-MM-DD"
Create a recovery branch pointing at the current draft tip so the owner can return to "now" if the restore looks wrong. Name it recovery/YYYY-MM-DD-HHMM from the current UTC time (e.g. recovery/2026-05-06-1530):
git branch <recovery-branch> draft
Tell the owner the recovery branch name. They will need it if they want to undo.
Replace src/content/ and public/ with the snapshot versions:
git checkout --no-overlay <snapshot> -- src/content/ public/
--no-overlay is required: without it, files added since the snapshot are left in place and the restore won't match what the owner confirmed. Verify before committing — this must print nothing:
git diff --stat <snapshot> -- src/content/ public/
Stage and commit so the restore is itself a backup-able event:
git add -A src/content/ public/
git commit -m "Restore src/content/ and public/ from <short-hash> (<snapshot subject>)"
Push to draft so the restore is mirrored to GitHub:
git push origin draft
Tell the owner:
<recovery-branch>) was created in case they want to undo/anglesite:backup and ask me to restore the recovery branch — I'll know what to do."npm run dev (or open the preview) to confirm the site looks right before deployingRemind them that the restore only changed content and public assets — code and configuration are untouched.
If the owner asks to undo a recent restore, treat the recovery branch like any other snapshot: list it, preview the diff against the current tree, confirm, and apply. The recovery branch is a regular git branch — git log <recovery-branch> shows its history.
main. Always operate on draft.src/pages/, src/layouts/, astro.config.ts, keystatic.config.ts, package.json, .site-config). If the owner specifically wants those rolled back, treat it as a separate request and confirm each path explicitly — these can break the build.git push is rejected, stop and ask the owner before doing anything destructive.What SKILL.md sets; muted values are Claude Code's defaults
Use when the owner asks to save or back up their work, see what changed, undo recent changes, or restore an earlier version of the site.
Three short reads, in order
npx claudepluginhub anglesite/anglesite-skills --plugin anglesite56 skills in this plugin
/business-infoCollect and display business hours, address, phone, and LocalBusiness JSON-LDOther plugins' skills for the same job