using-git-worktrees

Create isolated git worktrees for feature branches with safety checks.

5|1|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/ed3dai/ed3d-plugins-testing --skill using-git-worktrees-ed3dai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/ed3dai/ed3d-plugins-testing/tree/main/plugins/ed3d-plan-and-execute/skills/using-git-worktrees
Command: npx skills add https://github.com/ed3dai/ed3d-plugins-testing --skill using-git-worktrees-ed3dai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees let you work on multiple branches simultaneously without switching the main workspace. This skill automates the creation and management of isolated worktrees with smart directory selection and safety verification to prevent accidental commits of worktree contents.

Core Features & Use Cases

  • Directory selection priority: prefer .worktrees, then worktrees, then CLAUDE.md preferences; prompts if needed.
  • Safety verification: verify .gitignore includes the worktree path; commit changes if needed to keep worktree content out of the main repo.
  • Deterministic creation: detect project name, choose path per location, create a new worktree with git worktree and switch to it; optionally run project setup commands.
  • Use case: create a feature-workspace separate from main development, test a change in isolation, and then merge back.

Quick Start

Set up an isolated git worktree for a new feature branch using the project's dedicated worktree directory or a global location. I will verify the appropriate .gitignore entry, create the worktree with git worktree add, and switch into it.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
How do I work on multiple git branches without switching my main workspace?

Git worktrees let you work on multiple branches simultaneously by creating isolated worktrees. This skill automates git worktree creation with smart directory selection and safety verification to prevent accidental commits of worktree contents.

How do I create an isolated git worktree for a new feature branch?

To create an isolated git worktree, the skill detects your project name, selects a path from .worktrees or worktrees directories, validates .gitignore, runs git worktree add, and switches into it. It optionally executes project setup commands afterwards.

What's the best way to prevent accidental commits of worktree content to my main repository?

Preventing accidental commits of worktree content requires verifying .gitignore includes the worktree path. This skill performs safety verification checks before creation and commits changes if needed to keep worktree content out of the main repo.

Can I use a global location for git worktrees instead of a local project directory?

Git worktrees can use a global location instead of local directories. The skill enforces directory priority, preferring .worktrees, then worktrees, then CLAUDE.md preferences, and prompts for a path if needed.

Why does creating a git worktree validate the .gitignore file first?

Validating .gitignore before creating a git worktree ensures the worktree path is properly excluded. This safety check prevents accidental commits of worktree contents into the main repository, keeping your branches truly isolated.