fix(skills): discover worktree branches dynamically in worktree-update

The skill previously relied on the agent hardcoding branch names,
which missed non-standard branches like planning. Now explicitly
instructs the agent to use git worktree list for discovery.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-14 09:48:26 +01:00
co-authored by Claude Opus 4.6
parent 3671fceeb8
commit 82bb6289c7
+7 -1
View File
@@ -44,10 +44,16 @@ Branch determines the mode: `main` → outbound sync, anything else → inbound
git fetch --all
```
Discover all worktree branches (excluding `main` itself):
```bash
git worktree list | grep -v '\[main\]' | sed 's/.*\[//;s/\]//'
```
For each worktree branch, check if it has commits ahead of main:
```bash
git rev-list --count main..<branch>
git rev-list --count main..origin/<branch>
```
Skip branches with 0 commits ahead. For branches that ARE ahead, collect: