parallel-executionlisted
Install: claude install-skill CloudAI-X/claude-workflow-v2
# Parallel Execution Patterns
### When to Load
- **Trigger**: Multi-agent tasks, concurrent operations, spawning subagents, parallelizing independent work
- **Skip**: Single-step tasks or sequential workflows with no parallelization opportunity
## Core Concept
Parallel execution spawns multiple subagents simultaneously using the Task tool with `run_in_background: true`. This enables N tasks to run concurrently, dramatically reducing total execution time.
**Critical Rule**: ALL Task calls MUST be in a SINGLE assistant message for true parallelism. If Task calls are in separate messages, they run sequentially.
## Execution Protocol
### Step 1: Identify Parallelizable Tasks
Before spawning, verify tasks are independent:
- No task depends on another's output
- Tasks target different files or concerns
- Can run simultaneously without conflicts
### Step 2: Prepare Dynamic Subagent Prompts
Each subagent receives a custom prompt defining its role:
```
You are a [ROLE] specialist for this specific task.
Task: [CLEAR DESCRIPTION]
Context:
[RELEVANT CONTEXT ABOUT THE CODEBASE/PROJECT]
Files to work with:
[SPECIFIC FILES OR PATTERNS]
Output format:
[EXPECTED OUTPUT STRUCTURE]
Focus areas:
- [PRIORITY 1]
- [PRIORITY 2]
```
### Step 3: Launch All Tasks in ONE Message
**CRITICAL**: Make ALL Task calls in the SAME assistant message:
```
I'm launching N parallel subagents:
[Task 1]
description: "Subagent A - [brief purpose]"
prompt: "[detailed instructions for subagent A]