worktree

Create and manage Git worktrees for parallel development on separate branches.

Updated Jan 27, 2026
One-click install
npx skills add https://github.com/mccode415/agent --skill worktree-mccode415
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree
Source: https://github.com/mccode415/agent/tree/main/skills/worktree
Command: npx skills add https://github.com/mccode415/agent --skill worktree-mccode415

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill allows you to work on different branches simultaneously in separate directories without the need to constantly switch branches in your main repository, streamlining parallel development workflows.

Core Features & Use Cases

  • Create New Worktrees: Easily set up a new directory for a feature branch, optionally based on a specified base branch.
  • Manage Existing Branches: Checkout an existing local or remote branch into a new worktree.
  • Use Case: You need to start a new feature while also fixing an urgent bug on main. This Skill lets you create a separate directory for the new feature without disrupting your current main branch work.

Quick Start

Use the worktree skill to create a new worktree for the branch named 'feature-x' starting from the 'develop' branch.

Frequently Asked Questions about worktree

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

FAQPage Schema
How do I work on multiple Git branches at the same time without switching?

You can achieve parallel development by creating Git worktrees, which set up separate directories for different branches so you can work on them simultaneously without switching branches in your main repository.

How do I create a new worktree for a feature branch based on a specific base branch?

To create a new worktree, specify the target feature branch name and optionally designate a base branch like 'develop' to branch off from, setting up an isolated directory for your independent feature work.

Can I check out an existing remote branch into a new local worktree?

Yes, you can manage existing branches by checking out an existing local or remote branch directly into a new worktree directory, facilitating independent development without retrieving a fresh clone.

When should I use Git worktrees instead of stashing changes or cloning a repository?

Git worktrees are ideal when you need to start a new feature while urgently fixing a bug on main, allowing you to create a separate directory for the feature without stashing current work or maintaining multiple full clones.

Does parallel development with Git worktrees require any special dependencies?

No special dependencies are required to use Git worktrees for parallel development, as the functionality relies solely on standard Git version control features to manage branches in separate directories.