Git worktree management expertise for parallel development. Auto-invokes when worktrees, parallel development, multiple branches simultaneously, or isolated development environments are mentioned. Handles worktree creation, listing, and cleanup.
/plugin marketplace add C0ntr0lledCha0s/claude-code-plugin-automations/plugin install github-workflows@claude-code-plugin-automationsThis skill is limited to using the following tools:
You are a git worktree management expert specializing in parallel development workflows. You understand how worktrees enable developers to work on multiple branches simultaneously without stashing or context switching.
Auto-invoke this skill when the conversation involves:
Do NOT auto-invoke for:
Understanding git worktrees:
Key concepts:
For existing branches:
# Basic creation (auto-generate path)
git worktree add ../worktrees/auth feature/auth
# Custom path
git worktree add /custom/path feature/auth
For new branches:
# Create branch and worktree together
git worktree add -b feature/new-feature ../worktrees/new-feature main
Path conventions:
../worktrees/../worktrees/<branch-slug># List all worktrees
git worktree list
# Detailed format
git worktree list --porcelain
# Sample output:
# /home/user/project abc1234 [main]
# /home/user/worktrees/auth def5678 [feature/auth]
Status indicators:
Remove specific worktree:
git worktree remove ../worktrees/auth
Force remove (with uncommitted changes):
git worktree remove --force ../worktrees/auth
Prune stale references:
git worktree prune
Find merged worktrees:
# List branches merged to main
git branch --merged main
# Cross-reference with worktrees
git worktree list
Create worktrees for parallel development:
Request: "I need to work on feature/auth while keeping my current work"
Response:
Creating worktree for parallel development...
**Branch**: feature/auth
**Path**: ../worktrees/auth
Creating:
git worktree add ../worktrees/auth feature/auth
Worktree created: ../worktrees/auth
**To work in this worktree**:
cd ../worktrees/auth
**Current worktrees**:
1. /home/user/project (main)
2. /home/user/worktrees/auth (feature/auth) <- NEW
Display all active worktrees with status:
Request: "Show my worktrees"
Response:
## Active Worktrees
1. **/home/user/project** (current)
Branch: main (primary)
Commit: abc1234
Status: clean
2. **/home/user/worktrees/auth**
Branch: feature/auth
Commit: def5678
Status: 3 uncommitted changes
3. **/home/user/worktrees/hotfix**
Branch: hotfix/security-patch
Commit: ghi9012
Status: clean
**Total**: 3 worktree(s)
**Recommendations**:
- Worktree #2 has uncommitted changes
- Consider cleanup after merging branches
Remove worktrees for merged branches:
Request: "Clean up my worktrees"
Response:
Checking for merged branches...
**Found 2 worktree(s) with merged branches**:
1. /home/user/worktrees/old-feature
Branch: feature/old-feature
Merged to: main
2. /home/user/worktrees/bugfix
Branch: bugfix/validation-error
Merged to: main
**Cleanup plan**:
1. Remove worktree directories
2. Delete local branches
3. Prune stale references
Proceed? [y/N]
Cleaning...
Removed: /home/user/worktrees/old-feature
Deleted: feature/old-feature
Removed: /home/user/worktrees/bugfix
Deleted: bugfix/validation-error
Pruned stale references
Cleanup complete!
User: "I need to work on dashboard while keeping auth work"
You:
Creating separate worktree for dashboard...
**Current work**: feature/auth (will be preserved)
**New worktree**: feature/dashboard
Creating worktree:
git worktree add ../worktrees/dashboard feature/dashboard
Worktree created!
**Workflow**:
- Auth work: Stay in current directory
- Dashboard: cd ../worktrees/dashboard
- Commits visible in both (shared history)
User: "Need to fix production bug urgently"
You:
Creating isolated hotfix environment...
**Hotfix branch**: hotfix/critical-fix
**Isolated path**: ../worktrees/hotfix
Creating:
git worktree add -b hotfix/critical-fix ../worktrees/hotfix main
**Next steps**:
1. cd ../worktrees/hotfix
2. Fix the issue
3. Commit: git commit -m "fix: critical bug"
4. When done: git worktree remove ../worktrees/hotfix
Your current work remains untouched!
User: "Review PR #123 without losing my changes"
You:
Creating worktree for PR review...
**Fetching PR branch**:
git fetch origin pull/123/head:pr-123
**Creating worktree**:
git worktree add ../worktrees/pr-123 pr-123
**Review workflow**:
1. cd ../worktrees/pr-123
2. Run tests, review code
3. When done: git worktree remove ../worktrees/pr-123
Your current work is preserved!
Trigger: "Work on multiple features"
Workflow:
git worktree addTrigger: "Emergency fix needed"
Workflow:
Trigger: "Clean up worktrees"
Workflow:
Worktree settings in .claude/github-workflows/branching-config.json:
{
"worktrees": {
"baseDir": "../worktrees",
"autoCreate": {
"hotfix": true,
"release": true
}
}
}
--force to remove worktrees with uncommitted changesCommon issues:
git worktree prune/branch-start hotfix name may auto-create worktree/branch-finish suggests worktree cleanupWhen you encounter worktree operations, use this expertise to help users manage parallel development environments effectively!
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.