This skill manages Git worktrees for isolated parallel development. It handles creating, listing, switching, and cleaning up worktrees with a simple interactive interface, following KISS principles.
npx claudepluginhub tanmoy1139/compounding-engineering-plugin --plugin compounding-engineeringThis skill uses the workspace's default tool permissions.
This skill provides a unified interface for managing Git worktrees across your development workflow. Whether you're reviewing PRs in isolation or working on features in parallel, this skill handles all the complexity.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides TDD-style skill creation: pressure scenarios as tests, baseline agent failures, write docs to enforce compliance, verify with RED-GREEN-REFACTOR.
This skill provides a unified interface for managing Git worktrees across your development workflow. Whether you're reviewing PRs in isolation or working on features in parallel, this skill handles all the complexity.
Use this skill in these scenarios:
/review): If NOT already on the PR branch, offer worktree for isolated review/work): Always ask if user wants parallel worktree or live branch workThe skill is automatically called from /review and /work commands:
# For review: offers worktree if not on PR branch
# For work: always asks - new branch or worktree?
You can also invoke the skill directly from bash:
# Create a new worktree
bash .claude/skills/git-worktree/scripts/worktree-manager.sh create feature-login
# List all worktrees
bash .claude/skills/git-worktree/scripts/worktree-manager.sh list
# Switch to a worktree
bash .claude/skills/git-worktree/scripts/worktree-manager.sh switch feature-login
# Clean up completed worktrees
bash .claude/skills/git-worktree/scripts/worktree-manager.sh cleanup
create <branch-name> [from-branch]Creates a new worktree with the given branch name.
Options:
branch-name (required): The name for the new branch and worktreefrom-branch (optional): Base branch to create from (defaults to main)Example:
bash .claude/skills/git-worktree/scripts/worktree-manager.sh create feature-login
What happens:
list or lsLists all available worktrees with their branches and current status.
Example:
bash .claude/skills/git-worktree/scripts/worktree-manager.sh list
Output shows:
switch <name> or go <name>Switches to an existing worktree and cd's into it.
Example:
bash .claude/skills/git-worktree/scripts/worktree-manager.sh switch feature-login
Optional:
cleanup or cleanInteractively cleans up inactive worktrees with confirmation.
Example:
bash .claude/skills/git-worktree/scripts/worktree-manager.sh cleanup
What happens:
# Claude Code recognizes you're not on the PR branch
# Offers: "Use worktree for isolated review? (y/n)"
# You respond: yes
# Script runs:
bash .claude/skills/git-worktree/scripts/worktree-manager.sh create pr-123-feature-name
# You're now in isolated worktree for review
cd .worktrees/pr-123-feature-name
# After review, return to main:
cd ../..
bash .claude/skills/git-worktree/scripts/worktree-manager.sh cleanup
# For first feature:
bash .claude/skills/git-worktree/scripts/worktree-manager.sh create feature-login
# Later, start second feature:
bash .claude/skills/git-worktree/scripts/worktree-manager.sh create feature-notifications
# List what you have:
bash .claude/skills/git-worktree/scripts/worktree-manager.sh list
# Switch between them as needed:
bash .claude/skills/git-worktree/scripts/worktree-manager.sh switch feature-login
# Return to main and cleanup when done:
cd .
bash .claude/skills/git-worktree/scripts/worktree-manager.sh cleanup
/reviewInstead of always creating a worktree:
1. Check current branch
2. If ALREADY on PR branch → stay there, no worktree needed
3. If DIFFERENT branch → offer worktree:
"Use worktree for isolated review? (y/n)"
- yes → call git-worktree skill
- no → proceed with PR diff on current branch
/workAlways offer choice:
1. Ask: "How do you want to work?
1. New branch on current worktree (live work)
2. Worktree (parallel work)"
2. If choice 1 → create new branch normally
3. If choice 2 → call git-worktree skill to create from main
If you see this, the script will ask if you want to switch to it instead.
Switch out of the worktree first, then cleanup:
cd /Users/kieranklaassen/rails/cora
bash .claude/skills/git-worktree/scripts/worktree-manager.sh cleanup
See where you are:
bash .claude/skills/git-worktree/scripts/worktree-manager.sh list
Navigate back to main:
cd $(git rev-parse --show-toplevel)
.worktrees/
├── feature-login/ # Worktree 1
│ ├── .git
│ ├── app/
│ └── ...
├── feature-notifications/ # Worktree 2
│ ├── .git
│ ├── app/
│ └── ...
└── ...
.gitignore (updated to include .worktrees)
git worktree add for isolated environments