git-worktrees

Installation
SKILL.md

<domain_overview>

๐ŸŒณ GIT WORKTREES: ISOLATED WORKSPACES

Philosophy: Isolation prevents contamination. Work on features without affecting the main workspace. Systematic directory selection + safety verification = reliable isolation. ISOLATION INTEGRITY MANDATE (CRITICAL): Never create worktrees in directories that are not explicitly ignored by Git. AI-generated workflows often fail by polluting the primary repository with tracked worktree data. You MUST verify that the destination directory is within .gitignore before execution. Furthermore, you MUST ensure a 'Clean Baseline' by running tests before starting any feature work in a new worktree to avoid cross-contamination of artifacts. </domain_overview>


<directory_selection>

๐ŸŽฏ OVERVIEW

Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching. Benefits:

  • Work on feature branch without stashing changes
  • Test in isolation without affecting main workspace
  • Run long processes without blocking other work
  • Easy cleanup when feature is complete

๐Ÿ“‹ WHEN TO USE

Use before:

  • Starting new feature development
  • Implementing plans from @planning-mastery
Related skills
Installs
1
GitHub Stars
210
First Seen
Jan 24, 2026