skills/using-git-worktrees/SKILL.md
Use when starting feature work that needs isolation from current workspace or before executing implementation plans
npx skillsauth add kienbui1995/magic-powers using-git-worktreesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
Core principle: Systematic directory selection + safety verification = reliable isolation.
Follow this priority order:
ls -d .worktrees 2>/dev/null # Preferred (hidden)
ls -d worktrees 2>/dev/null # Alternative
If found, use that directory. If both exist, .worktrees wins.
Look for worktree directory preferences in project configuration.
mkdir -p .worktrees
# Create branch and worktree
git worktree add .worktrees/<feature-name> -b <feature-branch>
# Verify
cd .worktrees/<feature-name>
git branch # Should show feature branch
pwd # Should be in worktree
After creating, verify:
After merging:
git worktree remove .worktrees/<feature-name>
git branch -d <feature-branch>
content-media
Use when designing for XR (AR/VR/MR), choosing interaction modes, or adapting 2D UI patterns for spatial computing
testing
Use when creating new skills, editing existing skills, or verifying skills work before deployment
development
Use when you have a spec or requirements for a multi-step task, before touching code
development
Use when executing a structured workflow — select and run a feature, bugfix, refactor, research, or incident template with correct agent and model assignments per phase.