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.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 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
```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.
### 2. Check CLAUDE.md
```bash
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. ~/.claude/worktrees/<project-name>/ (global location)
Which would you prefer?
```
## Safety Verification
### For Project-Local Directories (.worktrees or worktrees)
…
The line at the top of this page pins the label git:20260204.611bfd1, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_2l6zqqjjub674xms
GET https://markdownregistry.com/api/v1/resolve?ref=ed3dai/ed3d-plugins/using-git-worktrees
GET https://markdownregistry.com/api/v1/blob/c86955b98c7075708f33ad99570e431391274c6e5476148ad1e56f4dd303e96d
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
ed3dai/ed3d-plugins · plugins/ed3d-basic-agents/skills/doing-a-simple-two-stage-fanout/SKILL.md · Use when analyzing a large corpus of text, code, or data that exceeds a single agent's effective context - orchestrates…
ed3dai/ed3d-plugins · plugins/ed3d-extending-claude/skills/creating-a-plugin/SKILL.md · Use when creating a new Claude Code plugin or setting up plugin structure - provides complete file organization…
ed3dai/ed3d-plugins · plugins/ed3d-extending-claude/skills/creating-an-agent/SKILL.md · Use when creating specialized subagents for Claude Code plugins or the Task tool - covers description writing for…
ed3dai/ed3d-plugins · plugins/ed3d-extending-claude/skills/maintaining-a-marketplace/SKILL.md · Use when creating, releasing, or maintaining a Claude Code Plugin Marketplace - covers marketplace.json schema, version…
ed3dai/ed3d-plugins · plugins/ed3d-extending-claude/skills/maintaining-project-context/SKILL.md · Use when completing development phases or branches to identify and update CLAUDE.md or AGENTS.md files that may have…
ed3dai/ed3d-plugins · plugins/ed3d-extending-claude/skills/prompt-security-hardening/SKILL.md · Use when writing skills, CLAUDE.md files, agent prompts, or any directives that involve shell commands, environment…
ed3dai/ed3d-plugins · plugins/ed3d-extending-claude/skills/testing-skills-with-subagents/SKILL.md · Use when creating or editing skills, before deployment, to verify they work under pressure and resist rationalization -…
ed3dai/ed3d-plugins · plugins/ed3d-extending-claude/skills/writing-claude-directives/SKILL.md · Use when writing instructions that guide Claude behavior - skills, CLAUDE.md files, agent prompts, system prompts…
ed3dai/ed3d-plugins · plugins/ed3d-extending-claude/skills/writing-claude-md-files/SKILL.md · Use when creating or updating CLAUDE.md files for projects or subdirectories - covers top-level vs domain-level…
ed3dai/ed3d-plugins · plugins/ed3d-extending-claude/skills/writing-skills/SKILL.md · Use when creating new skills, editing existing skills, or verifying skills work before deployment - applies TDD to…
obra/superpowers · skills/using-git-worktrees/SKILL.md · Use when starting feature work that needs isolation from current workspace or before executing implementation plans -…
a5c-ai/babysitter · library/methodologies/superpowers/skills/using-git-worktrees/SKILL.md · Use when starting feature work that needs isolation from current workspace or before executing implementation plans.
ganyuanran/aegis · skills/using-git-worktrees/SKILL.md · Use when a coding task needs a concurrent checkout, unrelated dirty state blocks safe branch switching, or the user or…
coco-research/coco · skills/using-git-worktrees/SKILL.md · Use when starting feature work that needs isolation from current workspace or before executing implementation plans -…
xu123-bob/baize · agent/skills/superpowers/5.1.0/skills/using-git-worktrees/SKILL.md · Use when starting feature work that needs isolation from current workspace or before executing implementation plans -…
jamditis/claude-skills-journalism · superjawn/skills/using-git-worktrees/SKILL.md · Creates isolated git worktrees with smart directory selection and safety checks. Use when starting isolated feature…
ibrahim-3d/orchestrator-supaconductor · skills/using-git-worktrees/SKILL.md · Use when starting feature work that needs isolation from current workspace or before executing implementation plans -…