skills/workflow/dispatching-parallel-agents/SKILL.md
Use when multiple independent tasks can run simultaneously. Enables efficient parallel work execution with specialized agents.
npx skillsauth add liauw-media/codeassist dispatching-parallel-agentsInstall 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.
When tasks are independent and can run simultaneously, dispatch multiple agents in parallel rather than sequentially. This maximizes efficiency and reduces total time to completion.
Only parallelize TRULY INDEPENDENT tasks.
Dependent tasks MUST run sequentially, or you'll create conflicts and waste time.
Before parallelizing, ask:
If ANY answer is YES → Do NOT parallelize
I'm analyzing which tasks can run in parallel.
Task List:
1. Implement authentication (AuthController, User model, routes)
2. Implement payment processing (PaymentController, Payment model, routes)
3. Create API documentation (swagger/openapi)
4. Set up email notifications (NotificationService)
Dependency Analysis:
- Authentication: touches auth files only ✅
- Payment: touches payment files only ✅
- API docs: reads code, doesn't modify ✅
- Email: touches notification files only ✅
All tasks are independent → Can parallelize ✅
Parallel Agent Plan:
Agent 1: Authentication Implementation
- Files: AuthController, User model, routes/api.php (auth section)
- Skills: brainstorming, writing-plans, executing-plans, test-driven-development
- Estimated time: 60 minutes
Agent 2: Payment Processing Implementation
- Files: PaymentController, Payment model, routes/api.php (payment section)
- Skills: brainstorming, writing-plans, executing-plans, test-driven-development
- Estimated time: 90 minutes
Agent 3: API Documentation Generation
- Files: API docs (generated), PHPDoc comments
- Skills: API documentation generation
- Estimated time: 30 minutes
Agent 4: Email Notification Setup
- Files: NotificationService, email templates
- Skills: writing-plans, executing-plans
- Estimated time: 45 minutes
Expected total time: 90 minutes (longest agent)
Sequential time would be: 225 minutes (60+90+30+45)
Time saved: 135 minutes (60% reduction)
IMPORTANT: Use Claude Code's parallel tool invocation
Dispatching 4 agents in parallel:
[Invoke all 4 Task tools simultaneously in a single message]
Example tool invocations:
Task 1: Implement authentication
Task 2: Implement payment processing
Task 3: Generate API documentation
Task 4: Set up email notifications
Parallel Agent Status:
Agent 1 (Auth): ✅ Completed in 58 minutes
Agent 2 (Payment): 🔄 In progress (Task 4 of 6)
Agent 3 (API Docs): ✅ Completed in 25 minutes
Agent 4 (Email): ✅ Completed in 42 minutes
Waiting for Agent 2 to complete...
All agents completed. Integrating results:
Agent 1 (Auth):
- ✅ AuthController created with tests
- ✅ User model with authentication
- ✅ Routes added to api.php
- ✅ 12 tests, all passing
Agent 2 (Payment):
- ✅ PaymentController created with tests
- ✅ Payment model with Stripe integration
- ✅ Routes added to api.php
- ✅ 18 tests, all passing
Agent 3 (API Docs):
- ✅ OpenAPI documentation generated
- ✅ All endpoints documented
- ✅ Available at /docs/api
Agent 4 (Email):
- ✅ NotificationService created
- ✅ Email templates for auth events
- ✅ Queue configuration
- ✅ 5 tests, all passing
Integration Check:
- Merge conflicts? Checking...
- ✅ No conflicts (agents worked on independent files)
- ✅ All tests still pass after merge
- ✅ API docs include all endpoints
For maximum isolation, combine with git-worktrees skill:
# Create worktrees for each agent
git worktree add -b feature/authentication ../myapp-auth main
git worktree add -b feature/payment ../myapp-payment main
git worktree add -b feature/email ../myapp-email main
# Dispatch agents to work in separate worktrees
# Agent 1 works in ../myapp-auth
# Agent 2 works in ../myapp-payment
# Agent 3 works in ../myapp-email
# After completion, merge one by one
git checkout main
git merge feature/authentication
git merge feature/payment
git merge feature/email
# Clean up worktrees
git worktree remove ../myapp-auth
git worktree remove ../myapp-payment
git worktree remove ../myapp-email
When parallelizing implementation, parallel testing is critical:
Testing Strategy for Parallel Work:
Each agent MUST:
1. Use database-backup skill before tests
2. Use separate test databases (if possible)
3. Run tests in isolation
4. Report test results independently
Test Database Isolation:
- Agent 1: DB_DATABASE=testing_auth
- Agent 2: DB_DATABASE=testing_payment
- Agent 3: No database (docs only)
- Agent 4: DB_DATABASE=testing_email
After all agents complete:
- Run full integration test suite
- Verify no conflicts or regressions
Task: Create two independent microservices
Parallel Plan:
Agent 1: User Service
- CRUD operations for users
- Authentication
- Independent database
Agent 2: Order Service
- CRUD operations for orders
- Independent database
- No dependency on User Service yet
These are perfect for parallel work:
- Different codebases
- Different databases
- No shared code
- Can be tested independently
Dispatch agents in parallel → Save 50% time
Task: Add user profile feature
Parallel Plan:
Agent 1: Backend API
- ProfileController with GET/PUT endpoints
- Profile model
- Validation
- Tests
Files: backend/app/Http/Controllers/ProfileController.php, etc.
Agent 2: Frontend UI
- Profile page component
- API integration
- Form validation
- Tests
Files: frontend/src/components/Profile.tsx, etc.
Independence check:
✅ Different directories (backend/ vs frontend/)
✅ Can work on API contract simultaneously
✅ Can test independently (mock API for frontend)
Dispatch agents in parallel → Complete in single timeframe
Task: Fix multiple unrelated bugs
Parallel Plan:
Agent 1: Login validation bug
Files: AuthController.php, LoginRequest.php
Tests: AuthenticationTest.php
Agent 2: API rate limiting bug
Files: RateLimitMiddleware.php
Tests: RateLimitTest.php
Agent 3: Email template bug
Files: WelcomeEmail.php, welcome.blade.php
Tests: EmailTest.php
Independence check:
✅ Different files
✅ No shared dependencies
✅ Can be tested independently
Dispatch 3 agents in parallel → 3x faster completion
If you dispatch parallel agents and encounter issues:
❌ Parallel Agent Conflict Detected
Agent 1 and Agent 2 both modified: routes/api.php
Conflict:
Agent 1 added auth routes
Agent 2 added payment routes
Same file, merge conflict
Resolution:
1. Stop remaining agents
2. Manually merge changes
3. Re-run tests
4. Lesson: Should have split routes/api.php by concern first
Prevention:
- Better dependency analysis
- Split shared files first
- Use more granular tasks
Prerequisites:
brainstorming - Identify all workwriting-plans - Break into tasksUse with:
git-worktrees - Isolate work in separate directoriesexecuting-plans - Each agent executes its plancode-review - Parallel reviews possibleAfter completion:
code-review - Review integrated resultverification-before-completion - Full system testBefore dispatching parallel agents:
During parallel execution:
After completion:
This skill is based on:
Social Proof: Large tech companies have hundreds of developers working in parallel on independent features.
Before dispatching parallel agents:
Bottom Line: Parallel agents are powerful when tasks are truly independent. Analyze dependencies first, dispatch in parallel, integrate carefully. When done right, you can achieve 50-75% time reduction.
development
Use when decomposing complex work. Dispatch fresh subagent per task, review between tasks. Flow: Load plan → Dispatch task → Review output → Apply feedback → Mark complete → Next task. No skipping reviews, no parallel dispatch.
development
# Server Documentation System Set up a documentation system that tracks changes and maintains server/project documentation with Claude Code hooks. ## When to Use - Setting up a new server or development environment - Need to track configuration changes over time - Want automatic documentation of work sessions - Maintaining changelog for infrastructure ## Directory Structure ``` ~/docs/ # User home directory (cross-platform) ├── changelog.md # Global over
development
Delegate tasks to remote Claude Code agent containers for parallel execution, long-running analysis, or resource-intensive operations.
development
Use when working on multiple features simultaneously. Creates isolated workspaces without branch switching, enabling parallel development.