Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
.claude/skills/ibrahim-3d-using-git-worktrees/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 98% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 34% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 132% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 31% | 0% |
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."
Follow this priority order:
bash# 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.
bashgrep_search -i "worktree.*director" CLAUDE.md 2>/dev/null
If preference specified: Use it without asking.
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?MUST verify directory is ignored before creating worktree:
bash# Check if directory is ignored (respects local, global, and system gitignore) git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
If NOT ignored:
Per Jesse's rule "Fix broken things immediately":
Why critical: Prevents accidentally committing worktree contents to repository.
No .gitignore verification needed - outside project entirely.
bashproject=$(basename "$(git rev-parse --show-toplevel)")
bash# Determine full path case $LOCATION in .worktrees|worktrees) path="$LOCATION/$BRANCH_NAME" ;; ~/.config/superpowers/worktrees/*) path="~/.config/superpowers/worktrees/$project/$BRANCH_NAME" ;; esac # Create worktree with new branch git worktree add "$path" -b "$BRANCH_NAME" cd "$path"
Auto-detect and run appropriate setup:
bash# Node.js if [ -f package.json ]; then npm install; fi # Rust if [ -f Cargo.toml ]; then cargo build; fi # Python if [ -f requirements.txt ]; then pip install -r requirements.txt; fi if [ -f pyproject.toml ]; then poetry install; fi # Go if [ -f go.mod ]; then go mod download; fi
Run tests to ensure worktree starts clean:
bash# Examples - use project-appropriate command npm test cargo test pytest go test ./...
If tests fail: Report failures, ask whether to proceed or investigate.
If tests pass: Report ready.
Worktree ready at <full-path>
Tests passing (<N> tests, 0 failures)
Ready to implement <feature-name>| Situation | Action | |-----------|--------| | .worktrees/ exists | Use it (verify ignored) | | worktrees/ exists | Use it (verify ignored) | | Both exist | Use .worktrees/ | | Neither exists | Check CLAUDE.md → Ask user | | Directory not ignored | Add to .gitignore + commit | | Tests fail during baseline | Report failures + ask | | No package.json/Cargo.toml | Skip dependency install |
git check-ignore before creating project-local worktreeYou: I'm using the using-git-worktrees skill to set up an isolated workspace.
[Check .worktrees/ - exists]
[Verify ignored - git check-ignore confirms .worktrees/ is ignored]
[Create worktree: git worktree add .worktrees/auth -b feature/auth]
[Run npm install]
[Run npm test - 47 passing]
Worktree ready at /Users/jesse/myproject/.worktrees/auth
Tests passing (47 tests, 0 failures)
Ready to implement auth featureNever:
Always:
Called by:
Pairs with:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 14,797 | 12,441 | -16% | 1 | 1 | 0% | 214 | 1,711 | +700% | 0 | 0 | — |
case-02 | fail→fail | 2,752 | 3,186 | +16% | 1 | 1 | 0% | 285 | 1,952 | +585% | 0 | 0 | — |
case-03 | fail→fail | 5,043 | 6,410 | +27% | 1 | 1 | 0% | 215 | 2,346 | +991% | 0 | 0 | — |
case-04 | pass→pass | 8,163 | 2,106 | -74% | 1 | 1 | 0% | 1,327 | 1,744 | +31% | 0 | 0 | — |
case-05 | pass→pass | 7,261 | 2,829 | -61% | 1 | 1 | 0% | 1,236 | 1,890 | +53% | 0 | 0 | — |
case-06 | fail→pass | 7,916 | 2,116 | -73% | 1 | 1 | 0% | 1,359 | 1,788 | +32% | 0 | 0 | — |
case-07 | pass→pass | 7,031 | 2,798 | -60% | 1 | 1 | 0% | 1,267 | 1,848 | +46% | 0 | 0 | — |
case-08 | pass→pass | 5,781 | 2,153 | -63% | 1 | 1 | 0% | 921 | 1,729 | +88% | 0 | 0 | — |
case-09 | pass→pass | 4,659 | 1,685 | -64% | 1 | 1 | 0% | 788 | 1,648 | +109% | 0 | 0 | — |
case-10 | fail→pass | 4,802 | 1,441 | -70% | 1 | 1 | 0% | 797 | 1,576 | +98% | 0 | 0 | — |
case-11 | pass→pass | 6,671 | 1,600 | -76% | 1 | 1 | 0% | 1,229 | 1,615 | +31% | 0 | 0 | — |
case-12 | pass→pass | 4,370 | 2,622 | -40% | 1 | 1 | 0% | 800 | 1,829 | +129% | 0 | 0 | — |
case-13 | pass→pass | 6,397 | 1,579 | -75% | 1 | 1 | 0% | 1,050 | 1,594 | +52% | 0 | 0 | — |
case-14 | fail→fail | 9,920 | 2,990 | -70% | 1 | 1 | 0% | 1,632 | 1,921 | +18% | 0 | 0 | — |
case-15 | pass→pass | 8,936 | 2,546 | -72% | 1 | 1 | 0% | 1,525 | 1,807 | +18% | 0 | 0 | — |
case-16 | fail→pass | 7,141 | 1,360 | -81% | 1 | 1 | 0% | 1,181 | 1,586 | +34% | 0 | 0 | — |
case-17 | fail→pass | 5,116 | 32,907 | +543% | 1 | 1 | 0% | 810 | 1,880 | +132% | 0 | 0 | — |
case-18 | fail→fail | 6,463 | 2,604 | -60% | 1 | 1 | 0% | 1,096 | 1,894 | +73% | 0 | 0 | — |
case-19 | pass→pass | 3,573 | 1,215 | -66% | 1 | 1 | 0% | 617 | 1,570 | +154% | 0 | 0 | — |
case-20 | pass→pass | 3,351 | 2,599 | -22% | 1 | 1 | 0% | 644 | 1,777 | +176% | 0 | 0 | — |
case-21 | pass→pass | 3,642 | 2,709 | -26% | 1 | 1 | 0% | 603 | 1,823 | +202% | 0 | 0 | — |
case-22 | pass→pass | 2,878 | 3,137 | +9% | 1 | 1 | 0% | 449 | 1,891 | +321% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +18 percentage points is the difference between those two pass rates over the 20 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.