spawn-parallel
Pattern for spawning parallel subagents efficiently. Use when you need multiple independent tasks done concurrently.
Best use case
spawn-parallel is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Pattern for spawning parallel subagents efficiently. Use when you need multiple independent tasks done concurrently.
Teams using spawn-parallel should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/spawn-parallel/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How spawn-parallel Compares
| Feature / Agent | spawn-parallel | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Pattern for spawning parallel subagents efficiently. Use when you need multiple independent tasks done concurrently.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Spawn Parallel Skill
Pattern for spawning and coordinating parallel subagents.
## When to Load This Skill
- You have multiple independent tasks
- Tasks don't depend on each other's output
- You want to maximize concurrency
## Spawning Pattern
### 1. Identify Independent Tasks
Tasks are independent if:
- No data dependencies between them
- No file conflicts (different files or read-only)
- Can complete in any order
### 2. Prepare Contexts
Each subagent needs minimal, focused context:
```json
{"task":{"id":"unique_id","description":"specific task"},"context_files":["only relevant files"],"boundaries":{"owns":["files this agent can modify"],"reads":["files for reference"]},"output_path":"memory/tasks/{id}/output.json"}
```
### 3. Spawn All at Once
Use multiple Task calls in single response:
```
Task(subagent_type: "implementer", model: "sonnet", prompt: "Task 1...")
Task(subagent_type: "implementer", model: "sonnet", prompt: "Task 2...")
Task(subagent_type: "implementer", model: "sonnet", prompt: "Task 3...")
```
**Subagent Type Reference (Custom Dotagent Agents):**
| Type | Model | Use For |
|------|-------|---------|
| `explorer` | haiku | Fast codebase scouting |
| `implementer` | sonnet | Focused code writing |
| `verifier` | haiku | Independent verification |
| `tester` | haiku | Test execution |
**Note:** These are custom dotagent agents (lowercase). Built-in Claude Code
agents like `Explore` and `Plan` (capitalized) have different behavior.
### 4. Collect and Validate
After all complete:
- Check each output file exists
- Validate against schema
- Handle failures (retry or escalate)
## Coordination Rules
### Prevent Conflicts
- Define clear file ownership per agent
- Use contracts for shared interfaces
- Read-only access to shared resources
### Handle Failures
Individual failures don't fail the batch. Apply recovery strategies from
@.claude/skills/error-recovery/SKILL.md:
```
FOR each failed task in batch:
IF output malformed/timeout:
→ Simple Retry (same prompt, up to 3x)
ELIF agent said "unclear"/"don't understand":
→ Context Enhancement (add files, clarify)
ELIF partial completion:
→ Scope Reduction (split into subtasks)
ELIF boundary/contract violation:
→ Escalation (spawn contract-resolver)
ELIF 3+ attempts failed:
→ Abort, record failure, continue with others
```
**Retry with Context Enhancement Example:**
```
Task(
subagent_type: "implementer",
model: "sonnet",
prompt: |
## RETRY - Previous attempt failed
Error: "Unclear how to connect to database"
## Additional Context
See database config: @src/config/database.ts
Connection pattern: @src/services/db-connection.ts
## Original Task
{original_task_description}
Output: memory/tasks/{id}/output.json
)
```
## Example: Parallel Explorers
```
# Spawn 3 custom explorer agents in parallel
Task(
subagent_type: "explorer", # Custom dotagent agent
model: "haiku",
prompt: "Explore authentication code. Return compact JSON with findings."
)
Task(
subagent_type: "explorer",
model: "haiku",
prompt: "Explore API routes. Return compact JSON with findings."
)
Task(
subagent_type: "explorer",
model: "haiku",
prompt: "Explore database models. Return compact JSON with findings."
)
```
All run concurrently, results collected when all complete.
## Example: Mixed Agent Types
```
# Parallel implementation with different boundaries
Task(
subagent_type: "implementer",
model: "sonnet",
prompt: |
Task: Add user validation
Boundaries: owns=[src/validators/user.ts], reads=[src/types/]
Output: memory/tasks/task-001/output.json
)
Task(
subagent_type: "implementer",
model: "sonnet",
prompt: |
Task: Add email service
Boundaries: owns=[src/services/email.ts], reads=[src/config/]
Output: memory/tasks/task-002/output.json
)
```Related Skills
test-parallelizer
Test Parallelizer - Auto-activating skill for Test Automation. Triggers on: test parallelizer, test parallelizer Part of the Test Automation skill category.
parallel-swarm-implementation
Loop 2 of the Three-Loop Integrated Development System. META-SKILL that dynamically compiles Loop 1 plans into agent+skill execution graphs. Queen Coordinator selects optimal agents from 86-agent registry and assigns skills (when available) or custom instructions. 9-step swarm with theater detection and reality validation. Receives plans from research-driven-planning, feeds to cicd-intelligent-recovery. Use for adaptive, theater-free implementation.
parallel-agents
Dispatch multiple agents to work on independent problems concurrently. Use when facing 3+ independent failures or tasks.
spawn-terminal
Spawn a new terminal window to run CLI commands (ffmpeg, curl, python, etc.). Use for non-AI command execution.
spawn-agent
Spawn an AI coding agent in a new terminal (Claude, Codex, Gemini, Cursor, OpenCode, Copilot). Defaults to Claude Code if unspecified.
spawn
Skills for spawning external processes - AI coding agents and generic CLI commands in new terminal windows. Parent skill category for agent and terminal spawning.
dispatching-parallel-agents
Dispatches one subagent per independent domain to parallelize investigation/fixes. Use when you have 2+ unrelated failures (e.g., separate failing test files, subsystems, bugs) with no shared state or ordering dependencies.
parallel-workflows
Optimizes parallel execution of multiple tasks. Use when user mentions 並列で実行, 同時にやって, まとめてやって, run in parallel, do these together. Do NOT load for: 単一タスク, 順次実行が必要な作業, 依存関係のあるタスク.
parallel-task
Only to be triggered by explicit /parallel-task commands.
parallel-task-spark
Only to be triggered by explicit /parallel-task-spark commands.
orchestrating-parallel-agents
Spawns multiple AI coding agents to work on related GitHub issues concurrently using git worktrees. Use when breaking down a large feature into multiple issues, running parallel agents with --print flag, or managing wave-based execution of related tasks.
Parallel Web Systems API
## Overview