using-git-worktrees

Create an isolated git worktree for feature development.

Updated May 19, 2026
One-click install
npx skills add https://github.com/costrict-plugins-repo/anthropic-superpowers --skill using-git-worktrees-costrict-plugins-repo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/costrict-plugins-repo/anthropic-superpowers/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/costrict-plugins-repo/anthropic-superpowers --skill using-git-worktrees-costrict-plugins-repo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensure development work happens in an isolated workspace, protecting your current branch from feature work or experiments.

Core Features & Use Cases

  • Detect existing isolation and skip creation if you're already in an isolated worktree.
  • Prefer native worktree tools when available to avoid harness interference.
  • Fall back to git worktrees when native tooling is unavailable, with safe directory selection and ignore verification.
  • Guard against nested worktrees and submodules to prevent project-wide disruption.

Quick Start

Ask me to set up an isolated 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 isolate feature work to protect my current git branch?

You isolate feature work by creating an isolated development workspace, which protects your current branch from experiments. The skill detects existing isolation and uses git worktrees to keep feature work separate across tasks and harnesses.

What is the best way to set up an isolated git worktree for feature development?

The best way is to prefer native worktree tools to avoid harness interference, falling back to a standard git worktree with safe directory selection when native tooling is unavailable. This ensures isolated feature work across multiple branches.

Does this git worktree isolation work with nested worktrees and submodules?

Git worktree isolation guards against nested worktrees and submodules to prevent project-wide disruption. It also verifies safe directory selection and ignores project-local directories to maintain a secure isolated development environment.

When do I need to use a git worktree for my development branch?

You need a git worktree when starting feature work or experiments that must run in isolation across multiple tasks, branches, or harnesses. It automatically detects existing isolation and skips creation if already in an isolated worktree.

Why does my feature work disrupt my current branch without an isolated workspace?

Feature work disrupts your current branch because changes directly impact the main working directory. Creating an isolated workspace using git worktrees enforces separation, protecting your active branch from subsequent feature tasks and harness interference.