Git Worktree Manager

Manage Git worktrees with port allocation and environment variable synchronization.

Updated Mar 4, 2026
One-click install
npx skills add https://github.com/Tonybleything76/more-claude-skills --skill git-worktree-manager-tonybleything76
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Git Worktree Manager
Source: https://github.com/Tonybleything76/more-claude-skills/tree/main/engineering/git-worktree-manager
Command: npx skills add https://github.com/Tonybleything76/more-claude-skills --skill git-worktree-manager-tonybleything76

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill streamlines the management of multiple Git worktrees, ensuring isolated development environments with deterministic port allocation and safe cleanup procedures.

Core Features & Use Cases

  • Parallel Development: Safely manage multiple feature branches concurrently without conflicts.
  • Environment Isolation: Assign unique ports and sync environment variables (.env*) for each worktree.
  • Dependency Management: Optionally install project dependencies within new worktrees.
  • Safe Cleanup: Detect stale, dirty, or merged worktrees before removal to prevent data loss.
  • Use Case: When working on a large feature that requires significant changes, you can create a dedicated worktree for it, keeping your main branch clean and allowing you to switch contexts rapidly.

Quick Start

Create a new worktree for the 'feature/api-hardening' branch, name it 'wt-api-hardening', and install dependencies.

Frequently Asked Questions about Git Worktree Manager

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

FAQPage Schema
How do I manage parallel development branches without switching contexts constantly?

Git worktrees enable parallel development by creating isolated working directories for multiple branches. This allows you to concurrently develop features without stashing changes or constantly switching contexts.

How do I assign isolated ports and environment variables for multiple Git worktrees?

Automated Python scripts assign deterministic ports and sync environment variables across worktrees. This ensures isolated environments with unique configurations for each parallel development branch.

What is the safest way to clean up Git worktrees with uncommitted changes?

Safe worktree cleanup performs checks for stale, dirty, or merged branches before removal. These automated safety checks prevent data loss when cleaning up isolated development environments.

Can I automatically install project dependencies when creating a new Git worktree?

Yes, dependency installation is optional during worktree creation. This ensures each isolated parallel development environment has its required project dependencies installed and is immediately ready.

Does Git worktree automation require any external dependencies or modules?

Git worktree automation requires no external dependencies. It utilizes Python scripts to independently manage worktrees, allocate deterministic ports, and synchronize environment variables without additional modules.