worktree

Create isolated git worktrees for separate task directories.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/robertdp/claude-code-skills --skill worktree-robertdp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree
Source: https://github.com/robertdp/claude-code-skills/tree/main/skills/worktree
Command: npx skills add https://github.com/robertdp/claude-code-skills --skill worktree-robertdp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents risky or messy changes from spilling into your main git checkout by giving each task its own isolated working directory.

Core Features & Use Cases

  • Task Isolation: Create separate git worktrees for features, fixes, and experiments.
  • Branch Conventions: Apply consistent branch prefixes and directory naming so work remains organized and easy to clean up.
  • Lifecycle Management: List, remove, and prune worktrees when work is complete or no longer needed.
  • Use Case: A developer starts a feature branch, experiments safely in its own directory, and merges or discards the work without disturbing the main checkout.

Quick Start

Ask the assistant to create a new git worktree for your current task and switch the work into an isolated directory before making any changes.

Frequently Asked Questions about worktree

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I isolate feature development from my main git checkout?

You can isolate feature development by creating a separate git worktree, which gives each task its own isolated working directory without disturbing the main repository checkout. This keeps risky or messy changes safely separated.

What is the best way to manage multiple git branches for parallel development?

Using git worktree is the best way to manage parallel development, as it creates isolated working directories for each branch. This allows you to safely develop features, fixes, and experiments simultaneously without switching contexts in a single checkout.

How do I create and clean up git worktrees for bug fixes?

You can create a git worktree by asking the assistant to set up an isolated directory with consistent branch naming conventions. Once the bug fix is complete, you can list, prune, and remove the worktree through supported lifecycle management commands.

When do I need a git worktree instead of a standard branch checkout?

You need a git worktree when you want to keep your main checkout clean while experimenting or working on a separate branch. It prevents risky changes from spilling into your primary working directory and supports safe parallel task execution.

Does this git worktree workflow apply consistent branch naming conventions?

Yes, the workflow applies consistent branch prefixes and directory naming conventions when creating worktrees. This ensures that isolated work remains organized and is easy to identify, clean up, and remove when the task is finished.