Back to Skills

git-worktrees

verified

Manage Git worktrees for parallel Claude Code development. Use this skill when engineers ask to "create a worktree", "run parallel Claude sessions", "work on multiple features simultaneously", or need help with worktree management.

View on GitHub

Marketplace

skills-marketplace

jamesrochabrun/skills

Plugin

trading-plan-generator

Repository

jamesrochabrun/skills
30stars

skills/git-worktrees/SKILL.md

Last Verified

January 18, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/jamesrochabrun/skills/blob/main/skills/git-worktrees/SKILL.md -a claude-code --skill git-worktrees

Installation paths:

Claude
.claude/skills/git-worktrees/
Powered by add-skill CLI

Instructions

# Git Worktrees for Claude Code

## Overview

Run multiple Claude Code sessions in parallel on different branches using Git worktrees. This skill provides simple scripts and workflows to set up, manage, and clean up worktrees, enabling true parallel development without conflicts.

**Why Worktrees?**
- **Parallel Development**: Run multiple Claude Code instances simultaneously
- **Zero Conflicts**: Each worktree has independent file state
- **Fast Context Switching**: No need to stash/commit when switching tasks
- **Isolated Experiments**: Try different approaches without affecting main work
- **Long-Running Tasks**: Let Claude work in background while you continue in main

---

## Quick Start

### 1. Create a New Worktree (Super Easy!)

Just run the interactive script:

```bash
scripts/create_worktree.sh
```

This will:
- ✅ Prompt for feature name
- ✅ Create a new branch
- ✅ Set up the worktree
- ✅ Open in VS Code / editor
- ✅ Give you the Claude Code setup command

**That's it!** The script handles all complexity.

---

### 2. View All Worktrees

```bash
scripts/list_worktrees.sh
```

Shows a clean, formatted list of all your worktrees with their branches and status.

---

### 3. Clean Up Old Worktrees

```bash
scripts/cleanup_worktrees.sh
```

Interactive removal of merged or abandoned worktrees.

---

## Core Workflow

### Pattern 1: Parallel Feature Development

**Scenario:** You want Claude to build feature A while you work on feature B.

**Steps:**

1. **Create worktree for feature A:**
   ```bash
   scripts/create_worktree.sh
   # Enter: feature-a
   # Script creates: ../repo-feature-a/
   ```

2. **Open Claude Code in the new worktree:**
   - The script outputs the path
   - Open Claude Code and navigate to that directory
   - Run `/init` to orient Claude

3. **Give Claude the task:**
   ```
   "Build the user authentication feature with OAuth support"
   ```

4. **Continue your work in main:**
   - Your original directory is unchanged
   - No conflicts, no 

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
15793 chars