using-git-worktrees

Create isolated git worktrees sharing the same repository for feature work.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/steltz/skill-factory --skill using-git-worktrees-steltz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/steltz/skill-factory/tree/main/references/superpowers/skills/using-git-worktrees
Command: npx skills add https://github.com/steltz/skill-factory --skill using-git-worktrees-steltz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees provide isolated workspaces that share the same repository, enabling concurrent feature work without switching branches or disrupting the main line of development.

Core Features & Use Cases

  • Directory prioritization: chooses existing worktrees, CLAUDE.md preference, or prompts the user to decide, ensuring deterministic setup.
  • Safety verification: checks that project-local worktrees are ignored by git and updates .gitignore if needed to prevent accidental commits.
  • Automatic project setup: detects project language/tools (Node.js, Rust, Python, Go) and runs appropriate setup commands to initialize the worktree.

Quick Start

Create an isolated git worktree for your feature branch and begin 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 isolate feature work with git worktrees without switching branches?

Git worktrees create isolated workspaces sharing the same repository, enabling concurrent feature work without switching branches. This approach uses directory discovery and automatic project setup to initialize parallel work safely.

What is the best way to manage project-local git worktrees and prevent accidental commits?

Managing project-local git worktrees requires safety verification via gitignore checks. This process updates .gitignore automatically to ensure worktree directories are ignored, preventing accidental commits of isolated workspaces.

How do I set up a new git worktree for a Node.js or Python project?

Setting up a git worktree for Node.js or Python involves detecting the project language and running appropriate setup commands. This automatic project setup initializes the isolated worktree environment immediately after branch creation.

Can I configure a preferred directory location for my git worktrees?

Yes, you can configure a preferred directory location for git worktrees. Directory prioritization chooses existing worktrees, reads CLAUDE.md preferences, or prompts the user to decide, ensuring deterministic setup across global and project-local locations.

When should I use git worktrees instead of switching branches for parallel feature work?

Use git worktrees instead of switching branches when you need safe, parallel work across multiple features. Worktrees provide isolated workspaces sharing the same repository, preventing disruption to the main line of development during experiments.