Agent skill · AI & Agents

git-worktree-manager

Run parallel feature work safely with Git worktrees. Standardizes branch isolation, port allocation, environment sync, and cleanup so each worktree behaves like an independent local app. Optimized for multi-agent workflows where each agent or terminal session owns one worktree. Use when running multiple feature branches simultaneously, isolating experimental work, or coordinating multi-agent development across the same repo.

Alireza Rezvani23,369★ · +428/wk · 1 repos on radarProfile →
claude-codecodexcursorships scriptsMIT
Install
npx skills add alirezarezvani/claude-skills --skill git-worktree-manager --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 6
SKILL.md size: 7 KB
Bundled scripts: yes
Path: engineering/skills/git-worktree-manager/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 23,791 · +422 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Git Worktree Manager **Tier:** POWERFUL **Category:** Engineering **Domain:** Parallel Development & Branch Isolation ## Overview Use this skill to run parallel feature work safely with Git worktrees. It standardizes branch isolation, port allocation, environment sync, and cleanup so each worktree behaves like an independent local app without stepping on another branch. This skill is optimized for multi-agent workflows where each agent or terminal session owns one worktree. ## Core Capabilities - Create worktrees from new or existing branches with deterministic naming - Auto-allocate non-conflicting ports per worktree and persist assignments - Copy local environment files (`.env*`) from main repo to new worktree - Optionally install dependencies based on lockfile detection - Detect stale worktrees and uncommitted changes before cleanup - Identify merged branches and safely remove outdated worktrees ## When to Use - You need 2+ concurrent branches open locally - You want isolated dev servers for feature, hotfix, and PR validation - You are working with multiple agents that must not share a branch - Your current branch is blocked but you need to ship a quick fix now - You want repe

What's inside
Steps it walks through
  1. Overview
  2. Core Capabilities
  3. When to Use
  4. Key Workflows
  5. 1. Create a Fully-Prepared Worktree
  6. 2. Run Parallel Sessions
  7. 3. Cleanup with Safety Checks
  8. 4. Docker Compose Pattern
  9. 5. Port Allocation Strategy
  10. Script Interfaces
  11. Common Pitfalls
  12. Best Practices
  13. Validation Checklist
  14. References
Ships with 5 files
  • README.md
  • references/docker-compose-patterns.md
  • references/port-allocation-strategy.md
  • scripts/worktree_cleanup.py
  • scripts/worktree_manager.py
Commands it runs
python scripts/worktree_manager.py \
cat config.json | python scripts/worktree_manager.py --format json
or
python scripts/worktree_manager.py --input config.json --format json
python scripts/worktree_cleanup.py --repo . --stale-days 14 --format text
python scripts/worktree_cleanup.py --repo . --remove-merged --format text
More from claude-skills
All skills →
About this skill
What does the git-worktree-manager skill do?

Run parallel feature work safely with Git worktrees. Standardizes branch isolation, port allocation, environment sync, and cleanup so each worktree behaves like an independent local app. Optimized for multi-agent workflows where each agent or terminal session owns one worktree. Use when running multiple feature branches simultaneously, isolating experimental work, or coordinating multi-agent development across the same repo.

How do I install it?

Run `npx skills add alirezarezvani/claude-skills --skill git-worktree-manager --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From alirezarezvani/claude-skills, a repository with 23,791 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going