using-git-worktrees

Create isolated git worktrees with safety checks and location reporting.

1|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/Zxela/claude-create --skill using-git-worktrees-zxela
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/Zxela/claude-create/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/Zxela/claude-create --skill using-git-worktrees-zxela

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the problem of isolating feature work from the main workspace by creating isolated git worktrees.

Core Features & Use Cases

  • Safe isolation: automatically selects a project-local or global directory for new worktrees based on a priority order.
  • Safety verification: ensures the chosen directory is ignored by git to prevent accidental commits of worktree contents.
  • Project setup and reporting: creates the worktree with git worktree add, sets up the environment, and reports the location and status.

Quick Start

  • Detect preferred location (.worktrees or worktrees) and optional CLAUDE.md preference.
  • Create the worktree: git worktree add <path> -b <branch-name>
  • Change into the new worktree directory and run project setup commands as needed (npm install, cargo build, etc).

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 work from my current git workspace?

Git worktree creates isolated linked directories for concurrent branches. It automatically selects a project-local directory, verifies it is gitignored to prevent accidental commits, and creates the worktree for safe feature isolation.

How do I create a git worktree without accidentally committing its directory?

To create a git worktree safely, ensure the target directory is ignored by git. This skill automatically verifies that the chosen worktree path is in your gitignore before running git worktree add to prevent accidental commits.

What is the best way to manage multiple concurrent feature branches in git?

Using git worktree is an effective way to manage multiple concurrent feature branches. It creates separate directory paths for each branch, allowing you to switch contexts by changing directories instead of stashing changes.

Does the git worktree creation process run project setup commands automatically?

After creating the git worktree, you need to change into the new directory and run project setup commands like npm install or cargo build manually. The skill reports the worktree location and baseline status to prepare for setup.

Where should I put my git worktrees to keep my project clean?

Git worktrees should be placed in a gitignored directory like .worktrees or a global worktrees folder. The skill selects the preferred location based on a priority order and checks your gitignore to keep the project clean.