worktree-manager

Automates Git worktree creation, provisioning, registry tracking, and cleanup across multiple projects.

135|33|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/Wirasm/worktree-manager-skill --skill worktree-manager-wirasm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-manager
Source: https://github.com/Wirasm/worktree-manager-skill/tree/main/.claude/skills
Command: npx skills add https://github.com/Wirasm/worktree-manager-skill --skill worktree-manager-wirasm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, gh, git, lsof, uuidgen, uv, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the creation, management, and cleanup of Git worktrees across multiple projects, eliminating manual setup and environment drift.

Core Features & Use Cases

  • Automated worktree creation for multiple branches with isolated directories under a central storage path.
  • Per-worktree provisioning, including port allocation, dependency installation, and agent launching in Ghostty.
  • Global registry tracking all worktrees with status, PR integration, and cleanup workflows for merged or orphaned worktrees.
  • Use cases include rapid feature development in parallel, PR-driven worktree lifecycles, and consistent dev environments across projects.

Quick Start

Spin up a worktree for feature/auth by instructing the skill to prepare the environment, create the worktree, allocate ports, and launch the Claude Code agent.

Frequently Asked Questions about worktree-manager

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

FAQPage Schema
How do I automate Git worktree creation across multiple projects?

Automating Git worktree creation involves running script-driven provisioning that allocates isolated directories, assigns ports, installs dependencies, and launches agents under a central storage path for parallel development.

What is the best way to manage parallel Git worktrees with isolated dev environments?

Managing parallel Git worktrees requires a global registry that tracks status, handles PR synchronization, and coordinates per-worktree provisioning like port allocation and dependency installation to prevent environment drift.

How do I clean up merged or orphaned Git worktrees safely?

Cleaning up Git worktrees safely relies on a global registry that identifies merged or orphaned worktrees and executes script-driven cleanup workflows to remove isolated directories and free allocated ports.

Do I need jq and lsof to run automated Git worktree provisioning?

Yes, automated Git worktree provisioning requires jq, lsof, git, gh, uuidgen, and uv as dependencies to handle port allocation, registry management, repository operations, and environment setup.

Can I launch Claude Code agents automatically when creating a new Git worktree?

Yes, per-worktree provisioning can launch Claude Code agents automatically in Ghostty during worktree creation, enabling immediate parallel development in the newly allocated isolated environment.

How does PR-driven worktree lifecycle management work?

PR-driven worktree lifecycle management uses a global registry to synchronize worktree status with GitHub PRs, tracking active branches and triggering safe cleanup workflows when PRs are merged or closed.