Git Worktree

Create, remove, list, and prune Git worktrees in a standardized directory structure.

8|1|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/caidanw/skills --skill git-worktree-caidanw
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Git Worktree
Source: https://github.com/caidanw/skills/tree/main/worktree
Command: npx skills add https://github.com/caidanw/skills --skill git-worktree-caidanw

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the management of Git worktrees, ensuring they are stored in a standardized location outside of your main project directories, preventing clutter and improving organization.

Core Features & Use Cases

  • Create Worktrees: Easily create new Git worktrees for different branches.
  • Remove Worktrees: Clean up and remove existing worktrees.
  • List Worktrees: View all active Git worktrees.
  • Prune Stale Worktrees: Remove orphaned worktree references.
  • Use Case: You need to work on a new feature branch while keeping your main branch clean. This Skill allows you to quickly create a dedicated worktree for the feature branch in a central location.

Quick Start

Use the Git Worktree skill to create a new worktree for the 'develop' branch.

Frequently Asked Questions about Git Worktree

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

FAQPage Schema
How do I manage git worktrees outside of my main project directory?▼

You can manage git worktrees outside your main project directory by creating them in a standardized location. This keeps your main branch clean and prevents directory clutter while supporting operations on specified branches.

What is the best way to create a git worktree for a new feature branch?▼

Creating a git worktree for a feature branch involves generating a new worktree from your current HEAD. If the specified branch does not exist, it is created automatically so you can start working immediately in an isolated environment.

How do I remove a git worktree with uncommitted changes?▼

When removing a git worktree, the system warns you about uncommitted changes before proceeding with removal. This ensures you do not accidentally lose work when cleaning up and removing existing worktrees.

Can I list and prune stale git worktrees from my repository?▼

Yes, you can list active git worktrees and prune stale references. Pruning removes orphaned worktree references from your repository, keeping your version control environment clean and up to date.

Why use a standardized directory structure for git worktrees?▼

Using a standardized directory structure for git worktrees ensures they are stored separately from main project directories. This improves organization and prevents clutter when you need to work on multiple branches simultaneously.