using-git-worktrees

Create isolated Git worktrees for feature branches with safety checks.

1|Updated Apr 21, 2026
One-click install
npx skills add https://github.com/sswapnil2/ai-config-fintech --skill using-git-worktrees-sswapnil2
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/sswapnil2/ai-config-fintech/tree/main/skills/superpowers/using-git-worktrees
Command: npx skills add https://github.com/sswapnil2/ai-config-fintech --skill using-git-worktrees-sswapnil2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Starting feature work in isolation to avoid disrupting the current workspace, ensuring clean baselines and safe branching.

Core Features & Use Cases

  • Isolation: Create Git worktrees that share the repository root but provide separate working trees for concurrent branches.
  • Safe setup: Directory priority logic (.worktrees, worktrees, CLAUDE.md preference) with safety checks to prevent accidental commits of worktrees.
  • Automatic baseline: Detect project name and set up a new branch, then run project setup commands to prepare the environment.

Quick Start

Tell me to set up an isolated Git worktree for a feature branch, following the directory priority and safety 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 create a Git worktree for feature development without disrupting my main workspace?▼

Creating a Git worktree involves applying directory priority logic to find a safe location, verifying git ignore rules, and automatically creating a new branch. This isolates feature development work so it does not disrupt your current main workspace.

What is the safest way to manage directory priority when setting up Git worktrees?▼

Safe directory priority management enforces a specific discovery order, checking .worktrees, worktrees, and CLAUDE.md preferences. It applies safety checks and verifies git ignore rules to prevent accidental commits of the worktree directory.

Can I automatically create a new branch and run baseline setup when adding a Git worktree?▼

Yes, the worktree workflow automatically detects the project name, creates a new branch, and runs project setup commands. This establishes a validated baseline environment immediately after the isolated working tree is created.

Does the Git worktree workflow support both project-local and global configurations?▼

Yes, the workflow applies to both project-local and global worktree configurations. It implements directory discovery, CLAUDE.md preferences, and user prompts, while specifically verifying git ignore rules for project-local worktrees to ensure isolation.

Why do I need to verify git ignore rules before creating a project-local worktree?▼

Verifying git ignore rules prevents accidental commits of the worktree directory into the main repository. This safety check ensures the isolated working tree remains excluded from standard tracking, maintaining a clean baseline and safe branching.