.claude/skills/sync-all/SKILL.md
Fetch, merge origin into master, merge worktree work into master, sync all worktrees. NEVER pushes.
npx skillsauth add the-agency-ai/the-agency .claude/skills/sync-allInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Fetch, merge origin into master, merge unique worktree work into master, and sync all worktrees. This is the daily rhythm command. NEVER pushes to remote. NEVER rebases. NEVER resets to origin.
git rev-parse --abbrev-ref HEAD must return master (or main).Run git fetch origin.
Check if master has diverged from origin/master:
git log --oneline origin/master..master — local-only commitsgit log --oneline master..origin/master — remote-only commitsIf diverged (squash PR scenario):
git merge-base origin/master HEAD. If this fails (exit code 1 — no common ancestor), ABORT: "ERROR: No common ancestor. Run git merge --allow-unrelated-histories origin/master manually."git tag sync/pre-merge-$(date +%Y%m%d-%H%M%S)git merge origin/master -m "Merge origin/master (post-squash-PR sync)"git merge --abort, report, ask user. Do NOT auto-resolve.git merge master.If behind only: git merge origin/master
Never git reset --hard origin/master. Never git rebase origin/master. See claude/REFERENCE-GIT-MERGE-NOT-REBASE.md.
Run git worktree list. For each worktree:
For each worktree with commits ahead of master:
git merge {branch} --no-ffIf any worktree work was merged in Step 5, dispatch main-updated to all agents that have worktrees:
For each worktree agent that was synced:
./claude/tools/dispatch create --type main-updated --to {repo}/{principal}/{agent} --subject "Main updated — new work merged"
This notifies agents that main has new content. They'll see it on their next iscp-check.
For each worktree:
git -C {worktree-path} merge master to pick up new workPresent a status table:
Sync complete:
Worktree Branch Status Merged Synced
──────────────────────────────────────────────────────────────────
fix-auth fix-auth clean 3 commits yes
proto-tooling proto/tooling dirty skipped yes
Locate the captain handoff file (glob usr/*/captain/handoff.md). Update with sync status (lightweight update — just what happened, not a full rewrite).
business
Sync worktree with master — merge, copy settings, run sandbox-sync, report changes
tools
List all git worktrees with status info (branch, clean/dirty, deps)
tools
Remove a git worktree and optionally delete its branch
development
Create a new git worktree with dedicated branch and bootstrapped dev environment