MCPInstall

parallel-execution

Patterns for parallel subagent execution using the Agent tool (formerly Task). Use when coordinating multiple independent tasks, spawning dynamic subagents, or implementing features that can be parallelized.

Installs
210
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/cloudai-x/claude-workflow-v2 --skill parallel-execution
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads parallel-execution automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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 Agent tool (named Task before Claude Code 2.1.63; Task still works as an alias). Subagents run in the background by default, so N tasks run concurrently, dramatically reducing total execution time.

Critical Rule: ALL Agent calls MUST be in a SINGLE assistant message for true parallelism. If the calls are in separate messages, they launch one after another.

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 Agent calls in the SAME assistant message:

I'm launching N parallel subagents:

[Agent 1]
description: "Subagent A - [brief purpose]"
prompt: "[detailed instructions for subagent A]"

[Agent 2]
description: "Subagent B - [brief purpose]"
prompt: "[detailed instructions for subagent B]"

[Agent 3]
description: "Subagent C - [brief purpose]"
prompt: "[detailed instructions for subagent C]"

On Claude Code versions that still run subagents in the foreground by default, add run_in_background: true to each call.

Step 4: Collect Results

Each subagent returns its final result to the parent conversation automatically when it finishes. Wait until every subagent has reported before synthesizing; do not poll, and do not start dependent work early. (The separate TaskOutput call is deprecated.)

Step 5: Synthesize Results

Combine all subagent outputs into unified result:

  • Merge related findings
  • Resolve conflicts between recommendations
  • Prioritize by severity/importance
  • Create actionable summary

Dynamic Subagent Patterns

Pattern 1: Task-Based Parallelization

When you have N tasks to implement, spawn N subagents:

Plan:
1. Implement auth module
2. Create API endpoints
3. Add database schema
4. Write unit tests
5. Update documentation

Wave 1 - spawn 3 subagents (independent of each other):
- Subagent 1: Implements auth module
- Subagent 2: Creates API endpoints
- Subagent 3: Adds database schema

Wave 2 - after wave 1 has finished (these depend on its output):
- Subagent 4: Writes unit tests
- Subagent 5: Updates documentation

Pattern 2: Directory-Based Parallelization

Analyze multiple directories simultaneously:

Directories: src/auth, src/api, src/db

Spawn 3 subagents:
- Subagent 1: Analyzes src/auth
- Subagent 2: Analyzes src/api
- Subagent 3: Analyzes src/db

Pattern 3: Perspective-Based Parallelization

Review from multiple angles simultaneously:

Perspectives: Security, Performance, Testing, Architecture

Spawn 4 subagents:
- Subagent 1: Security review
- Subagent 2: Performance analysis
- Subagent 3: Test coverage review
- Subagent 4: Architecture assessment

Task List Integration

When using parallel execution, task tracking (TaskCreate/TaskUpdate, or TodoWrite on older versions) differs:

Sequential execution: Only ONE task in_progress at a time Parallel execution: MULTIPLE tasks can be in_progress simultaneously

# Before launching parallel tasks
todos = [
  { content: "Task A", status: "in_progress" },
  { content: "Task B", status: "in_progress" },
  { content: "Task C", status: "in_progress" },
  { content: "Synthesize results", status: "pending" }
]

# As each subagent reports back, mark its task completed
todos = [
  { content: "Task A", status: "completed" },
  { content: "Task B", status: "completed" },
  { content: "Task C", status: "completed" },
  { content: "Synthesize results", status: "in_progress" }
]

When to Use Parallel Execution

Good candidates:

  • Multiple independent analyses (code review, security, tests)
  • Multi-file processing where files are independent
  • Exploratory tasks with different perspectives
  • Verification tasks with different checks
  • Feature implementation with independent components

Avoid parallelization when:

  • Tasks have dependencies (Task B needs Task A's output)
  • Sequential workflows are required (commit -> push -> PR)
  • Tasks modify the same files (risk of conflicts)
  • Order matters for correctness

Performance Benefits

Approach5 Tasks @ 30s eachTotal Time
Sequential30s + 30s + 30s + 30s + 30s~150s
ParallelAll 5 run simultaneously~30s

Parallel execution is approximately Nx faster where N is the number of independent tasks.

Example: Feature Implementation

User request: "Implement user authentication with login, registration, and password reset"

Orchestrator creates plan:

  1. Implement login endpoint
  2. Implement registration endpoint
  3. Implement password reset endpoint
  4. Add authentication middleware
  5. Write integration tests

Parallel execution:

Wave 1 - launching 4 subagents in parallel:

[Agent 1] Login endpoint implementation
[Agent 2] Registration endpoint implementation
[Agent 3] Password reset endpoint implementation
[Agent 4] Auth middleware implementation

[Results arrive as each subagent finishes]

Wave 2 - depends on wave 1:

[Agent 5] Integration test writing

[Synthesize into cohesive implementation]

Troubleshooting

Tasks running sequentially?

  • Verify ALL Agent calls are in a SINGLE message
  • On older Claude Code versions, check run_in_background: true is set for each

Results not available?

  • Results are delivered when each subagent finishes; wait for all of them
  • A subagent that was denied a permission may return without finishing its work; check its report

Conflicts in output?

  • Ensure tasks don't modify same files
  • Add conflict resolution in synthesis step

FAQ

What does the parallel-execution skill do?

Patterns for parallel subagent execution using the Agent tool (formerly Task). Use when coordinating multiple independent tasks, spawning dynamic subagents, or implementing features that can be parallelized.

How do I install parallel-execution?

Run npx skills add https://github.com/cloudai-x/claude-workflow-v2 --skill parallel-execution in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/parallel-execution/ (personal) or .claude/skills/parallel-execution/ (project).

Which AI agents can use parallel-execution?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is parallel-execution safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains parallel-execution?

It is published by cloudai-x in cloudai-x/claude-workflow-v2. It has 210 recorded installs.

More from cloudai-x/claude-workflow-v2

View all →

analyzing-projects

cloudai-x/claude-workflow-v2

Open the skill to read its SKILL.md instructions.

designing-architecture

cloudai-x/claude-workflow-v2

Open the skill to read its SKILL.md instructions.

convex-backend

cloudai-x/claude-workflow-v2

Open the skill to read its SKILL.md instructions.

Backend & APIs216 installs

optimizing-performance

cloudai-x/claude-workflow-v2

Open the skill to read its SKILL.md instructions.

managing-git

cloudai-x/claude-workflow-v2

Open the skill to read its SKILL.md instructions.

designing-apis

cloudai-x/claude-workflow-v2

Open the skill to read its SKILL.md instructions.

Popular ai & agents skills

View category →

google-agents-cli-publish

google/agents-cli

This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).

AI & Agents513.9K installs

google-agents-cli-eval

google/agents-cli

This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).

AI & Agents513.5K installs

skill-creator

anthropics/skills

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

OfficialAI & Agents416.4K installs

codex-pet

prime-skills/runcomfy-agent-skills

Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.

AI & Agents402.1K installs

full-output-enforcement

leonxlnx/taste-skill

Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.

AI & Agents401K installs

executing-plans

obra/superpowers

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

AI & Agents245.7K installs