git-worktree

Create and manage git worktrees for parallel branch development.

11|1|Updated Oct 28, 2025
One-click install
npx skills add https://github.com/devstefancho/claude-plugins --skill git-worktree-devstefancho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/devstefancho/claude-plugins/tree/main/git-worktree-plugin/skills/git-worktree
Command: npx skills add https://github.com/devstefancho/claude-plugins --skill git-worktree-devstefancho

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing multiple feature branches and PRs can clutter your local repo. This Skill helps you proactively create and manage dedicated git worktrees to isolate work and avoid conflicts.

Core Features & Use Cases

  • Proactively trigger worktree creation when user references PRs or new features.
  • Deterministic creation: choose base branch, branch naming, and location under ./trees/.
  • Cleanup: remove unused worktrees and associated branches.

Quick Start

Create a worktree for a feature named user-auth with base branch main and place it at ./trees/feat/user-auth.

Frequently Asked Questions about git-worktree

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

FAQPage Schema
How do I manage multiple feature branches without cluttering my local repository?

Git worktrees let you create isolated branch environments in separate directories. Instead of switching branches repeatedly, you can work on multiple branches simultaneously by creating a worktree for each feature, keeping your main checkout clean and avoiding merge conflicts.

How do I create a git worktree for a new feature or PR?

Create a worktree by specifying a base branch, deriving a branch name from your feature description or PR number with appropriate prefixes, then running the creation command to place it at ./trees/{branch-name}. The Skill automates naming conventions and location management.

What's the best way to organize worktrees for parallel development workflows?

Worktrees enable parallel branch development by storing each branch in a dedicated ./trees/ subdirectory. This approach isolates work, eliminates branch-switching overhead, and lets you maintain separate build states and dependencies for each feature simultaneously.

Can I use git worktrees to work on multiple PRs at once?

Yes. Git worktrees are designed to let you work on multiple PRs and feature branches concurrently. The Skill proactively detects when you reference a PR or start a new feature, then creates an isolated worktree so you can develop without interrupting other work.

How do I clean up unused worktrees and keep my repository tidy?

The Skill provides cleanup and lifecycle management steps to remove worktrees you no longer need and prune their associated branches. This keeps your repository organized and frees up disk space after features are merged or abandoned.

What do I need to know about branch naming and base branch selection for worktrees?

Worktree creation requires selecting a base branch (typically main or develop) and defining a branch name with appropriate prefixes. The Skill handles deterministic naming conventions and fetches remote refs to ensure the base branch exists before creating the worktree.