worktree-manager-skill

Automate Git worktree creation, removal, and monitoring with isolated environments.

1|Updated Nov 2, 2025
One-click install
npx skills add https://github.com/pattern-stack/claudecode-patterns --skill worktree-manager-skill-pattern-stack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-manager-skill
Source: https://github.com/pattern-stack/claudecode-patterns/tree/main/.claude/skills/worktree-manager-skill
Command: npx skills add https://github.com/pattern-stack/claudecode-patterns --skill worktree-manager-skill-pattern-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and examples (resource) components.

What problem does it solve?

Manually managing multiple Git worktrees, their isolated environments, and port configurations can be complex and error-prone, hindering parallel development and slowing down your workflow.

Core Features & Use Cases

  • Create Worktrees: Instantly set up new, isolated development environments from any branch with automatic port allocation.
  • List & Monitor: Get a comprehensive overview of all active worktrees, their status, and access URLs.
  • Remove Worktrees: Safely clean up unused worktrees, stopping services and freeing up resources.
  • Use Case: You're working on feature-A but need to quickly test a hotfix on bugfix-B and review a PR on feature-C. This skill lets you spin up three isolated worktrees, each with its own running services, without manual setup or port conflicts.

Quick Start

Use the worktree-manager-skill to create a new worktree for the 'feature-authentication' branch.

Frequently Asked Questions about worktree-manager-skill

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

FAQPage Schema
How do I create isolated development environments for parallel Git branches?

Git worktrees create isolated development environments for parallel branches. This skill automates worktree creation with automatic port allocation, dependency installation, and service startup, letting you work on multiple branches simultaneously without manual setup or port conflicts.

Can I run multiple feature branches with separate services and environments at the same time?

Yes. The skill manages multiple worktrees with isolated .env and configuration files per branch, auto-assigns ports, and starts services independently. This lets you test feature-A, hotfix-B, and PR reviews on feature-C in parallel without interference.

How do I clean up and remove worktrees safely?

The skill automates worktree removal by stopping services, freeing allocated ports, and deleting the worktree directory. This prevents orphaned processes and resource leaks from manual cleanup.

What's the best way to manage port allocation across multiple development branches?

Port allocation is automated through a defined mapping stored in the skill's configuration. When you create a worktree, the skill assigns ports automatically based on this mapping, eliminating conflicts and manual port management.

How do I see the status and access URLs for all my active worktrees?

The skill lists all active worktrees with their branch names, status, and generated access URLs in a single report. This gives you a complete overview without manual inspection of each worktree.

Do I need to manually configure environment variables and settings for each worktree?

No. The skill generates and isolates .env and .claude/settings.json automatically per worktree. Configuration is handled during creation so each isolated environment is ready to use immediately.