> sync, branch isolation, and cleanup. Use when working multiple branches at once, running parallel CI validations, or isolating agent workspaces.
npx skills add https://github.com/borghei/Claude-Skills --skill 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.
.env files, install dependencies by lockfile detection, list with clean/dirty + ahead/behind status, and safely remove with uncommitted-change detection.base + index * stride), collision detection against running processes, persistent map in .worktree-ports.json, and Docker Compose override generation.rm -rf operations.Before managing worktrees, confirm these inputs. If any is unknown or vague, ASK — do not assume:
worktree_manager.py action vs port_allocator.py vs worktree_validator.py)Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.
| Tool | Purpose | Command |
|------|---------|---------|
| worktree_manager.py | List, create, remove, and clean up worktrees | python scripts/worktree_manager.py list |
| port_allocator.py | Assign/check/release deterministic port blocks; sync registry | python scripts/port_allocator.py status |
| worktree_validator.py | Validate worktree health (stale, missing branch, env parity, port conflicts, lockfile) | python scripts/worktree_validator.py --stale-days 14 |
Load the reference that matches the task — keep this file lean and pull detail on demand:
git worktree commands, the deterministic port-allocation strategy and .worktree-ports.json format, collision-detection snippet, the full setup-worktree.sh script, and the Docker Compose per-worktree override. Read when creating a worktree or wiring up ports/services.cleanup-worktrees.sh safe-cleanup script, the multi-agent assignment pattern and rules, the scenario→action decision matrix, and the post-creation validation checklist. Read when automating cleanup or coordinating agents.This skill covers:
This skill does NOT cover:
pr-review-expert and release-manager)env-secrets-manager)ci-cd-pipeline-builder)monorepo-navigator)| Skill | Integration | Data Flow |
|-------|-------------|-----------|
| env-secrets-manager | Worktree setup copies .env files that contain secrets managed by this skill | .env files flow from main repo to each worktree; secret references remain consistent across all copies |
| ci-cd-pipeline-builder | CI pipelines can spin up worktrees for parallel test matrix execution | Pipeline config triggers setup-worktree.sh per matrix job; port allocation prevents service collisions |
| release-manager | Release branches get dedicated worktrees for stabilization while feature work continues | Release worktree is created from the release branch; merged status drives cleanup automation |
| monorepo-navigator | In monorepo setups, worktrees must respect package boundaries and shared dependencies | Worktree creation inherits the monorepo root lockfile; package-level dev servers use allocated port blocks |
| pr-review-expert | PR reviews can be performed in isolated worktrees with running code for manual validation | Reviewer creates a worktree at the PR branch, runs the dev server on allocated ports, and removes after review |
| tech-debt-tracker | Stale worktrees and abandoned branches surface as tech debt indicators | Cleanup script output feeds into debt tracking; worktree age and merge status inform priority scores |
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take borghei/git-worktree-manager from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.