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-code

Installs 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
1guia-matthieu avatarcontract-reviewguia-matthieu/clawfu-skillsAnalyze and red-flag contracts systematically, identifying risks, unfavorable terms, and negotiation opportunities276skills.sh installs
2omer-metin avatarcode-architecture-reviewomer-metin/skills-for-antigravityReview code architecture for maintainability, catch structural issues before they become debtUse when "Reviewing pull requests with structural changes, Planning270skills.sh installs
3shopify avatarshopify-app-reviewshopify/shopify-ai-toolkitRun a pre-submission compliance check against your Shopify app's codebase. Reviews App Store requirements and surfaces likely issues before you submit for offic269skills.sh installs
4cinience avataralicloud-platform-docs-api-reviewcinience/alicloud-skillsAutomatically review latest Alibaba Cloud product docs and OpenAPI docs by product name, then output detailed prioritized improvement suggestions with evidence 266skills.sh installs
5existential-birds avatarbubbletea-code-reviewexistential-birds/beagleReviews BubbleTea TUI code for proper Elm architecture, model/update/view patterns, and Lipgloss styling. Use when reviewing terminal UI code using charmbracele265skills.sh installs
6sickn33 avatarperformance-testing-review-multi-agent-reviewsickn33/antigravity-awesome-skillsperformance testing review multi agent review263skills.sh installs