skills/c0ntr0lledcha0s/managing-worktrees/SKILL.md
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.
npx skillsauth add aiskillstore/marketplace managing-worktreesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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!
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.