git-worktree-manager

Create Git worktrees with deterministic ports and synced environment files.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/devCharuzu/philfida-taskmanage --skill git-worktree-manager-devcharuzu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree-manager
Source: https://github.com/devCharuzu/philfida-taskmanage/tree/main/.windsurf/skills/git-worktree-manager
Command: npx skills add https://github.com/devCharuzu/philfida-taskmanage --skill git-worktree-manager-devcharuzu

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Coordinated parallel development with Git worktrees often leads to messy branch management and port collisions. This skill standardizes worktree creation, naming, port allocation, and environment syncing so each worktree can function independently without interfering with others.

Core Features & Use Cases

  • Create worktrees from new or existing branches with deterministic naming
  • Auto-allocate non-conflicting ports per worktree and persist assignments
  • Copy local environment files (.env* files) from main repo to new worktree
  • Optionally install dependencies based on lockfile detection
  • Detect stale worktrees and uncommitted changes before cleanup
  • Identify merged branches and safely remove outdated worktrees

Quick Start

Run the worktree manager to create a new worktree for a feature branch and apply the deterministic port map.

Frequently Asked Questions about git-worktree-manager

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

FAQPage Schema
How do I prevent port conflicts when running multiple Git worktrees concurrently?

Git worktree cleanup is handled by detecting stale worktrees, checking for uncommitted changes before removal, and identifying merged branches to safely remove outdated worktrees without losing local modifications.

How does environment file synchronization work when creating new Git worktrees?

Environment file synchronization copies local .env files from the main repository into the newly created worktree, ensuring each isolated feature branch has the necessary configuration to function independently.

Can I automatically install dependencies in a new worktree based on lockfile detection?

Yes, dependency installation is optional and triggered by lockfile detection, allowing the worktree orchestration to automatically set up required packages for the isolated development environment upon creation.

What is the best way to manage stale worktrees and merged branches during local development?

The best way to manage stale worktrees is using safety checks that detect uncommitted changes and identify merged branches, safely removing outdated worktrees to maintain a clean parallel development environment.