From compound-workflows
Retry a deferred worktree merge — used when compact-prep's merge couldn't complete
npx claudepluginhub adamfeldman/compound-workflows --plugin compound-workflowsThis skill uses the workspace's default tool permissions.
Merge an unmerged session worktree branch into main. Used when compact-prep's merge step couldn't complete (dirty main, retry exhaustion, user aborted conflict resolution).
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Merge an unmerged session worktree branch into main. Used when compact-prep's merge step couldn't complete (dirty main, retry exhaustion, user aborted conflict resolution).
<branch_name> #$ARGUMENTS </branch_name>
Run git worktree list and filter for entries whose path contains .worktrees/session- (session worktrees use the session- prefix). For each session worktree, check if its branch has unmerged commits:
git worktree list
# Filter output: only lines containing .worktrees/session-
# For each matching worktree, extract branch name and check:
git log main..<branch> --oneline | head -1
Worktrees whose branch has unmerged commits (non-empty git log output) are candidates.
<name> into main."Verify CWD is the main repo (not inside a worktree). If inside a worktree, warn: "Cannot merge from inside a worktree. Exit the worktree first." Stop.
To check: git rev-parse --show-toplevel should NOT contain .worktrees/session-.
Extract the session worktree name from the branch. For session worktrees, the branch name
IS the worktree name (e.g., branch session-hb4a = worktree .worktrees/session-hb4a).
Store this for metadata cleanup in Step 5.
Capture the Claude PID for concurrent-session safety, then run the merge:
# In a separate Bash call first:
echo $PPID
# Read the output as <claude-pid>
CALLER_PID=<claude-pid> bash ${CLAUDE_SKILL_DIR}/../../scripts/session-merge.sh <branch>
Replace <branch> with the selected branch name from Step 2 and <claude-pid> with the PID captured above.
git add . then git commit --no-edit to finalize the merge.
Then clean up session metadata:
rm -rf .worktrees/.metadata/<session-name> (where <session-name> is from Step 4).
If aborted: git merge --abort and announce "Worktree preserved. Run /do:merge to retry."
Skip metadata cleanup — the worktree still exists and may be resumed./do:merge again."--skip-overlap: CALLER_PID=<claude-pid> bash ${CLAUDE_SKILL_DIR}/../../scripts/session-merge.sh <branch> --skip-overlap
(lets git attempt the merge; may still result in conflicts handled by exit 2)