Shared worktree management operations. Use when creating worktrees, cleaning up branches, or checking for orphaned worktrees.
Shared utilities for worktree management.
IMPORTANT: See the Filesystem Scope section in
CLAUDE.md.
All scripts live in this skill's scripts/ directory.
Create a new worktree and branch for feature development.
scripts/create-worktree.sh <branch-name>
42-add-feature).worktrees/<branch-name> directorycleanup-merged-worktrees.sh as pre-flight to auto-clean stale worktreesAutomatically clean up worktrees whose associated PRs have been merged.
scripts/cleanup-merged-worktrees.sh
.worktrees/ for branches with merged PRsin-progress labelcreate-worktree.sh pre-flightClean up a worktree and its remote branch after PR merge.
scripts/cleanup-worktree.sh <branch-name>
Detect if the current directory is inside a git worktree.
scripts/detect-worktree.sh
{"in_worktree": true|false, "branch": "<name>"}in_worktree: false)/lead Phase 0 for worktree detectionCheck for orphaned worktree directories not tracked by git.
scripts/check-orphaned-worktrees.sh