Git Worktree Manager

Run parallel Git worktrees without collisions: a port block per worktree, .env sync, health checks for stale or dirty trees, and safe cleanup of merged ones. Use when several branches or agents need running dev servers at once.

1,157 stars 217 forksGit & Code Review Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add borghei/Claude-Skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add borghei/Claude-Skills --skill git-worktree-manager
Manual install
git clone --depth 1 https://github.com/borghei/Claude-Skills.git /tmp/Claude-Skills
mkdir -p ~/.claude/skills
cp -r /tmp/Claude-Skills/engineering/git-worktree-manager ~/.claude/skills/git-worktree-manager

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Git Worktree Manager

Plain `git worktree add/remove` is the easy part. The agent uses this skill for what git does not do: give every worktree its own port block so dev servers and Docker services do not collide, carry `.env` files across, spot worktrees that are stale, dirty or tracking deleted branches, and remove merged ones without losing uncommitted work. It suits multi-agent setups where each agent or terminal owns one worktree.

## 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.
Read the full skill on GitHub

Details

Skill name
git-worktree-manager
Path
engineering/git-worktree-manager/SKILL.md
Repo updated
8 November 2026

FAQ

What does the Git Worktree Manager skill do?

Run parallel Git worktrees without collisions: a port block per worktree, .env sync, health checks for stale or dirty trees, and safe cleanup of merged ones. Use when several branches or agents need running dev servers at once.

How do I install the Git Worktree Manager skill?

Claude Code plugin: /plugin marketplace add borghei/Claude-Skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Git Worktree Manager popular?

It lives in borghei/Claude-Skills, which has 1,157 GitHub stars and 217 forks, and is included in 1 curated skill list.

Related skills

Cto Advisor

1.2k

borghei/Claude-Skills

Technical leadership guidance for engineering teams, architecture decisions, and technology strategy. Use when assessing technical debt, scaling engineering teams, evaluating technologies, or making architecture decisions.

Software DevelopmentIn 1 list217

Customer Success Manager

1.2k

borghei/Claude-Skills

Monitors customer health, predicts churn risk, and identifies expansion opportunities using weighted scoring models for SaaS customer success

Marketing, Sales & BusinessIn 1 list217

Financial Analyst

1.2k

borghei/Claude-Skills

Performs financial ratio analysis, DCF valuation, budget variance analysis, and rolling forecast construction for strategic decision-making

Finance & CryptoIn 1 list217

PR Description Writer

1.2k

borghei/Claude-Skills

Write PR descriptions with evidence, verification steps and a one-way/two-way merge-risk call. Use when opening a PR, when asked to write or fix a PR body, or when checking a description before requesting review.

Git & Code ReviewIn 1 list217

Git Guardrails

1.2k

borghei/Claude-Skills

Install a hook that blocks destructive git commands before an AI agent runs them. Use when an agent force-pushed or ran reset --hard, when adding git safety hooks, or when protecting main from agent pushes.

Git & Code ReviewIn 1 list217

PR Review Expert

1.2k

borghei/Claude-Skills

Reviews risky PRs by blast radius: what imports the changed files, breaking API and schema changes, sensitive paths and test deltas. Use when a PR touches shared libraries, APIs, schemas or auth (for general review use code-reviewer).

Git & Code ReviewIn 1 list217

Browse the most popular Claude skills, all git & code review skills, or write your own with the skills generator.