skills/cloudai-x/parallel-execution/SKILL.md
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.
npx skillsauth add aiskillstore/marketplace parallel-executionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
Before spawning, verify tasks are independent:
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]
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]"
run_in_background: true
[Task 2]
description: "Subagent B - [brief purpose]"
prompt: "[detailed instructions for subagent B]"
run_in_background: true
[Task 3]
description: "Subagent C - [brief purpose]"
prompt: "[detailed instructions for subagent C]"
run_in_background: true
After launching, retrieve each result:
[Wait for completion, then retrieve]
TaskOutput: task_1_id
TaskOutput: task_2_id
TaskOutput: task_3_id
Combine all subagent outputs into unified result:
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
Spawn 5 subagents (one per task):
- Subagent 1: Implements auth module
- Subagent 2: Creates API endpoints
- Subagent 3: Adds database schema
- Subagent 4: Writes unit tests
- Subagent 5: Updates documentation
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
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
When using parallel execution, TodoWrite behavior 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" }
]
# After each TaskOutput retrieval, mark as completed
todos = [
{ content: "Task A", status: "completed" },
{ content: "Task B", status: "completed" },
{ content: "Task C", status: "completed" },
{ content: "Synthesize results", status: "in_progress" }
]
Good candidates:
Avoid parallelization when:
| Approach | 5 Tasks @ 30s each | Total Time | |----------|-------------------|------------| | Sequential | 30s + 30s + 30s + 30s + 30s | ~150s | | Parallel | All 5 run simultaneously | ~30s |
Parallel execution is approximately Nx faster where N is the number of independent tasks.
User request: "Implement user authentication with login, registration, and password reset"
Orchestrator creates plan:
Parallel execution:
Launching 5 subagents in parallel:
[Task 1] Login endpoint implementation
[Task 2] Registration endpoint implementation
[Task 3] Password reset endpoint implementation
[Task 4] Auth middleware implementation
[Task 5] Integration test writing
All tasks run simultaneously...
[Collect results via TaskOutput]
[Synthesize into cohesive implementation]
Tasks running sequentially?
run_in_background: true is set for eachResults not available?
Conflicts in output?
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.