git-worktree

Create, list, switch, and clean up Git worktrees with a shell script.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/8b-is/8b-is-mp --skill git-worktree-8b-is
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/8b-is/8b-is-mp/tree/main/plugins/compound-engineering/skills/git-worktree
Command: npx skills add https://github.com/8b-is/8b-is-mp --skill git-worktree-8b-is

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill consolidates Git worktree operations into a single, lightweight manager, reducing manual steps and preventing misconfigurations when creating parallel development environments.

Core Features & Use Cases

  • Create new worktrees from the main branch and track them with a named directory
  • List, switch, and clean up worktrees to keep a clean workspace
  • Automatically copy environment files from the main repository into each new worktree to preserve local config
  • Use during code reviews, feature development, and multi-feature workflows to keep work in isolation

Quick Start

Run the worktree manager to create a new worktree, list existing ones, switch between them, or cleanup inactive ones.

Examples:

  • Create: bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh create feature-login
  • List: bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh list
  • Switch: bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh switch feature-login
  • Cleanup: bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh cleanup

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?

Git worktree management consolidates creating, listing, switching, and cleaning up isolated worktrees into a single automated controller. It targets parallel feature development and code reviews, enabling seamless context switching across different branches.

What is the best way to copy environment files into a new Git worktree?

When creating a new Git worktree, environment files from the main repository are automatically copied into the new worktree directory. This preserves local configuration and ensures each isolated environment has the necessary setup.

Does this Git worktree automation handle branch cleanup and directory tracking?

Yes, the worktree manager cleans up inactive worktrees and tracks them using a named directory structure. It maintains a central directory and ensures proper gitignore entries to keep the workspace organized.

Can I use bash scripts to automate switching between multiple Git branches?

Yes, you can use bash scripts to automate switching between multiple Git branches by utilizing the switch command. This allows seamless context switching across isolated worktrees for parallel development workflows.

Do I need to manually configure .gitignore entries for Git worktrees?

No, the automated worktree manager ensures .gitignore entries are maintained automatically within a designated directory. This prevents misconfigurations and reduces manual steps when setting up isolated development environments.