Git Worktree Manager

Run parallel feature work safely with Git worktrees.

Development / Engineeringdevelopmentengineering
by AgentVoltv1.0.0Published 1y ago1 install
Free to sign up · every skill included with AgentVolt Pro

Before & after

Same prompt, same agent — the only difference is the skill.

PromptI need to work on two feature branches at the same time without switching branches constantly.
Beforegeneric AI agent
You could use Git worktrees to work on multiple branches simultaneously. Worktrees are a Git feature that lets you check out different branches in separate directories. You'd need to manage the directory structure, make sure each worktree has the right environment set up, and handle cleanup when you're done. It's a bit manual, but it's definitely doable. You might also want to think about how to handle things like running servers on different ports for each worktree. Would you like some general guidance on how to set this up?
Afterwith Git Worktree Manager
WORKTREE SETUP

wg create --branch feature/auth feature-auth
  → Creates .worktrees/feature-auth with isolated git state
  → Returns port assignment: 3001 (main is 3000)

wg create --branch feature/payments feature-payments
  → Creates .worktrees/feature-payments
  → Assigns port 3002

ISOLATION SUMMARY

Main worktree: ./ → PORT 3000 → node_modules/ → .env.local
feature-auth: .worktrees/feature-auth → PORT 3001 → symlinked node_modules (shared) → .env.3001
feature-payments: .worktrees/feature-payments → PORT 3002 → symlinked node_modules → .env.3002

ENVIRONMENT SYNC

Each worktree gets DATABASE_URL, API_KEY from shared .env.production (read-only)
PORT and LOG_FILE override per worktree

CLEANUP

wg cleanup → removes all stale worktrees, frees ports, confirms git branches still exist before deletion

About this skill


name: git-worktree-manager description: Use when Run parallel feature work safely with Git worktrees.

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.

What you get

  • Public GitHub repo (alirezarezvani/claude-skills)
  • the git-worktree-manager skill folder with SKILL.md. Part of a 337-skill / 30-agent / 70-command install.

Customize your output

  • Fork the repo and adapt the skill's instructions and references to your workflow.

Example output

Activates automatically when your request matches Git Worktree Manager; chains with the other skills, agents, and commands in the collection.

Best for

Creators, builders, and teams using Claude Code.

SKILL.md preview

SKILL.md
---
name: git-worktree-manager
description: Use when running multiple feature branches simultaneously, isolating experimental work, or coordinating multi-agent development across the same repository.
version: 1.0.0
category: Development / Engineering
author: AgentVolt
license: proprietary
tags:
  - development
  - engineering
---

# Git Worktree Manager

Sets up and tears down Git worktrees so parallel branches behave like independent local apps, each with its own ports, env files, and dependencies.

## When to use

… (sign up to view the full skill)
Sign up to view, copy, and install the full skill

More development skills

View all Development skills →