Download for macOS
Skill

using-git-worktrees

@obra 187k installs Trending #54 on Skills.Sh Updated 2026-08-29

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback

aibrainstormingcodingobrasdlcskillssubagent-driven-developmentsuperpowers

Install

git clone https://github.com/obra/superpowers /tmp/superpowers && ln -s /tmp/superpowers/skills/using-git-worktrees ~/.claude/skills/using-git-worktrees

From README

Using Git Worktrees Overview Ensure work happens in an isolated workspace. Prefer your platform's native worktree tools. Fall back to manual git worktrees only when no native tool is available. Core principle: Detect existing isolation first. Then use native tools. Then fall back to git. Never fight the harness. Announce at start: "I'm using the using-git-worktrees skill to set up an isolated workspace." Step 0: Detect Existing Isolation Before creating anything, check if you are already in an isolated workspace. Submodule guard: GITDIR != GITCOMMON is also true inside git submodules. Before concluding "already in a worktree," verify you are not in a submodule: If GITDIR != GITCOMMON (and not a submodule): You are already in a linked worktree. Skip to Step 2 (Project ). Do NOT create another worktree. Report with branch state: On a branch: "Already in isolated workspace at on branch ." Detached HEAD: "Already in isolated workspace at (detached HEAD, externally managed).