using-git-worktrees

Create isolated git worktrees with directory selection and safety checks.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/donellmccoy/ECTSystem --skill using-git-worktrees-donellmccoy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/donellmccoy/ECTSystem/tree/main/.github/skills/using-git-worktrees
Command: npx skills add https://github.com/donellmccoy/ECTSystem --skill using-git-worktrees-donellmccoy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the process of creating isolated git worktrees to separate feature work from the main branch, ensuring clean workspaces and easy cleanup prior to implementing new changes.

Core Features & Use Cases

  • Smart Directory Selection: follows a clear priority to locate or suggest an isolated worktree location (.worktrees, worktrees, CLAUDE.md preference, then user input).
  • Safety Verification: confirms the chosen directory is ignored by Git to prevent accidental commits of worktree contents.
  • Automatic Project Setup & Validation: auto-detects the project type (for example .NET, Node) and runs the appropriate setup commands, followed by a clean baseline test.
  • Use Case: When starting a new feature across multiple branches, spin up an isolated workspace, apply changes, test, and then discard or merge the worktree.

Quick Start

Use the using-git-worktrees skill to set up an isolated workspace for your feature work. The skill will detect existing worktrees, verify ignore rules, create a new worktree in the preferred location, auto-detect project setup commands, and verify a clean baseline.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
How do I create an isolated git worktree for feature development?

To create an isolated git worktree, the skill discovers an appropriate directory, verifies it is gitignored for safety, creates the worktree, and runs project-specific setup commands. This safely separates feature work from your main branch in a clean workspace.

What is the safest directory location for git worktrees?

The safest directory locations for git worktrees are folders explicitly ignored by Git, such as `.worktrees` or `worktrees`. The skill prioritizes these directories or checks CLAUDE.md preferences to prevent accidental commits of worktree contents.

Can I auto-detect and run project setup commands after creating a git worktree?

Yes, after creating a git worktree, the skill auto-detects your project type, such as .NET or Node, and runs the appropriate setup commands. It then validates the workspace by executing a clean baseline test to ensure everything is ready.

Does git worktree creation work with multi-branch development workflows?

Yes, git worktree creation is designed for multi-branch development workflows. It guides directory selection, performs safety verification against gitignore rules, and sets up an isolated workspace so you can apply changes and test across branches without affecting the main repository.

Why should I verify gitignore rules before setting up a git worktree?

You must verify gitignore rules before setting up a git worktree to prevent accidental commits of worktree contents into your repository. This safety check ensures the isolated worktree directory remains completely separate from version control tracking.