Using Git Worktrees is a skill from Superpowers (skill source). It runs when feature work needs isolation from your current checkout, typically after a design is approved and before a plan is executed, and makes sure the agent works in a separate workspace on its own branch with a clean test baseline.
Its principle: detect existing isolation first, then use native tools, then fall back to git. Never fight the harness.
Key Features
- Step 0, detect: compare
git rev-parse --git-dirwith--git-common-dirto see whether the agent is already in a linked worktree, with a guard so git submodules are not mistaken for worktrees. - Consent: unless your instructions already state a preference, the agent asks before creating a worktree, and works in place if you decline.
- Native first: if the harness has its own worktree tool (such as a
/worktreecommand or anEnterWorktree-style tool), the agent uses it, because a manual worktree creates state the harness cannot see. - Git fallback: otherwise
git worktree add <path> -b <branch>under.worktrees/(preferred) orworktrees/, aftergit check-ignoreconfirms the directory is ignored. - Setup and baseline: auto-detects
npm install,cargo build,pip install,poetry installorgo mod download, then runs the tests and reports the baseline. - Sandbox fallback: if the sandbox blocks worktree creation, the agent says so and works in the current directory.
Use Cases
- Starting a feature while keeping your main checkout untouched.
- Running several agents on separate branches of one repo.
- Before Executing Plans or Subagent-Driven Development.
Pricing
Free and open source under the MIT license. Prime Radiant, the company behind Superpowers, sells commercial support to enterprises. The practical cost is tokens: process skills add questions, reviews and subagent runs.
Getting Started
Superpowers installs as one plugin, so this skill arrives with the rest of the library (15 skills in v6.4.1). In Claude Code run /plugin install superpowers@claude-plugins-official. Cursor uses /add-plugin superpowers, Gemini CLI uses gemini extensions install https://github.com/obra/superpowers, and the README lists commands for Codex, GitHub Copilot CLI, OpenCode, Pi and other harnesses. Skills trigger on their own; you can also ask for one by name. The workflow skills call it; you can also ask for "an isolated worktree for this feature".
Limitation: each worktree needs its own dependency install, which costs disk and time on large projects. Cleanup belongs to Finishing a Development Branch.
FAQ
Why ask before creating a worktree?
It changes your filesystem layout, so the skill treats it as your call unless you have already stated a preference.
What if tests fail at baseline?
The agent reports the failures and asks whether to proceed.
Alternatives
- Conductor: a Mac app that runs parallel Claude Code instances in isolated copies.
- Orca ADE: runs several coding agents side by side in worktrees.
- cmux: a terminal built for juggling many agent sessions.
Conclusion
Small, careful and harness-aware. It keeps agent work off your main branch. More in the skills hub.
Comments
No comments yet. Be the first to comment!
Related Tools
Related Insights
Skills + Hooks + Plugins: How Anthropic Redefined AI Coding Tool Extensibility
An in-depth analysis of Claude Code's trinity architecture of Skills, Hooks, and Plugins. Explore why this design is more advanced than GitHub Copilot and Cursor, and how it redefines AI coding tool extensibility through open standards.

Anthropic Subagent: The Multi-Agent Architecture Revolution
Deep dive into Anthropic multi-agent architecture design. Learn how Subagents break through context window limitations, achieve 90% performance improvements, and real-world applications in Claude Code.

Claude Code account precautions: before you spend $200, do these six things
Gmail plus Apple private sign-in, Cliproxy residential routing for CC and emulators, IP/DNS checks, gradual upgrades, and history-preserving sign-out. Includes a profile and script.