using-git-worktrees

Create isolated git worktrees with automatic project setup.

5|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/mrtolkien/GHOST --skill using-git-worktrees-mrtolkien
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/mrtolkien/GHOST/tree/main/vendor/superpowers/using-git-worktrees
Command: npx skills add https://github.com/mrtolkien/GHOST --skill using-git-worktrees-mrtolkien

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolate feature work and experiments by creating dedicated git worktrees, preventing cross-branch contamination and preserving the integrity of your main workspace.

Core Features & Use Cases

  • Smart directory selection: automatically chooses project-local or global worktree locations based on availability and preferences.
  • Safety verification: checks that worktrees are ignored by gitignore and guides fixes when needed to prevent accidental commits.
  • Auto-setup and recovery: detects project type and runs appropriate setup commands to establish a clean baseline.
  • Use Case: starting a new feature branch while keeping the main tree unchanged and safe for rapid iteration.

Quick Start

Use the using-git-worktrees skill to set up an isolated workspace.

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 in git without contaminating my main workspace?

Git worktrees create isolated feature workspaces by generating dedicated directories linked to your repository. This prevents cross-branch contamination and keeps your main workspace clean and safe during new feature development or experiments.

How do I set up a git worktree and automatically run project setup commands?

Setting up a git worktree involves automatically detecting your project type and running the appropriate setup commands for common ecosystems. This establishes a clean baseline and applies automatic project initialization safely for feature work.

What is the best way to manage worktree directories for cross-branch isolation?

Smart directory selection automatically chooses project-local or global worktree locations based on availability and preferences. This approach safely manages cross-branch isolation by separating directories while preserving the integrity of your main workspace.

Does git worktree isolation require updating gitignore to prevent accidental commits?

Git worktree isolation requires verifying that worktrees are ignored by gitignore. Safety verification checks your configuration and guides fixes when needed, preventing accidental commits of worktree directories into the main repository.

Can I use git worktrees for rapid iteration on a feature branch while keeping the main tree unchanged?

Git worktrees enable rapid iteration on a feature branch while keeping the main tree unchanged. They allow you to start new feature branch work in an isolated directory, preserving the integrity of your primary workspace for other tasks.