.claude/skills/worktree-swarm/SKILL.md
Set up and orchestrate parallel Claude Code agents using git worktrees. Use this skill when the user wants to parallelize a feature across multiple agents, spawn worktrees, or merge agent work back together.
npx skillsauth add AbeJitsu/bridgette-automation worktree-swarmInstall 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 an expert at orchestrating parallel Claude Code agents across git worktrees. Your job is to help users decompose tasks, spawn worktrees, create agent scopes, and merge completed work.
Use this skill when the user wants to:
Before spawning worktrees, evaluate if the task is suitable:
Good candidates for parallelization:
Bad candidates (serialize instead):
Ask the user:
I'll help you parallelize this task. First, let me understand the scope:
1. What files/directories will need changes?
2. Are there any shared utilities or types multiple parts will need?
3. What's the dependency order? (e.g., database before API, API before UI)
This helps me split the work cleanly to avoid merge conflicts.
Present a clear split to the user:
Here's how I recommend splitting this across agents:
**Agent 1: [Name] - [Focus]**
- Owns: [file paths]
- Deliverables: [numbered list]
**Agent 2: [Name] - [Focus]**
- Owns: [file paths]
- Read-only: [files for context]
- Deliverables: [numbered list]
**Agent 3: [Name] - [Focus]**
- Owns: [file paths]
- Read-only: [files for context]
- Deliverables: [numbered list]
**Merge order:** Agent 1 → Agent 2 → Agent 3
Does this split look right? I can adjust boundaries if needed.
Once the user approves the split, create the worktrees:
# Create worktree directory
mkdir -p ~/.claude-worktrees/PROJECT_NAME
# Spawn worktrees from current branch
git worktree add ~/.claude-worktrees/PROJECT_NAME/FEATURE-SCOPE-agent1 -b FEATURE-SCOPE-agent1
git worktree add ~/.claude-worktrees/PROJECT_NAME/FEATURE-SCOPE-agent2 -b FEATURE-SCOPE-agent2
git worktree add ~/.claude-worktrees/PROJECT_NAME/FEATURE-SCOPE-agent3 -b FEATURE-SCOPE-agent3
For each worktree, create a scoped CLAUDE.md:
# Agent Scope: [Feature] - [Focus]
This agent is part of a parallel development swarm. Stay within your boundaries.
## Your Boundaries
### Files You OWN (create and edit freely)
- [List specific paths]
### Files You May READ (for context, don't edit)
- [List read-only paths]
### Files You Must NOT Touch
- [List forbidden paths - other agents own these]
## Your Mission
1. [First deliverable]
2. [Second deliverable]
3. [Third deliverable]
## Communication Artifacts
Create these before finishing:
- CHANGES.md - What you changed and why
- DECISIONS.md - Technical trade-offs you made
- BLOCKERS.md - Issues you couldn't resolve (if any)
## Integration Notes
Your work will be merged in this order: [describe merge order]
The conductor will handle the merge. Your job is clean, working code.
Provide the user with clear launch instructions:
Worktrees are ready! Here's how to start:
**Terminal 1 - Agent 1:**
cd ~/.claude-worktrees/PROJECT_NAME/FEATURE-SCOPE-agent1
claude
# Then give it its mission from the CLAUDE.md
**Terminal 2 - Agent 2:**
cd ~/.claude-worktrees/PROJECT_NAME/FEATURE-SCOPE-agent2
claude
# Then give it its mission from the CLAUDE.md
**Terminal 3 - Agent 3:**
cd ~/.claude-worktrees/PROJECT_NAME/FEATURE-SCOPE-agent3
claude
# Then give it its mission from the CLAUDE.md
I'll stay here as your conductor. Let me know when agents finish and I'll help you merge.
When agents finish, guide the merge:
# 1. Create integration branch
git checkout -b feature/FEATURE-integration
# 2. Merge in dependency order
git merge FEATURE-db-agent1 --no-ff -m "Merge: Database and schema changes"
npm run type-check && npm run test
git merge FEATURE-api-agent2 --no-ff -m "Merge: API endpoints"
npm run type-check && npm run test
git merge FEATURE-ui-agent3 --no-ff -m "Merge: UI components"
npm run type-check && npm run test
# 3. Final verification
npm run build
npm run e2e
# 4. Cleanup
git worktree remove ~/.claude-worktrees/PROJECT_NAME/FEATURE-SCOPE-agent1
git worktree remove ~/.claude-worktrees/PROJECT_NAME/FEATURE-SCOPE-agent2
git worktree remove ~/.claude-worktrees/PROJECT_NAME/FEATURE-SCOPE-agent3
Import conflicts:
// Merge by alphabetizing and combining
import { ProfileAPI, UserAPI } from '@/lib/api';
Type definition conflicts:
// Keep both if they don't overlap
// Consolidate if they define the same thing
package-lock.json conflicts:
git checkout --theirs package-lock.json
npm install
git add package-lock.json
User: I need to add a user profile feature with database, API, and UI
[Skill analyzes and proposes 3-agent split]
Here's how I'd split this:
**Agent 1: Database/Backend**
- Owns: prisma/schema.prisma, app/api/profile/**
- Deliverables: Profile model, CRUD endpoints
**Agent 2: Frontend/UI**
- Owns: app/components/profile/**, app/(routes)/profile/**
- Deliverables: ProfileCard, ProfileForm, profile page
**Agent 3: Tests**
- Owns: app/e2e/profile.spec.ts, __tests__/profile/**
- Deliverables: E2E and unit test coverage
Merge order: Agent 1 → Agent 2 → Agent 3
Shall I create the worktrees and agent scopes?
[User: yes]
[Creates worktrees and CLAUDE.md files]
Done! Launch instructions:
- Terminal 1: cd ~/.claude-worktrees/myproject/profile-db-agent1 && claude
- Terminal 2: cd ~/.claude-worktrees/myproject/profile-ui-agent2 && claude
- Terminal 3: cd ~/.claude-worktrees/myproject/profile-tests-agent3 && claude
Let me know when they're done and I'll help you merge!
development
AI thinking partner for strategy and planning. Reads the current work state, analyzes progress, and helps you plan the next phase while the worker instance builds. Triggered by "think ahead".
development
Scan codebase for Pragmatic Programmer anti-patterns. Reports findings. Triggers on "pragmatic audit" or "/pragmatic-audit".
development
Spawn 5 parallel agents applying quality principles across planning, building, and validating code. Use when designing features, making decisions, or checking work. Triggers on "launch a swarm" or when ensuring solid, maintainable, secure software.
development
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.