Using Git Worktrees
Run parallel agent sessions in git worktrees so long jobs do not block the main checkout and diffs stay reviewable.
Get the complete skill folder, including its scripts and reference files.
·
When to use this skill
Use Git Worktrees when two agent tasks would otherwise fight over the same working tree, or when you want a throwaway branch the main checkout never sees.
When not to use it
Skip it for a 5-minute edit on the current branch. Skip it if the repo does not use git.
How to install
Where will you use it?
Install the publisher’s plugin
This installs a bundle that can include other skills. Choose this method or the manual alternative below; you only need one installation.
Run these commands in Claude Code:
Claude Code CLI/plugin install superpowers@claude-plugins-official
- Ask Claude Code to use Using Git Worktrees on a small task and confirm that it loads. Check the setup requirements in the publisher’s guide if it cannot run.
Alternative: install the folder manually
Use these steps if you choose the manual folder method. If you installed the plugin above, skip this alternative.
- Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/using-git-worktrees/SKILL.md. For a shared project, commit the folder at .claude/skills/using-git-worktrees/ instead.
- Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
- For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.
Full install guide for Claude, Cursor, and Codex →
Try a starter prompt
After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.
Use the Using Git Worktrees skill for this task: Investigate a bug while a feature branch is dirty. Confirm any required inputs or files before making changes.
What supports this recommendation?
73/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.
- Documentation
- 77/100
- Practical detail
- 68/100
- Source evidence
- 63/100
- Source signals
- 88/100
Model compatibility evidence
- claudeuntested
No model-specific signal or recorded compatibility test was found.
- chatgptuntested
No model-specific signal or recorded compatibility test was found.
- geminiuntested
No model-specific signal or recorded compatibility test was found.
- copilotuntested
No model-specific signal or recorded compatibility test was found.
- llamauntested
No model-specific signal or recorded compatibility test was found.
- perplexityuntested
No model-specific signal or recorded compatibility test was found.
- mistraluntested
No model-specific signal or recorded compatibility test was found.
- grokuntested
No model-specific signal or recorded compatibility test was found.
Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.
What this skill does
Worktrees let an agent work on a branch in another directory. That is the practical way to run two Claude Code jobs without repeated stashing.
Intended uses
- Investigate a bug while a feature branch is dirty
- Give a subagent its own checkout
- Compare two implementations side by side
Implementation notes
- Name worktrees after the task, not "tmp".
- Remove the worktree when the PR lands.
Try it, then tell us how it went
A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.