---
name: sync-backup
description: Mirror the claude.ai account skill library into this repo and push a semantic changelog commit. Use when asked to sync, back up, or refresh the skill mirror, or when /sync-backup is invoked in this repo.
---

# sync-backup

One-way mirror: claude.ai account skills (materialized at ~/.claude/skills at session start) into this repo's root. A repo write never changes the live library; restore is a manual zip upload (see README.md).

1. Run `.claude/skills/sync-backup/sync.sh`. It copies the library, removes mirrored folders that vanished, stages everything, and prints the staged diffstat. Exit 3 means nothing real changed: stop and report that.
2. Read `git diff --cached` closely enough to describe the changes per skill in substance.
3. Write a semantic commit message: a summary first line, then a body listing each skill added, changed, or removed and what actually changed. Never "update files".
4. Commit and push: `.claude/skills/sync-backup/sync.sh push <<'EOF'` ... `EOF`. The script commits the staged changes, pushes with retries, and verifies the remote ref matches local HEAD. Report the VERIFIED line; anything else is a failure to surface.

Caveats: only skills enabled at session start are materialized, so a disappeared folder may mean disabled rather than deleted; say so in the commit message instead of asserting deletion. A skill the user uploads mid-session appears only in the next session's sync.
