worktree

Create, remove, and list Git worktrees for concurrent branch development.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the management of Git worktrees, allowing developers to work on multiple branches of the same repository concurrently without the overhead of traditional branching and merging for every small task.

Core Features & Use Cases

  • Create Worktrees: Easily create new worktrees for specific branches, with automatic directory path conventions and optional automatic directory navigation.
  • Remove Worktrees: Safely remove existing worktrees, with a guided workflow that suggests committing changes and merging before deletion.
  • List Worktrees: View a clear list of all active worktrees, their associated branches, and their current status.
  • Automatic Cleanup: Integrates with Git hooks for automatic worktree cleanup after merges.

Quick Start

Use the worktree skill to create a new worktree for the branch named 'feature/new-login-flow'.

Frequently Asked Questions about worktree

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

FAQPage Schema
How do I manage Git worktrees for concurrent branch development in a single repository?

You can manage Git worktrees by creating, removing, and listing concurrent branches within a single repository. This approach uses a defined path convention and automated cleanup hooks to handle multiple development tasks efficiently.

What is the best way to create a new Git worktree for a specific feature branch?

The best way to create a Git worktree is by specifying the target branch, which automatically generates a directory using a predefined path convention. You can also enable automatic directory navigation to instantly switch to the new worktree.

How do I safely remove a Git worktree without losing uncommitted changes?

To safely remove a Git worktree, follow the guided workflow that suggests committing your changes and merging the branch before deletion. This ensures no local modifications are lost during the removal process.

How does automatic worktree cleanup work after merging a branch?

Automatic worktree cleanup works by integrating directly with Git hooks. After a merge is completed, these hooks trigger the removal of the associated worktree, keeping your repository environment clean and organized.

What happens if there are path conflicts or pre-existing branches when creating a worktree?

When creating a worktree, the system handles edge cases like pre-existing branches and path conflicts automatically. It also manages missing develop branches to prevent directory collisions and ensure a valid setup.

Can I list all active Git worktrees and their associated branch status?

Yes, you can list all active Git worktrees to view their associated branches and current status. This provides a clear overview of your concurrent development environments within the repository.