using-git-worktrees

Create isolated Git worktrees with safety checks and baseline verification.

1|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/1337hero/claude-toolkit --skill using-git-worktrees-1337hero
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/1337hero/claude-toolkit/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/1337hero/claude-toolkit --skill using-git-worktrees-1337hero

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the creation of isolated Git worktrees to let teams work on feature branches without polluting the main workspace, ensuring clean baselines and safer experimentation.

Core Features & Use Cases

  • Directory discovery: selects a worktree location from preferred options (.worktrees, worktrees, or a global path) with a defined priority.
  • Safety verification: checks gitignore rules before creating a local worktree and guides on adding ignores if needed.
  • Auto-setup & verification: detects the project name, creates the worktree on the appropriate path, runs project setup steps (npm, cargo, pip, etc.), and validates a clean baseline with tests.
  • Use Case: when starting work on a new feature, spin up an isolated workspace that shares the repository but avoids mixing changes with the main working directory.

Quick Start

Ask me to create an isolated Git worktree for your current feature branch.

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?

You can create an isolated Git worktree by automating directory discovery across local or global paths, verifying gitignore rules, and running project setup steps to ensure a safe, clean baseline for your feature branch.

Why should I use Git worktrees instead of branching in my main workspace?

Git worktrees provide isolation by sharing the repository history while keeping file changes separate, preventing pollution of your main working directory and allowing safer, clean experimentation on feature branches.

Do I need to update gitignore before adding a local worktree?

Yes, safety verification checks gitignore rules before creating a local worktree in directories like .worktrees, guiding you to add ignores if needed to prevent tracking unwanted files.

Can I set up project dependencies and run tests automatically in a new Git worktree?

Yes, auto-setup detects the project name and runs setup steps like npm, cargo, or pip, followed by test-baseline validation to verify a clean baseline before you start working in the worktree.

What is the best way to manage worktree directory locations across different projects?

Directory discovery selects a worktree location using defined priority across project-local directories like .worktrees or worktrees, and global paths, applying automatic baseline verification to ensure consistency.

When should I not use isolated Git worktrees for branching?

You should avoid isolated Git worktrees if your project lacks clear gitignore rules for the target directories, or if test-baseline validation fails, as the safety checks depend on a clean baseline.