One-click install
npx skills add https://github.com/mrtolkien/GHOST --skill git-worktrees-mrtolkien
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktrees
Source: https://github.com/mrtolkien/GHOST/tree/main/prompts/skills/superpowers/git-worktrees
Command: npx skills add https://github.com/mrtolkien/GHOST --skill git-worktrees-mrtolkien

SYSTEM DOCUMENTATION & REQUIREMENTS

Use when starting feature work that needs isolation from the current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

What problem does it solve?

Feature development often requires experiments in parallel without polluting the main workspace. This Skill provides isolated git worktrees that share the same repository but operate independently to prevent cross-contamination of code and state.

Core Features & Use Cases

  • Safe isolation: create dedicated worktree directories for a feature branch while preserving the main repository state.
  • Smart directory selection: reuse existing worktrees or follow project preferences and safety checks to determine where to create new worktrees.
  • Safety verification: ensure the chosen directory is ignored by git to prevent accidental commits of worktree contents.
  • Automatic environment bootstrap: detect project type (Node, Rust, Python, Go, etc.) and install/build as needed for the new worktree.
  • Use Case: parallel feature development, experimental experimentation, and safe branch isolation during implementation planning.

Quick Start

Create a new isolated worktree for the feature branch by following the guided prompts and safety checks.

Frequently Asked Questions about git-worktrees

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I isolate feature development from my main git workspace without cross-contamination?

Git worktrees create isolated directory environments sharing the same repository but operating independently, preventing cross-contamination of code and state during parallel feature development. This preserves your main repository state while allowing safe branch isolation.

What is the safest way to create git worktrees for parallel branch work?

Safe git worktree creation requires directory discovery, gitignore verification to ensure chosen paths are ignored, and post-creation validation. This prevents accidental commits of worktree contents while guaranteeing workspace safety across feature branches.

How do I set up a new git worktree and automatically bootstrap its environment?

After creating a git worktree, automatic environment bootstrap detects the project type (Node, Rust, Python, Go) and installs or builds dependencies as needed. This ensures the new worktree is immediately ready for feature development.

Can I reuse existing git worktrees instead of creating new directories for feature branches?

Yes, smart directory selection reuses existing worktrees when available. If a new directory is needed, it follows project preferences and performs safety checks to determine the optimal location for creating isolated worktrees.

Why do I need gitignore checks before creating an isolated worktree?

Gitignore checks verify the chosen directory is ignored by git, preventing accidental commits of worktree contents. This safety verification step is essential for maintaining workspace safety during multi-branch task execution.

When should I use git worktrees for feature development instead of cloning the repository?

Use git worktrees for parallel feature development, experimental work, and safe branch isolation during implementation planning. Worktrees share the same repository while operating independently, avoiding the overhead and state divergence of full repository clones.