Worktree Skill
Manage git worktrees for parallel development.
Scripts
setup-worktree.sh
Sets up a new worktree with environment files and dependencies.
Usage:
bash
bash .claude/skills/worktree/scripts/setup-worktree.sh <worktree-path> <main-repo-path>
Example:
bash
bash .claude/skills/worktree/scripts/setup-worktree.sh .worktrees/my-feature $(pwd)
What it does:
- •Copies
.envfrom root (if exists) - •Copies
apps/website/.env(if exists) - •Copies any other
apps/*/.envfiles - •Runs
pnpm install
Usage via Command
Use the /worktree command to create and set up a worktree automatically:
code
/worktree feature/my-branch
Manual Worktree Commands
bash
# List worktrees git worktree list # Remove a worktree git worktree remove .worktrees/<branch-name> # Prune stale worktrees git worktree prune