Claude-skill-registry auto-parallel
Enable parallel agent execution for multi-domain features with git worktree isolation
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/auto-parallel" ~/.claude/skills/majiayu000-claude-skill-registry-auto-parallel && rm -rf "$T"
manifest:
skills/data/auto-parallel/SKILL.mdsource content
Parallel Execution Mode
Enable parallel agent execution for multi-domain features.
What is Parallel Mode?
Parallel mode spawns multiple specialized agents that work simultaneously on different parts of your feature:
- Frontend Agent: React, Vue, Angular, UI components
- Backend Agent: API, services, controllers, middleware
- Database Agent: Schema, migrations, queries, indexes
- DevOps Agent: CI/CD, Docker, Terraform, infrastructure
- QA Agent: Tests, E2E, coverage, validation
Each agent works in its own git worktree for complete isolation - no merge conflicts during development!
Flags
| Flag | Description | Default |
|---|---|---|
| Enable parallel mode | false |
| Max concurrent agents | 3 |
| Spawn frontend agent | false |
| Spawn backend agent | false |
| Spawn database agent | false |
| Spawn devops agent | false |
| Spawn QA agent | false |
| Create PRs on completion | false |
| Create PRs in draft mode | false |
| Merge: auto|manual|pr | auto |
| Base branch for merging | main |
| Analyze prompt for suggestions | - |
Examples
Parallel Frontend + Backend:
/sw:auto --parallel --frontend --backend 0170-auth-feature
With PR Creation:
/sw:auto --parallel --frontend --backend --pr 0170-auth-feature
Analyze Prompt for Suggestions:
/sw:auto --prompt "Build React login with Express API and PostgreSQL" # Output: # ✓ Parallel execution recommended # Detected domains: frontend, backend, database # Suggestions: # --parallel --frontend --backend --database
Full Stack with All Domains:
/sw:auto --parallel --frontend --backend --database --qa 0170-feature
How Parallel Mode Works
1. /sw:auto --parallel --frontend --backend 0170 │ ▼ 2. Session created with 2 agents └─ .specweave/state/parallel/session.json │ ▼ 3. Git worktrees created ├─ .specweave/worktrees/frontend-0170/ └─ .specweave/worktrees/backend-0170/ │ ▼ 4. Agents work in parallel ├─ Frontend agent: UI components └─ Backend agent: API endpoints │ ▼ 5. Completion detected │ ├─ --pr flag? → Create PRs │ ├─ PR #1: [0170] frontend: Auth UI │ └─ PR #2: [0170] backend: Auth API │ └─ --merge-strategy auto? → Merge to base ├─ database first ├─ backend second └─ frontend last
Status Dashboard
/sw:auto-status --parallel # Output: ╔═══════════════════════════════════════════════════════════════════╗ ║ PARALLEL SESSION: session-abc123 ║ ╠═══════════════════════════════════════════════════════════════════╣ ║ Agent │ Status │ Progress │ Time │ Branch ║ ║ ───────────────────────────────────────────────────────────────── ║ ║ frontend │ 🔄 run │ ████░░ 4/6 │ 12m │ auto/frontend-0170 ║ ║ backend │ ✅ done │ ██████ 8/8 │ 25m │ auto/backend-0170 ║ ║ database │ ✅ done │ ██████ 3/3 │ 5m │ auto/database-0170 ║ ╠═══════════════════════════════════════════════════════════════════╣ ║ Overall: 78% │ Completed: 2 │ Running: 1 │ Failed: 0 ║ ╚═══════════════════════════════════════════════════════════════════╝
Watch mode (auto-refresh):
/sw:auto-status --parallel --watch
Merge Order
Agents are merged in dependency order:
- Database first (schema before API)
- Backend second (API before UI)
- Frontend last (depends on backend)
- DevOps/QA anytime (parallel-safe)
Stop Hook Integration
The stop hook blocks exit while parallel agents are running:
🔄 2 parallel agent(s) running: frontend:running, backend:pending → wait for completion
Exit is approved when:
- All agents are completed or failed
- Session is cancelled via
--reset
Configuration
In
.specweave/config.json:
{ "auto": { "parallel": { "enabled": true, "maxParallel": 3, "defaultDomains": ["frontend", "backend"], "defaultMergeStrategy": "auto", "createPR": false, "draftPR": false } } }
Cross-Platform Support
Parallel mode works on all platforms:
- macOS: Native git worktrees
- Linux: Native git worktrees
- Windows: Long path support (\?\ prefix for >260 chars)
Troubleshooting
| Issue | Fix |
|---|---|
| "Active session exists" | to clean up |
| Worktree creation fails | Check git version ≥ 2.5 |
| Merge conflicts | Use for control |
| PRs not created | Ensure CLI is authenticated |
Best Practices
- Start with 2-3 domains: frontend + backend is most common
- Use --prompt first: Let the analyzer suggest the right flags
- Use --draft-pr: Review before merging
- Check status often: Use
for live updates--watch - Reset on stuck:
clears statespecweave auto --reset
Related
- Main auto mode command/sw:auto
- Check session status/sw:auto-status