worktree

Create, attach, remove, and list git worktrees with session routing.

1|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/rupertsworld/skills --skill worktree-rupertsworld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree
Source: https://github.com/rupertsworld/skills/tree/main/worktree
Command: npx skills add https://github.com/rupertsworld/skills --skill worktree-rupertsworld

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create and manage git worktrees so you can switch between tasks on different branches without contaminating the main checkout.

Core Features & Use Cases

  • Create or attach a named worktree for a repository to isolate work tasks.
  • Remove, list, or switch between worktrees with safe handling of branches and paths.
  • Ensure worktrees are routed as the active working location for the session.

Quick Start

Create or attach a worktree named <name> for the current repository and start using it for your task.

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 contaminating the main checkout?

Git worktrees create isolated working contexts by attaching separate directories to different branches. This allows parallel task work across repositories without affecting the main checkout or contaminating your active session.

What is the best way to manage parallel git workspaces for concurrent repository tasks?

Managing parallel git workspaces involves creating or attaching named worktrees to isolate branch-specific tasks. You can list, switch between, and remove these worktrees with safe validation handling to route your active session correctly.

How do I set up a git worktree for an isolated development session?

To set up a git worktree, create or attach a named worktree for your current repository. The system handles base-branch routing automatically, establishing the worktree as the active working location for your isolated development session.

Can I automatically clean up and safely remove git worktrees after finishing a task?

Yes, git worktree management includes optional cleanup and safe removal validations. When you remove a worktree, the system safely handles branch and path dependencies to ensure your main repository remains unaffected.

Do I need to manually handle base branches when creating a new git worktree?

No, creating a git worktree includes automatic base-branch handling. The system validates the branch and path setup automatically, ensuring the isolated working context is established correctly without manual base-branch configuration.

Why should I use git worktrees instead of cloning a repository multiple times for parallel work?

Git worktrees provide isolated branch sessions within a single repository, avoiding the disk overhead and sync issues of multiple clones. They route the active session to the correct worktree path while maintaining safe branch validations.