using-git-worktrees

Create isolated Git worktrees with automated setup and baseline verification.

66|20|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/cooker/wxHm --skill using-git-worktrees-cooker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/cooker/wxHm/tree/main/.cursor/skills/using-git-worktrees
Command: npx skills add https://github.com/cooker/wxHm --skill using-git-worktrees-cooker

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the creation of isolated Git worktrees to keep feature development separate from the main workspace, preventing accidental changes to the primary branch.

Core Features & Use Cases

  • Directory-first selection: Prefers hidden .worktrees when present, then worktrees, and finally prompts for location via CLAUDE.md or user input.
  • Safety verification: Ensures worktrees are ignored by gitignore and validates baseline tests before use.
  • Deterministic setup: Creates a worktree at a predictable path based on project name and branch, then runs project setup automatically if relevant files are detected.

Quick Start

Create the isolated worktree following the priority: .worktrees, worktrees, or global path; verify ignore status; then run the project setup and baseline checks.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
How do I isolate feature development in Git without affecting my main working tree?

Git worktrees allow you to create isolated working directories linked to the same repository. This skill automates creating Git worktrees at deterministic paths, ensuring feature development runs safely away from your primary branch.

How do I create a Git worktree and run project setup automatically?

To create a Git worktree automatically, this skill selects a project-local or global location, verifies ignore status, creates the worktree at a predictable path, and runs detected project setup files with baseline checks.

Why does my Git worktree show up as an untracked file in the main repository?

Git worktree directories must be listed in your gitignore to prevent them from appearing as untracked files. This skill uses git check-ignore to verify your worktree path is ignored and guides you to fix the gitignore if needed.

What is the best way to manage multiple worktree locations in a development workflow?

Managing multiple worktree locations is handled by prioritizing hidden .worktrees directories, then a standard worktrees folder, and finally global paths configured via CLAUDE.md or user input for predictable project isolation.

Do I need to configure CLAUDE.md to use automated Git worktrees?

You do not need to configure CLAUDE.md to use Git worktrees. The skill defaults to local .worktrees or worktrees directories, using CLAUDE.md only as an optional preference for specifying global worktree locations.