git-worktree

Create, list, switch, and clean up parallel Git worktrees with automatic env-file copying.

3|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/roach88/compound-engineering --skill git-worktree-roach88
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/roach88/compound-engineering/tree/main/skills/git-worktree
Command: npx skills add https://github.com/roach88/compound-engineering --skill git-worktree-roach88

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill helps developers manage multiple Git worktrees to enable isolated parallel feature development, reducing context-switching and merge conflicts.

Core Features & Use Cases

  • Create worktrees from main branch for parallel work
  • List all worktrees with status and current branch
  • Switch between worktrees and clean up completed ones
  • Automatically copy environment files from the main repo
  • Ensure .worktrees is in .gitignore to keep repo clean
  • Integrate with Claude workflows for reviews and feature work

Quick Start

Create a new worktree named feature-login from main using the worktree manager.

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 for parallel feature development?

This approach automates creating, listing, switching, and cleaning up isolated worktrees so you can run multiple features side by side. It reduces context-switching and merge conflicts by keeping parallel branches in separate directories.

How do I copy environment files when creating a new Git worktree?

When creating a Git worktree, the manager automatically copies environment files from the main repository into the new worktree directory. This ensures your isolated branch has the necessary configuration to run immediately without manual setup.

Does Git worktree management automatically handle .gitignore for worktree directories?

Yes, Git worktree management automatically ensures the .worktrees directory is added to .gitignore. This keeps your main repository clean by preventing isolated worktree paths from being tracked in version control.

What is the best way to clean up inactive Git worktrees?

Cleaning up inactive Git worktrees is handled safely through interactive confirmations and a single manager script. You can remove completed worktrees without accidentally deleting active parallel development branches.

Can I use Git worktrees to isolate multiple features in the same repository?

Yes, Git worktrees isolate multiple features within the same repository by creating separate working directories from the main branch. This allows you to develop features in parallel without stashing changes or switching branches repeatedly.