askill
using-git-worktrees

using-git-worktreesSafety 80Repository

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

16 stars
1.2k downloads
Updated 3/6/2026

Package Files

Loading files...
SKILL.md

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)

MUST verify directory is ignored before creating worktree:

# 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

For detailed guidelines and examples, see reference.md.

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

74/100Analyzed 3/10/2026

Well-structured skill covering git worktree directory selection and safety verification with clear step-by-step process and actual bash commands. Has explicit 'when to use' trigger and proper metadata. Minor gaps include missing worktree creation commands (references external reference.md) and cleanup procedures. Generic enough to be reusable across projects. Archived location but content is project-agnostic.

80
85
75
60
70

Metadata

Licenseunknown
Version-
Updated3/6/2026
PublisherKaimingWan

Tags

llm