Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/borghei-git-worktree-manager/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -11% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -2% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 133% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 9% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -20% | 0% |
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 |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | fail→fail | 17,964 | 2,522 | -86% | 1 | 1 | 0% | 2,858 | 1,749 | -39% | 0 | 0 | — |
case-01 | fail→pass | 18,980 | 9,717 | -49% | 1 | 1 | 0% | 3,706 | 3,289 | -11% | 0 | 0 | — |
case-02 | fail→fail | 16,703 | 13,099 | -22% | 1 | 1 | 0% | 2,634 | 3,592 | +36% | 0 | 0 | — |
case-03 | fail→fail | 15,363 | 13,335 | -13% | 1 | 1 | 0% | 2,653 | 3,499 | +32% | 0 | 0 | — |
case-04 | fail→pass | 10,559 | 2,926 | -72% | 1 | 1 | 0% | 1,777 | 1,742 | -2% | 0 | 0 | — |
case-05 | fail→fail | 7,076 | 3,377 | -52% | 1 | 1 | 0% | 1,093 | 1,859 | +70% | 0 | 0 | — |
case-07 | pass→pass | 12,010 | 6,604 | -45% | 1 | 1 | 0% | 2,067 | 2,472 | +20% | 0 | 0 | — |
case-08 | pass→pass | 7,590 | 3,564 | -53% | 1 | 1 | 0% | 1,185 | 1,775 | +50% | 0 | 0 | — |
case-09 | fail→pass | 10,200 | 13,957 | +37% | 1 | 1 | 0% | 1,656 | 3,859 | +133% | 0 | 0 | — |
case-10 | fail→pass | 9,277 | 2,218 | -76% | 1 | 1 | 0% | 1,549 | 1,685 | +9% | 0 | 0 | — |
case-11 | fail→pass | 19,874 | 7,281 | -63% | 1 | 1 | 0% | 2,967 | 2,374 | -20% | 0 | 0 | — |
case-12 | fail→pass | 11,089 | 2,391 | -78% | 1 | 1 | 0% | 1,708 | 1,670 | -2% | 0 | 0 | — |
case-13 | pass→pass | 10,020 | 1,479 | -85% | 1 | 1 | 0% | 1,526 | 1,505 | -1% | 0 | 0 | — |
case-14 | pass→pass | 16,770 | 15,436 | -8% | 1 | 1 | 0% | 2,733 | 4,138 | +51% | 0 | 0 | — |
case-15 | pass→pass | 12,674 | 10,275 | -19% | 1 | 1 | 0% | 2,219 | 2,983 | +34% | 0 | 0 | — |
case-16 | pass→pass | 13,602 | 5,932 | -56% | 1 | 1 | 0% | 2,281 | 2,302 | +1% | 0 | 0 | — |
case-17 | fail→fail | 14,696 | 16,934 | +15% | 1 | 1 | 0% | 2,406 | 4,072 | +69% | 0 | 0 | — |
case-18 | fail→fail | 14,777 | 11,178 | -24% | 1 | 1 | 0% | 2,404 | 3,145 | +31% | 0 | 0 | — |
case-19 | fail→fail | 9,828 | 5,586 | -43% | 1 | 1 | 0% | 1,900 | 2,312 | +22% | 0 | 0 | — |
case-20 | fail→fail | 14,068 | 7,266 | -48% | 1 | 1 | 0% | 2,430 | 2,552 | +5% | 0 | 0 | — |
case-21 | pass→pass | 5,994 | 3,151 | -47% | 1 | 1 | 0% | 935 | 1,714 | +83% | 0 | 0 | — |
case-22 | pass→pass | 16,518 | 9,814 | -41% | 1 | 1 | 0% | 2,728 | 3,073 | +13% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +27 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.