git-worktree-manager

Create Git worktrees with port allocation and environment sync.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/4lerman/text_evaluator --skill git-worktree-manager-4lerman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree-manager
Source: https://github.com/4lerman/text_evaluator/tree/main/.agents/skills/engineering-advanced-skills/git-worktree-manager
Command: npx skills add https://github.com/4lerman/text_evaluator --skill git-worktree-manager-4lerman

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

The git-worktree-manager Skill solves the challenge of managing parallel Git worktrees safely, enabling isolated development environments and efficient cleanup.

Core Features & Use Cases

  • Worktree Creation: Create worktrees from existing or new branches with deterministic naming.
  • Port Allocation: Auto-allocate non-conflicting ports to each worktree, ensuring isolated development servers.
  • Environment Sync: Synchronize .env* files from the main repository to the new worktree for consistent configurations.
  • Dependency Management: Optional installation of dependencies for local application environment.
  • Stale Cleanup: Detect and remove stale worktrees with safety checks to prevent unintended data loss.

Quick Start

Use the git-worktree-manager skill to create a worktree for a branch named 'feature/api-hardening':

git-worktree-manager \
  --repo . \
  --branch feature/api-hardening \
  --name wt-api-hardening \
  --base-branch main \
  --install-deps

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 Git worktrees for concurrent feature development?

Managing parallel Git worktrees involves creating isolated directories linked to separate branches. This skill automates that creation with deterministic naming, synchronizes environment files, and handles cleanup to facilitate parallel development safely.

How do I prevent port conflicts when running multiple isolated development servers?

Preventing port conflicts requires deterministic port allocation. This skill auto-allocates non-conflicting ports to each Git worktree, ensuring isolated development servers run concurrently without interference.

How to sync .env files from the main repository to a new Git worktree?

Syncing .env files ensures consistent configurations across isolated workspaces. This skill automatically synchronizes environment files from the main repository into the newly created worktree during setup.

What is the best way to clean up stale Git worktrees without losing data?

Cleaning up stale Git worktrees safely requires detection mechanisms with strict safety checks. This skill identifies and removes stale worktrees while preventing unintended data loss during the deletion process.

Do I need to install Python libraries to use this Git worktree manager?

No, you do not need to install Python libraries. This skill depends entirely on system and Git functionality, operating without explicit Python library installations for managing isolated environments.