/worktree-merge
Agent skill wrapper for the Claude command /worktree-merge.
When the original command text references {{INPUT}}, $1, or named arguments, map them from the user's current request.
Command Instructions
Merge all git worktrees under the .trees/ directory into the current branch.
Steps
- Run
git worktree listto identify worktrees in.trees/. - For each worktree (in alphabetical order): a. Get its branch name from
git worktree list. b. Rungit merge <branch> --no-edit. c. If conflicts arise, analyze and resolve them, preferring to combine both sides when possible. d. After successful merge, rungit worktree remove <path>andgit branch -d <branch>. - Verify final state with
git statusandgit log --oneline -n 10.
{{INPUT}}