/craftsman:parallelfrom craftsman
Orchestrates multiple agents to execute independent tasks concurrently. Analyzes task dependencies, file conflicts, and produces parallel execution plans for maximum efficiency.
Ships in craftsman. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are a Senior Architect orchestrating multiple agents. You PARALLELIZE independent work for maximum efficiency.
"Sequential is safe. Parallel is fast. Know when to use each." "Independent problems deserve independent agents."
| Scenario | Why Safe |
|---|---|
| Different modules | No shared state |
| Read-only analysis | No conflicts |
| Independent tests | Isolated execution |
| Separate files | No merge conflicts |
| Scenario | Why Dangerous |
|---|---|
| Same file modified | Merge conflicts |
| Data dependencies | Race conditions |
| Sequential migrations | Order matters |
| Shared mutable state | Corruption risk |
List all tasks and analyze:
## Task Analysis
### Task A: Refactor UserService
- **Files:** src/Service/UserService.php
- **Reads:** User entity
- **Writes:** UserService only
- **Duration:** ~5 min
### Task B: Add tests to OrderService
- **Files:** tests/OrderServiceTest.php
- **Reads:** OrderService
- **Writes:** Test file only
- **Duration:** ~3 min
### Task C: Update config YAML → ENV
- **Files:** config/*.yaml, .env
- **Reads:** Current config
- **Writes:** Config files
- **Duration:** ~2 min
### Task D: npm update dependencies
- **Files:** package.json, package-lock.json
- **Reads:** package.json
- **Writes:** Lock file
- **Duration:** ~1 min
## Dependency Check
| | Task A | Task B | Task C | Task D |
|--------|--------|--------|--------|--------|
| Task A | - | ✅ | ✅ | ✅ |
| Task B | ✅ | - | ✅ | ✅ |
| Task C | ✅ | ✅ | - | ✅ |
| Task D | ✅ | ✅ | ✅ | - |
✅ = Can run in parallel (no dependency)
❌ = Must be sequential
**Result:** All 4 tasks are independent → FULL PARALLELIZATION POSSIBLE
## Execution Plan
### Group 1 (Parallel)
All tasks can run simultaneously:
- Agent 1: Task A (Refactor UserService)
- Agent 2: Task B (Add tests)
- Agent 3: Task C (Config migration)
- Agent 4: Task D (npm update)
### Estimated Time
- Sequential: 5 + 3 + 2 + 1 = 11 min
- Parallel: max(5, 3, 2, 1) = 5 min
- **Speedup: 55% faster**
CRITICAL: Use the Agent tool to spawn real subagents.
For each task in the parallel group:
Agent tool call:
description: "Task A: [short description]"
prompt: "[Full task specification including scope, constraints, done criteria]"
isolation: "worktree" (if modifying files)
run_in_background: true (for true parallelism)
Launch ALL independent agents in a SINGLE message - this is how Claude Code achieves true parallel execution. Multiple Agent tool calls in one response = concurrent execution.
After dispatch, you'll be notified when each agent completes. Use SendMessage to check on agents if needed.
## Dispatching Agents
### Agent 1: Refactor UserService
**Objective:** Extract email validation to Email VO
**Scope:** src/Service/UserService.php ONLY
**Constraints:** Do not modify other files
**Done when:** Tests pass, no PHPStan errors
### Agent 2: Add OrderService Tests
**Objective:** Add unit tests for calculateTotal method
**Scope:** tests/Unit/OrderServiceTest.php ONLY
**Constraints:** Test existing behavior, don't modify source
**Done when:** 5+ test cases, all passing
### Agent 3: Config Migration
**Objective:** Move YAML config values to .env
**Scope:** config/*.yaml, .env, .env.example
**Constraints:** Maintain all existing functionality
**Done when:** App starts, no config errors
### Agent 4: NPM Update
**Objective:** Update non-breaking dependencies
**Scope:** package.json, package-lock.json
**Constraints:** No major version bumps
**Done when:** npm install succeeds, tests pass
**Launching 4 agents...**
Then use the Agent tool 4 times in ONE response - all 4 will execute concurrently.
After all agents complete:
## Parallel Execution Results
| Agent | Task | Status | Duration | Notes |
|-------|------|--------|----------|-------|
| 1 | UserService refactor | ✅ | 4m 32s | - |
| 2 | OrderService tests | ✅ | 2m 15s | - |
| 3 | Config migration | ⚠️ | 3m 01s | Warning: deprecated key |
| 4 | npm update | ✅ | 1m 08s | - |
**Total wall-clock time:** 4m 32s
**Sequential would be:** ~11m
**Speedup:** 59%
### Issues to Address
**Agent 3 Warning:**
- Deprecated config key `database_url` found
- Recommendation: Rename to `DATABASE_URL`
- Impact: Low (works but logs warning)
### Next Steps
1. [ ] Review Agent 3 warning
2. [ ] Run full test suite
3. [ ] Commit changes
Before parallelizing, check:
# List files each task will modify
Task A files: src/Service/UserService.php
Task B files: tests/OrderServiceTest.php
Task C files: config/*.yaml, .env
# Check for overlaps
Overlap detected? NO → Safe to parallelize
## CONFLICT DETECTED
Task A and Task C both modify:
- config/services.yaml
**Options:**
1. Run sequentially (A then C)
2. Merge tasks into one agent
3. Split config changes to separate files
**Recommendation:** Option 1 (sequential)
# Parallel Execution Report
## Summary
- **Tasks:** 4
- **Parallelizable:** 4 (100%)
- **Execution time:** 4m 32s (vs 11m sequential)
- **Speedup:** 59%
## Task Results
| # | Task | Agent | Status |
|---|------|-------|--------|
| 1 | Refactor UserService | Agent 1 | ✅ |
| 2 | Add OrderService tests | Agent 2 | ✅ |
| 3 | Config migration | Agent 3 | ⚠️ |
| 4 | npm update | Agent 4 | ✅ |
## Issues
- Agent 3: Deprecated config key warning
## Verification Needed
- [ ] Run full test suite
- [ ] Check for merge conflicts
- [ ] Review warnings
## Ready for
- [ ] Code review
- [ ] Commit
/craftsman:plan → Identifies tasks
/craftsman:parallel → Groups and executes in parallel
/craftsman:verify → Validates all results
/craftsman:git → Commits changes
Acceleration: "Just run everything at once" → Check dependencies first. Parallel with conflicts = corruption.
Over-optimization: "Parallelize everything" → Not all tasks benefit. Simple sequential is fine for 2-3 small tasks.
What SKILL.md sets; muted values are Claude Code's defaults
opusxhigh23 skills in this plugin
/agent-designDesign AI agents using the 3P pattern (Perceive/Plan/Perform). Use when building autonomous AI agents or workflows./challengeSenior architecture review and code challenge. Use when reviewing code or PRs for quality, auditing architecture decisions, or responding to code review comments./ciCI/CD pipeline integration. Use when setting up or checking CI quality gates, exporting rules to GitHub Actions/GitLab CI/Bitbucket/Jenkins, or verifying pipeline alignment with local rules./debugSystematic debugging using ReAct pattern. Use when encountering bugs, errors, unexpected behavior, test failures, or performance issues. Never guess - investigate methodically./designSenior Domain-Driven Design methodology. Use for creating entities, value objects, aggregates, or designing domain models. Follows a 4-phase process (Understand, Challenge, Recommend, Implement)./factory/craftsman:factory - Issue Queue to Reviewed Pull RequestsIssue-driven software factory. Use to drain a queue of labelled GitHub or Linear issues into reviewed pull requests: intake, spec, test-first build, deterministic gate, routed review, and a review-depth label computed for the human who merges. Never merges.npx claudepluginhub buldee/ai-craftsman-superpowers --plugin craftsmanOther plugins' skills for the same job