[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EP9ETPCKSCKTR3Z512EXTX":3,"skill-same:01M6EP9ETPCKSCKTR3Z512EXTX":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":30,"linkOnly":31,"markdownContent":32,"markdownBody":33,"frontMatter":34,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":40,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M6EP9ETPCKSCKTR3Z512EXTX","parallel-execution",null,"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.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcloudai-x\u002Fparallel-execution\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29],"execution","parallel","parallel execution","tasks","run","subagent","tool","subagents","use","task","patterns","2026-11-10 10:12:30",false,"---\nname: parallel-execution\ndescription: 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.\n---\n\n# Parallel Execution Patterns\n\n## Core Concept\n\nParallel 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.\n\n**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.\n\n## Execution Protocol\n\n### Step 1: Identify Parallelizable Tasks\n\nBefore spawning, verify tasks are independent:\n- No task depends on another's output\n- Tasks target different files or concerns\n- Can run simultaneously without conflicts\n\n### Step 2: Prepare Dynamic Subagent Prompts\n\nEach subagent receives a custom prompt defining its role:\n\n```\nYou are a [ROLE] specialist for this specific task.\n\nTask: [CLEAR DESCRIPTION]\n\nContext:\n[RELEVANT CONTEXT ABOUT THE CODEBASE\u002FPROJECT]\n\nFiles to work with:\n[SPECIFIC FILES OR PATTERNS]\n\nOutput format:\n[EXPECTED OUTPUT STRUCTURE]\n\nFocus areas:\n- [PRIORITY 1]\n- [PRIORITY 2]\n```\n\n### Step 3: Launch All Tasks in ONE Message\n\n**CRITICAL**: Make ALL Task calls in the SAME assistant message:\n\n```\nI'm launching N parallel subagents:\n\n[Task 1]\ndescription: \"Subagent A - [brief purpose]\"\nprompt: \"[detailed instructions for subagent A]\"\nrun_in_background: true\n\n[Task 2]\ndescription: \"Subagent B - [brief purpose]\"\nprompt: \"[detailed instructions for subagent B]\"\nrun_in_background: true\n\n[Task 3]\ndescription: \"Subagent C - [brief purpose]\"\nprompt: \"[detailed instructions for subagent C]\"\nrun_in_background: true\n```\n\n### Step 4: Retrieve Results with TaskOutput\n\nAfter launching, retrieve each result:\n\n```\n[Wait for completion, then retrieve]\n\nTaskOutput: task_1_id\nTaskOutput: task_2_id\nTaskOutput: task_3_id\n```\n\n### Step 5: Synthesize Results\n\nCombine all subagent outputs into unified result:\n- Merge related findings\n- Resolve conflicts between recommendations\n- Prioritize by severity\u002Fimportance\n- Create actionable summary\n\n## Dynamic Subagent Patterns\n\n### Pattern 1: Task-Based Parallelization\n\nWhen you have N tasks to implement, spawn N subagents:\n\n```\nPlan:\n1. Implement auth module\n2. Create API endpoints\n3. Add database schema\n4. Write unit tests\n5. Update documentation\n\nSpawn 5 subagents (one per task):\n- Subagent 1: Implements auth module\n- Subagent 2: Creates API endpoints\n- Subagent 3: Adds database schema\n- Subagent 4: Writes unit tests\n- Subagent 5: Updates documentation\n```\n\n### Pattern 2: Directory-Based Parallelization\n\nAnalyze multiple directories simultaneously:\n\n```\nDirectories: src\u002Fauth, src\u002Fapi, src\u002Fdb\n\nSpawn 3 subagents:\n- Subagent 1: Analyzes src\u002Fauth\n- Subagent 2: Analyzes src\u002Fapi\n- Subagent 3: Analyzes src\u002Fdb\n```\n\n### Pattern 3: Perspective-Based Parallelization\n\nReview from multiple angles simultaneously:\n\n```\nPerspectives: Security, Performance, Testing, Architecture\n\nSpawn 4 subagents:\n- Subagent 1: Security review\n- Subagent 2: Performance analysis\n- Subagent 3: Test coverage review\n- Subagent 4: Architecture assessment\n```\n\n## TodoWrite Integration\n\nWhen using parallel execution, TodoWrite behavior differs:\n\n**Sequential execution**: Only ONE task `in_progress` at a time\n**Parallel execution**: MULTIPLE tasks can be `in_progress` simultaneously\n\n```\n# Before launching parallel tasks\ntodos = [\n  { content: \"Task A\", status: \"in_progress\" },\n  { content: \"Task B\", status: \"in_progress\" },\n  { content: \"Task C\", status: \"in_progress\" },\n  { content: \"Synthesize results\", status: \"pending\" }\n]\n\n# After each TaskOutput retrieval, mark as completed\ntodos = [\n  { content: \"Task A\", status: \"completed\" },\n  { content: \"Task B\", status: \"completed\" },\n  { content: \"Task C\", status: \"completed\" },\n  { content: \"Synthesize results\", status: \"in_progress\" }\n]\n```\n\n## When to Use Parallel Execution\n\n**Good candidates:**\n- Multiple independent analyses (code review, security, tests)\n- Multi-file processing where files are independent\n- Exploratory tasks with different perspectives\n- Verification tasks with different checks\n- Feature implementation with independent components\n\n**Avoid parallelization when:**\n- Tasks have dependencies (Task B needs Task A's output)\n- Sequential workflows are required (commit -> push -> PR)\n- Tasks modify the same files (risk of conflicts)\n- Order matters for correctness\n\n## Performance Benefits\n\n| Approach | 5 Tasks @ 30s each | Total Time |\n|----------|-------------------|------------|\n| Sequential | 30s + 30s + 30s + 30s + 30s | ~150s |\n| Parallel | All 5 run simultaneously | ~30s |\n\nParallel execution is approximately Nx faster where N is the number of independent tasks.\n\n## Example: Feature Implementation\n\n**User request**: \"Implement user authentication with login, registration, and password reset\"\n\n**Orchestrator creates plan**:\n1. Implement login endpoint\n2. Implement registration endpoint\n3. Implement password reset endpoint\n4. Add authentication middleware\n5. Write integration tests\n\n**Parallel execution**:\n```\nLaunching 5 subagents in parallel:\n\n[Task 1] Login endpoint implementation\n[Task 2] Registration endpoint implementation\n[Task 3] Password reset endpoint implementation\n[Task 4] Auth middleware implementation\n[Task 5] Integration test writing\n\nAll tasks run simultaneously...\n\n[Collect results via TaskOutput]\n\n[Synthesize into cohesive implementation]\n```\n\n## Troubleshooting\n\n**Tasks running sequentially?**\n- Verify ALL Task calls are in SINGLE message\n- Check `run_in_background: true` is set for each\n\n**Results not available?**\n- Use TaskOutput with correct task IDs\n- Wait for tasks to complete before retrieving\n\n**Conflicts in output?**\n- Ensure tasks don't modify same files\n- Add conflict resolution in synthesis step\n","# Parallel Execution Patterns\n\n## Core Concept\n\nParallel 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.\n\n**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.\n\n## Execution Protocol\n\n### Step 1: Identify Parallelizable Tasks\n\nBefore spawning, verify tasks are independent:\n- No task depends on another's output\n- Tasks target different files or concerns\n- Can run simultaneously without conflicts\n\n### Step 2: Prepare Dynamic Subagent Prompts\n\nEach subagent receives a custom prompt defining its role:\n\n```\nYou are a [ROLE] specialist for this specific task.\n\nTask: [CLEAR DESCRIPTION]\n\nContext:\n[RELEVANT CONTEXT ABOUT THE CODEBASE\u002FPROJECT]\n\nFiles to work with:\n[SPECIFIC FILES OR PATTERNS]\n\nOutput format:\n[EXPECTED OUTPUT STRUCTURE]\n\nFocus areas:\n- [PRIORITY 1]\n- [PRIORITY 2]\n```\n\n### Step 3: Launch All Tasks in ONE Message\n\n**CRITICAL**: Make ALL Task calls in the SAME assistant message:\n\n```\nI'm launching N parallel subagents:\n\n[Task 1]\ndescription: \"Subagent A - [brief purpose]\"\nprompt: \"[detailed instructions for subagent A]\"\nrun_in_background: true\n\n[Task 2]\ndescription: \"Subagent B - [brief purpose]\"\nprompt: \"[detailed instructions for subagent B]\"\nrun_in_background: true\n\n[Task 3]\ndescription: \"Subagent C - [brief purpose]\"\nprompt: \"[detailed instructions for subagent C]\"\nrun_in_background: true\n```\n\n### Step 4: Retrieve Results with TaskOutput\n\nAfter launching, retrieve each result:\n\n```\n[Wait for completion, then retrieve]\n\nTaskOutput: task_1_id\nTaskOutput: task_2_id\nTaskOutput: task_3_id\n```\n\n### Step 5: Synthesize Results\n\nCombine all subagent outputs into unified result:\n- Merge related findings\n- Resolve conflicts between recommendations\n- Prioritize by severity\u002Fimportance\n- Create actionable summary\n\n## Dynamic Subagent Patterns\n\n### Pattern 1: Task-Based Parallelization\n\nWhen you have N tasks to implement, spawn N subagents:\n\n```\nPlan:\n1. Implement auth module\n2. Create API endpoints\n3. Add database schema\n4. Write unit tests\n5. Update documentation\n\nSpawn 5 subagents (one per task):\n- Subagent 1: Implements auth module\n- Subagent 2: Creates API endpoints\n- Subagent 3: Adds database schema\n- Subagent 4: Writes unit tests\n- Subagent 5: Updates documentation\n```\n\n### Pattern 2: Directory-Based Parallelization\n\nAnalyze multiple directories simultaneously:\n\n```\nDirectories: src\u002Fauth, src\u002Fapi, src\u002Fdb\n\nSpawn 3 subagents:\n- Subagent 1: Analyzes src\u002Fauth\n- Subagent 2: Analyzes src\u002Fapi\n- Subagent 3: Analyzes src\u002Fdb\n```\n\n### Pattern 3: Perspective-Based Parallelization\n\nReview from multiple angles simultaneously:\n\n```\nPerspectives: Security, Performance, Testing, Architecture\n\nSpawn 4 subagents:\n- Subagent 1: Security review\n- Subagent 2: Performance analysis\n- Subagent 3: Test coverage review\n- Subagent 4: Architecture assessment\n```\n\n## TodoWrite Integration\n\nWhen using parallel execution, TodoWrite behavior differs:\n\n**Sequential execution**: Only ONE task `in_progress` at a time\n**Parallel execution**: MULTIPLE tasks can be `in_progress` simultaneously\n\n```\n# Before launching parallel tasks\ntodos = [\n  { content: \"Task A\", status: \"in_progress\" },\n  { content: \"Task B\", status: \"in_progress\" },\n  { content: \"Task C\", status: \"in_progress\" },\n  { content: \"Synthesize results\", status: \"pending\" }\n]\n\n# After each TaskOutput retrieval, mark as completed\ntodos = [\n  { content: \"Task A\", status: \"completed\" },\n  { content: \"Task B\", status: \"completed\" },\n  { content: \"Task C\", status: \"completed\" },\n  { content: \"Synthesize results\", status: \"in_progress\" }\n]\n```\n\n## When to Use Parallel Execution\n\n**Good candidates:**\n- Multiple independent analyses (code review, security, tests)\n- Multi-file processing where files are independent\n- Exploratory tasks with different perspectives\n- Verification tasks with different checks\n- Feature implementation with independent components\n\n**Avoid parallelization when:**\n- Tasks have dependencies (Task B needs Task A's output)\n- Sequential workflows are required (commit -> push -> PR)\n- Tasks modify the same files (risk of conflicts)\n- Order matters for correctness\n\n## Performance Benefits\n\n| Approach | 5 Tasks @ 30s each | Total Time |\n|----------|-------------------|------------|\n| Sequential | 30s + 30s + 30s + 30s + 30s | ~150s |\n| Parallel | All 5 run simultaneously | ~30s |\n\nParallel execution is approximately Nx faster where N is the number of independent tasks.\n\n## Example: Feature Implementation\n\n**User request**: \"Implement user authentication with login, registration, and password reset\"\n\n**Orchestrator creates plan**:\n1. Implement login endpoint\n2. Implement registration endpoint\n3. Implement password reset endpoint\n4. Add authentication middleware\n5. Write integration tests\n\n**Parallel execution**:\n```\nLaunching 5 subagents in parallel:\n\n[Task 1] Login endpoint implementation\n[Task 2] Registration endpoint implementation\n[Task 3] Password reset endpoint implementation\n[Task 4] Auth middleware implementation\n[Task 5] Integration test writing\n\nAll tasks run simultaneously...\n\n[Collect results via TaskOutput]\n\n[Synthesize into cohesive implementation]\n```\n\n## Troubleshooting\n\n**Tasks running sequentially?**\n- Verify ALL Task calls are in SINGLE message\n- Check `run_in_background: true` is set for each\n\n**Results not available?**\n- Use TaskOutput with correct task IDs\n- Wait for tasks to complete before retrieving\n\n**Conflicts in output?**\n- Ensure tasks don't modify same files\n- Add conflict resolution in synthesis step\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fcloudai-x\u002Fparallel-execution",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill parallel-execution",{"tool":50,"command":51},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill parallel-execution",{"tool":53,"command":54},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill parallel-execution","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcloudai-x\u002Fparallel-execution\u002FSKILL.md",true,[58],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"skill-report.json","REFERENCE","参考文档",10913,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcloudai-x\u002Fparallel-execution\u002Fskill-report.json",[65,74,83,92,98,104],{"skillNo":66,"name":67,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":30},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[71,72,73],"model","model hierarchy","model hierarchy skill",{"skillNo":75,"name":76,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":30},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[80,81,82],"MCP","zoom","zoom mcp",{"skillNo":84,"name":85,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":30},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[89,90,91,81],"sdk","zoom apps sdk","apps",{"skillNo":93,"name":94,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":30},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[94],{"skillNo":99,"name":100,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":30},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[100],{"skillNo":105,"name":106,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":30},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[106]]