
Using Git Worktrees
Creates isolated git worktrees with proper safety checks so you can work on multiple branches without constant switching. The systematic approach is the real value here: it checks for existing worktree directories, respects CLAUDE.md preferences, verifies gitignore settings to prevent accidents, and runs your project setup automatically. Always verifies tests pass before you start work so you know the baseline is clean. Pairs with brainstorming when moving from design to implementation, and you'll need the cleanup skill when you're done. The ignore verification alone prevents a common footgun where worktree contents pollute your git status.
- skills.sh installs
- 277
- GitHub stars
- 33.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add davila7/claude-code-templates --skill using-git-worktrees --agent claude-codeInstalls into .claude/skills of the current project.
Files
Using Git Worktrees
Overview
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
Core principle: Systematic directory selection + safety verification = reliable isolation.
Announce at start: "I'm using the using-git-worktrees skill to set up an isolated workspace."
Directory Selection Process
Follow this priority order:
1. Check Existing Directories
# Check in priority order
ls -d .worktrees 2>/dev/null # Preferred (hidden)
ls -d worktrees 2>/dev/null # Alternative
If found: Use that directory. If both exist, .worktrees wins.
2. Check CLAUDE.md
grep -i "worktree.*director" CLAUDE.md 2>/dev/null
If preference specified: Use it without asking.
3. Ask User
If no directory exists and no CLAUDE.md preference:
No worktree directory found. Where should I create worktrees?
1. .worktrees/ (project-local, hidden)
2. ~/.config/superpowers/worktrees/<project-name>/ (global location)
Which would you prefer?
Safety Verification
For Project-Local Directories (.worktrees or worktrees)
Sponsors
Details
- Repository
- github.com/davila7/claude-code-templates
- Category
- Git & Pull Requests
- First seen
- Jun 3, 2026
More from davila7/claude-code-templates
All 618- Free Tool Strategy276
- Qms Audit Expert276
- Railway Metrics276
- Nnsight Remote Interpretability275
- Pytdc275
- Railway Domain275
- Firecrawl Scraper274
- Simpo Training273
- Gene Database272
- Uniprot Database269
- File Uploads268
- Simpy265
- Meme Factory264
- Metabolomics Workbench Database264
- Slack Gif Creator264
- Concise Planning263
- Diffdock262
- Clinpgx Database261
- Tavily Web260
- Gget259
- Crafting Effective Readmes258
- Geo Fundamentals258
- String Database255
- Clinvar Database254