integrate-worktrees

Installation
SKILL.md

Skill: integrate-worktrees

Purpose

Closes out a batch of worktrees from the main repo: scan all active linked worktrees, let the user pick which to land, verify all picks are clean, merge and push each in sequence, then remove all successfully-merged worktrees together. Eliminates the need to cd into each worktree directory and invoke a per-branch delivery.


Core Objective

Primary goal: From the main repo on the main branch, land the user-selected worktree branches onto main, deliver them to origin, and clean up succeeded ones — leaving the repository in a known-clean state.

Success Criteria (all must be satisfied):

  1. Invocation context verified: CWD is the main repo root (not inside a linked worktree) and current branch is the main branch
  2. All linked worktrees discovered: git worktree list --porcelain parsed; non-main entries presented to user
  3. Pre-flight completed before any merge: All selected worktrees checked for clean working tree; all dirty ones reported upfront in one block
  4. Sequential merge + push: Each selected clean worktree merged with --no-ff and pushed; per-worktree status (succeeded / failed) recorded
  5. Unified cleanup: All succeeded worktrees removed together; no failed worktree is removed
Related skills
Installs
4
GitHub Stars
7
First Seen
6 days ago