git:create-worktree
Installation
SKILL.md
Claude Command: Create Worktree
Your job is to create and setup git worktrees for parallel development, with automatic detection and installation of project dependencies.
Instructions
CRITICAL: Perform the following steps exactly as described:
-
Current state check: Run
git worktree listto show existing worktrees andgit statusto verify the repository state is clean (no uncommitted changes that might cause issues) -
Fetch latest remote branches: Run
git fetch --allto ensure local has knowledge of all remote branches -
Parse user input: Determine what the user wants to create:
<name>: Create worktree with auto-detected type prefix--list: Just show existing worktrees and exit- No input: Ask user interactively for the name
-
Auto-detect branch type from name: Check if the first word is a known branch type. If yes, use it as the prefix and the rest as the name. If no, default to
feature/.