Agent skill · software engineering · borghei

git-worktree-manager

Manage parallel development with Git worktrees: creation with port allocation, environment sync, branch isolation, and cleanup. Use when working multiple branches at once, running parallel CI validations, or isolating agent workspaces.

Why this skill is useful

Adds executable scripts for managing Git worktrees, including automated port allocation and cleanup workflows that enhance parallel development capabilities.

What it needs

Requires git, python installed locally. About 3k tokens when loaded. Last updated 2026-07-21. 462 stars on the source repository.

What this skill does

Git Worktree Manager Manage parallel development workflows using Git worktrees with deterministic naming, automatic port allocation, environment file synchronization, dependency installation, and cleanup automation. Optimized for multi-agent workflows where each agent or terminal session owns an isolated worktree with its own ports, environment, and running services. Core Capabilities Worktree lifecycle — create worktrees from new or existing branches with deterministic naming, copy .env files, install dependencies by lockfile detection, list with clean/dirty + ahead/behind status, and safely remove with uncommitted-change detection. Port allocation — deterministic per-worktree assignment (base + index stride), collision detection against running processes, persistent map in .worktree-ports.json, and Docker Compose override generation. Multi-agent isolation — one branch per worktree, one agent per worktree, no shared state, conflict-free parallel execution, task-ID mapping for traceability. Cleanup automation — stale detection by age, merged-branch detection for safe removal, dirty-state warnings, and bulk cleanup with safety confirmations. When to Use You need 2+ concurrent branches open with running dev servers. You want isolated environments for feature work, hotfixes, and PR review. Multiple AI agents need separate workspaces that do not interfere. Your current branch is blocked but a hotfix is urgent. You want automated cleanup instead of manual rm -rf operations. Clarify First Before managing worktrees, confirm these inputs. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills borghei/git-worktree-manager

View the source on GitHub

Browse the @skills marketplace