create-worktree

Create and manage isolated git worktrees under .worktrees for PRs and branches.

5.7k|578|Updated Jan 26, 2022
One-click install
npx skills add https://github.com/dlt-hub/dlt --skill create-worktree-dlt-hub
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-worktree
Source: https://github.com/dlt-hub/dlt/tree/main/.claude/skills/create-worktree
Command: npx skills add https://github.com/dlt-hub/dlt --skill create-worktree-dlt-hub

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create or reuse isolated git worktrees to review and develop in parallel without cross-contamination between branches.

Core Features & Use Cases

  • Create a dedicated worktree in .worktrees/<name> for a PR or feature branch.
  • Reuse an existing worktree path if it already exists, skipping duplication.
  • Optionally checkout a PR by number or a specific branch during setup to start working immediately.
  • Supports guidance on conflict handling and safe fallbacks to prevent duplicate worktrees.

Quick Start

Create a new worktree named <name> and optionally checkout a PR with --pr <number> or a specific branch with --branch <ref>.

Frequently Asked Questions about create-worktree

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

FAQPage Schema
How do I create an isolated git worktree for reviewing a pull request?

To create an isolated git worktree for a PR, use this skill to set up a dedicated directory under .worktrees and optionally checkout the PR by number. This isolates PR review work from your main branch context.

What is the best way to manage multiple git worktrees for parallel branch development?

Managing multiple git worktrees for parallel development is handled by creating isolated paths under .worktrees. The skill automatically reuses existing worktree paths to skip duplication and prevent cross-contamination between branches.

Can I checkout a specific branch instead of a PR number when setting up a git worktree?

Yes, you can checkout a specific branch during git worktree setup by using the branch ref option instead of the PR number. This allows you to start working on feature branches immediately in an isolated context.

How does git worktree conflict handling work when a worktree path already exists?

Git worktree conflict handling for existing paths skips duplication by reusing the existing worktree. The skill specifies safe fallbacks to prevent duplicate worktrees and ensure safe setup across local repos or CI environments.

Do I need any special git dependencies to isolate PR work with git worktrees?

No special dependencies are required to isolate PR work with git worktrees. The skill operates directly on your git repository to manage branch isolation and naming conventions without external components.