git-worktrees

Create isolated Git worktrees with safety checks and directory selection.

230|34|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/xenitV1/claude-code-maestro --skill git-worktrees-xenitv1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktrees
Source: https://github.com/xenitV1/claude-code-maestro/tree/main/skills/git-worktrees
Command: npx skills add https://github.com/xenitV1/claude-code-maestro --skill git-worktrees-xenitv1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolates development work by creating dedicated Git worktrees so feature work does not pollute the main working directory.

Core Features & Use Cases

  • Safe, project-local worktrees for feature development without impacting main branches
  • Automatic directory selection with priority: existing worktrees, CLAUDE.md preference, or user prompt
  • Safety verifications to ensure directories are ignored, and enforce a clean baseline via tests
  • Cross-platform support for Unix and Windows

Quick Start

Create a new worktree for a feature branch named feature/auth: git worktree add .worktrees/auth -b feature/auth cd .worktrees/auth Run project setup and validations as needed prior to development.

Frequently Asked Questions about git-worktrees

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I isolate feature development work from my main Git repository?

Git worktrees isolate feature development by creating dedicated working directories, preventing contamination of the main repository. This ensures parallel feature work does not pollute your primary branch.

What is the best way to manage multiple Git branches for parallel feature development?

Git worktrees manage parallel feature development by creating isolated working directories for each branch. They enforce safety verifications and directory selection to maintain a clean baseline across Unix and Windows environments.

How do I safely create a Git worktree without breaking my current project state?

Safely create a Git worktree by enforcing safety checks, directory selection, and baseline test verifications beforehand. The system prioritizes existing worktrees, CLAUDE.md preferences, or user prompts to ensure directories are properly ignored.

Does Git worktree workflow support both Unix and Windows environments?

Yes, Git worktree workflows support cross-platform development across both Unix and Windows environments. This ensures consistent isolation, safety checks, and baseline verifications regardless of your operating system.

Why do I need to verify a clean baseline before adding a new Git worktree?

Verifying a clean baseline before adding a Git worktree ensures your target directories are ignored and prevents repository contamination. This safety check guarantees your isolated worktree starts from a stable, validated project state.

Can I use CLAUDE.md to specify directory selection when creating a Git worktree?

Yes, you can use CLAUDE.md to specify directory selection when creating a Git worktree. The system applies automatic directory selection prioritizing existing worktrees, CLAUDE.md preferences, and then user prompts.