parallel-execution

Solid

Patterns for parallel subagent execution using Task tool with run_in_background. Use when coordinating multiple independent tasks, spawning dynamic subagents, or implementing features that can be parallelized.

AI & Automation 1,320 stars 187 forks Updated 3 months ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
100
Recency 20%
50
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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]...

Details

Author
CloudAI-X
Repository
CloudAI-X/claude-workflow-v2
Created
5 months ago
Last Updated
3 months ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category