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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user