worktree

Create and clean up Git worktrees for feature branches.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing feature development requires isolated worktrees and clean-up, which is error-prone without a repeatable process.

Core Features & Use Cases

  • Create isolated worktrees for feature branches alongside the repository, enabling parallel development without affecting main.
  • Clean up finished worktrees and prune merged branches to keep the repo tidy.
  • Copy and preserve repository permissions to new worktrees to maintain consistent access controls.

Quick Start

Create a new worktree for a feature branch by invoking /worktree feat/my-feature or clean up an existing worktree with /worktree clean.

Frequently Asked Questions about worktree

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

FAQPage Schema
How do I create a git worktree for a feature branch alongside my main repository?

To create a git worktree for a feature branch, you can invoke the /worktree command with your branch name. This generates an isolated worktree alongside your repository, enabling parallel feature development without affecting the main branch.

What is the best way to clean up finished git worktrees and prune merged branches?

The best way to clean up finished git worktrees and prune merged branches is by invoking /worktree clean. This provides safe prompts for cleanup actions, ensuring your repository remains tidy without accidentally losing uncommitted work.

Does creating a new git worktree preserve the original repository permissions?

Yes, creating a new git worktree preserves repository permissions. The process automatically copies permissions from the original repository to the new worktree, maintaining consistent access controls across your isolated development environments.

Do I need specific Git features to use isolated worktrees for feature development?

You need Git worktree support to use isolated worktrees for feature development. This standard Git feature allows you to manage multiple working directories from a single repository, which is required for the branch isolation process to function.

When should I use git worktrees instead of just switching branches in my main directory?

You should use git worktrees instead of switching branches when you need isolated worktrees for parallel development. This approach allows you to work on multiple feature branches simultaneously without stashing changes or disrupting your main repository state.