obra/superpowers@using-git-worktrees

Create isolated git worktrees with verified .gitignore and dependency setup.

9|2|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/AllBeingsFuture/AllBeingsFuture --skill obra-superpowers-using-git-worktrees-allbeingsfuture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: obra/superpowers@using-git-worktrees
Source: https://github.com/AllBeingsFuture/AllBeingsFuture/tree/main/electron/embedded-assets/skills/superpowers-git-worktrees
Command: npx skills add https://github.com/AllBeingsFuture/AllBeingsFuture --skill obra-superpowers-using-git-worktrees-allbeingsfuture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents feature work from polluting the main workspace by creating isolated git worktrees with a consistent, verified directory selection and safety checks so developers can work on multiple branches in parallel without repository contamination.

Core Features & Use Cases

  • Deterministic directory selection: prefers .worktrees, falls back to worktrees, respects CLAUDE.md preferences, or prompts the user when ambiguous.
  • Safety verification: checks project-local directories are gitignored and, if not, adds the ignore entry and commits the change before creating a worktree.
  • Automated creation and bootstrap: creates a new branch worktree, runs project-specific setup (npm install, cargo build, pip/poetry install, go mod download), and executes test commands to verify a clean baseline.
  • Use cases: starting feature branches that must be isolated, supervisor/subagent workflows requiring separated workspaces, and any scenario requiring reproducible, safe parallel development.

Quick Start

Ask the assistant to create an ignored project-local worktree for branch feature/<name>, run dependency setup, and execute the project's tests to confirm a clean baseline.

Frequently Asked Questions about obra/superpowers@using-git-worktrees

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

FAQPage Schema
How do I create isolated git worktrees for parallel branch development?

Isolated git worktrees can be created instantly by selecting a deterministic project-local directory, verifying .gitignore status, creating a new branch worktree, and bootstrapping dependencies. This prevents feature work from polluting the main workspace during parallel branch development.

What is the safest way to manage multiple git branches without repository contamination?

Managing multiple git branches safely requires creating isolated worktrees in project-local directories that are verified against .gitignore rules. If a directory is not ignored, the system adds the ignore entry and commits the change before creating the worktree.

How do I bootstrap project dependencies automatically after creating a git worktree?

Bootstrapping project dependencies after creating a git worktree involves automatically running project-specific setup commands like npm install, cargo build, pip/poetry install, or go mod download, followed by executing test commands to validate a clean baseline.

Can I use git worktrees for supervisor-driven subagent workflows?

Git worktrees are fully applicable to supervisor-driven subagent workflows that require separated, reproducible workspaces. Each subagent can operate in an isolated worktree with its own branch, dependencies, and clean test baseline without interfering with other tasks.

Does git worktree creation respect CLAUDE.md preferences for directory selection?

Git worktree creation respects CLAUDE.md preferences during directory selection. The system prefers a .worktrees directory, falls back to a worktrees directory, honors CLAUDE.md configuration, or prompts the user when the location is ambiguous.

Why does my git worktree setup fail when the project-local directory is not gitignored?

Git worktree setup checks that project-local directories are gitignored to prevent repository contamination. If the directory is not ignored, the system automatically adds the ignore entry and commits the change before proceeding with worktree creation.