using-git-worktrees

Create isolated git worktrees with configurable locations and baseline verification.

8|1|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/dxc-danny/superpowers-cn --skill using-git-worktrees-dxc-danny
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/dxc-danny/superpowers-cn/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/dxc-danny/superpowers-cn --skill using-git-worktrees-dxc-danny

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Starting feature work often requires safe isolation from the main workspace to avoid destabilizing experiments. This skill provides a repeatable workflow to create isolated git worktrees with configurable locations and guardrails.

Core Features & Use Cases

  • Directory-aware worktree creation that prefers existing local worktrees, then CLAUDE.md preferences, and finally user prompts.
  • Safety verification including git ignore checks and optional automatic updates to ignore lists before creating a new worktree.
  • Automated project setup and baseline validation to ensure a clean starting point for feature work.

Quick Start

Create an isolated worktree for the current project, run the project setup, and verify a clean baseline before starting feature work.

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 work without disturbing my main workspace?

To create an isolated git worktree, the workflow selects a directory based on existing local worktrees, CLAUDE.md preferences, or user prompts, then validates git ignore rules and verifies a clean baseline before starting feature work.

What is the best way to manage multiple feature branches using git worktrees?

The best way to manage multiple feature branches is using directory-aware worktree creation that prefers existing local worktrees and applies safety validation, ensuring reproducible development contexts with clean baselines for each branch.

How does git worktree handle existing directories and ignore validation during setup?

Git worktree setup handles existing directories by preferring them during selection and performs safety verification through git ignore checks, optionally updating ignore lists automatically before creating a new worktree directory.

Can I configure custom locations for my git worktrees using CLAUDE.md?

Yes, you can configure custom locations for git worktrees using CLAUDE.md based prompts, which the workflow checks after existing local worktrees to determine the preferred directory for isolated feature branch creation.

Why do I need baseline verification before starting feature work in a new worktree?

Baseline verification is needed before starting feature work to ensure a clean starting point, running automated project setup commands that validate the isolated worktree environment is safe and reproducible for development.

Does git worktree setup work with my existing branching strategy and project configuration?

Git worktree setup works with your existing branching strategy by applying branch isolation and workspace management, using automated setup commands to validate your project configuration and ensure a safe development context.