{"id":"6f5b3671-8bfa-4f3f-9714-2fed4edf575b","shortId":"vPXBgU","kind":"skill","title":"dispatching-parallel-agents","tagline":"Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies","description":"# Dispatching Parallel Agents\n\n## Overview\n\nWhen you have multiple unrelated failures (different test files, different subsystems, different bugs), investigating them sequentially wastes time. Each investigation is independent and can happen in parallel.\n\n**Core principle:** Dispatch one agent per independent problem domain. Let them work concurrently.\n\n## When to Use\n```dot\ndigraph when_to_use {\n    \"Multiple failures?\" [shape=diamond];\n    \"Are they independent?\" [shape=diamond];\n    \"Single agent investigates all\" [shape=box];\n    \"One agent per problem domain\" [shape=box];\n    \"Can they work in parallel?\" [shape=diamond];\n    \"Sequential agents\" [shape=box];\n    \"Parallel dispatch\" [shape=box];\n\n    \"Multiple failures?\" -> \"Are they independent?\" [label=\"yes\"];\n    \"Are they independent?\" -> \"Single agent investigates all\" [label=\"no - related\"];\n    \"Are they independent?\" -> \"Can they work in parallel?\" [label=\"yes\"];\n    \"Can they work in parallel?\" -> \"Parallel dispatch\" [label=\"yes\"];\n    \"Can they work in parallel?\" -> \"Sequential agents\" [label=\"no - shared state\"];\n}\n```\n\n**Use when:**\n- 3+ test files failing with different root causes\n- Multiple subsystems broken independently\n- Each problem can be understood without context from others\n- No shared state between investigations\n\n**Don't use when:**\n- Failures are related (fix one might fix others)\n- Need to understand full system state\n- Agents would interfere with each other\n\n## The Pattern\n\n### 1. Identify Independent Domains\n\nGroup failures by what's broken:\n- File A tests: Tool approval flow\n- File B tests: Batch completion behavior\n- File C tests: Abort functionality\n\nEach domain is independent - fixing tool approval doesn't affect abort tests.\n\n### 2. Create Focused Agent Tasks\n\nEach agent gets:\n- **Specific scope:** One test file or subsystem\n- **Clear goal:** Make these tests pass\n- **Constraints:** Don't change other code\n- **Expected output:** Summary of what you found and fixed\n\n### 3. Dispatch in Parallel\n\n```typescript\n// In Claude Code / AI environment\nTask(\"Fix agent-tool-abort.test.ts failures\")\nTask(\"Fix batch-completion-behavior.test.ts failures\")\nTask(\"Fix tool-approval-race-conditions.test.ts failures\")\n// All three run concurrently\n```\n\n### 4. Review and Integrate\n\nWhen agents return:\n- Read each summary\n- Verify fixes don't conflict\n- Run full test suite\n- Integrate all changes\n\n## Agent Prompt Structure\n\nGood agent prompts are:\n1. **Focused** - One clear problem domain\n2. **Self-contained** - All context needed to understand the problem\n3. **Specific about output** - What should the agent return?\n\n```markdown\nFix the 3 failing tests in src/agents/agent-tool-abort.test.ts:\n\n1. \"should abort tool with partial output capture\" - expects 'interrupted at' in message\n2. \"should handle mixed completed and aborted tools\" - fast tool aborted instead of completed\n3. \"should properly track pendingToolCount\" - expects 3 results but gets 0\n\nThese are timing/race condition issues. Your task:\n\n1. Read the test file and understand what each test verifies\n2. Identify root cause - timing issues or actual bugs?\n3. Fix by:\n   - Replacing arbitrary timeouts with event-based waiting\n   - Fixing bugs in abort implementation if found\n   - Adjusting test expectations if testing changed behavior\n\nDo NOT just increase timeouts - find the real issue.\n\nReturn: Summary of what you found and what you fixed.\n```\n\n## Common Mistakes\n\n**❌ Too broad:** \"Fix all the tests\" - agent gets lost\n**✅ Specific:** \"Fix agent-tool-abort.test.ts\" - focused scope\n\n**❌ No context:** \"Fix the race condition\" - agent doesn't know where\n**✅ Context:** Paste the error messages and test names\n\n**❌ No constraints:** Agent might refactor everything\n**✅ Constraints:** \"Do NOT change production code\" or \"Fix tests only\"\n\n**❌ Vague output:** \"Fix it\" - you don't know what changed\n**✅ Specific:** \"Return summary of root cause and changes\"\n\n## When NOT to Use\n\n**Related failures:** Fixing one might fix others - investigate together first\n**Need full context:** Understanding requires seeing entire system\n**Exploratory debugging:** You don't know what's broken yet\n**Shared state:** Agents would interfere (editing same files, using same resources)\n\n## Real Example from Session\n\n**Scenario:** 6 test failures across 3 files after major refactoring\n\n**Failures:**\n- agent-tool-abort.test.ts: 3 failures (timing issues)\n- batch-completion-behavior.test.ts: 2 failures (tools not executing)\n- tool-approval-race-conditions.test.ts: 1 failure (execution count = 0)\n\n**Decision:** Independent domains - abort logic separate from batch completion separate from race conditions\n\n**Dispatch:**\n```\nAgent 1 → Fix agent-tool-abort.test.ts\nAgent 2 → Fix batch-completion-behavior.test.ts\nAgent 3 → Fix tool-approval-race-conditions.test.ts\n```\n\n**Results:**\n- Agent 1: Replaced timeouts with event-based waiting\n- Agent 2: Fixed event structure bug (threadId in wrong place)\n- Agent 3: Added wait for async tool execution to complete\n\n**Integration:** All fixes independent, no conflicts, full suite green\n\n**Time saved:** 3 problems solved in parallel vs sequentially\n\n## Key Benefits\n\n1. **Parallelization** - Multiple investigations happen simultaneously\n2. **Focus** - Each agent has narrow scope, less context to track\n3. **Independence** - Agents don't interfere with each other\n4. **Speed** - 3 problems solved in time of 1\n\n## Verification\n\nAfter agents return:\n1. **Review each summary** - Understand what changed\n2. **Check for conflicts** - Did agents edit same code?\n3. **Run full suite** - Verify all fixes work together\n4. **Spot check** - Agents can make systematic errors\n\n## Real-World Impact\n\nFrom debugging session (2025-10-03):\n- 6 failures across 3 files\n- 3 agents dispatched in parallel\n- All investigations completed concurrently\n- All fixes integrated successfully\n- Zero conflicts between agent changes\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["dispatching","parallel","agents","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding"],"capabilities":["skill","source-sickn33","skill-dispatching-parallel-agents","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/dispatching-parallel-agents","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34831 github stars · SKILL.md body (6,236 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T06:51:04.554Z","embedding":null,"createdAt":"2026-04-18T21:36:09.055Z","updatedAt":"2026-04-24T06:51:04.554Z","lastSeenAt":"2026-04-24T06:51:04.554Z","tsv":"'-03':786 '-10':785 '0':413,628 '1':212,342,376,421,624,644,657,705,739,744 '2':8,251,348,389,432,618,648,666,711,751 '2025':784 '3':160,287,359,371,403,409,441,606,613,652,676,696,722,733,760,790,792 '4':313,731,769 '6':602,787 'abort':237,249,378,395,399,455,632 'across':605,789 'actual':439 'ad':677 'adjust':459 'affect':248 'agent':4,24,57,84,90,104,122,153,204,254,257,318,335,339,366,493,507,522,588,643,647,651,656,665,675,714,724,742,756,772,793,808 'agent-tool-abort.test.ts':299,498,612,646 'ai':295 'approv':226,245 'arbitrari':445 'ask':843 'async':680 'b':229 'base':450,663 'batch':231,636 'batch-completion-behavior.test.ts':303,617,650 'behavior':233,465 'benefit':704 'boundari':851 'box':88,95,106,110 'broad':488 'broken':170,221,584 'bug':38,440,453,670 'c':235 'captur':383 'caus':167,435,551 'chang':275,334,464,529,545,553,750,809 'check':752,771 'clarif':845 'claud':293 'clear':266,345,818 'code':277,294,531,759 'common':485 'complet':232,393,402,637,684,799 'concurr':65,312,800 'condit':417,506,641 'conflict':327,690,754,806 'constraint':272,521,526 'contain':351 'context':178,353,502,512,570,719 'core':53 'count':627 'creat':252 'criteria':854 'debug':577,782 'decis':629 'depend':21 'describ':822 'diamond':77,82,102 'differ':32,35,37,165 'digraph':70 'dispatch':2,22,55,108,144,288,642,794 'dispatching-parallel-ag':1 'doesn':246,508 'domain':61,93,215,240,347,631 'dot':69 'edit':591,757 'entir':574 'environ':296,834 'environment-specif':833 'error':515,776 'event':449,662,668 'event-bas':448,661 'everyth':525 'exampl':598 'execut':622,626,682 'expect':278,384,408,461 'expert':839 'exploratori':576 'face':7 'fail':163,372 'failur':31,75,112,190,217,300,304,308,559,604,611,614,619,625,788 'fast':397 'file':34,162,222,228,234,263,425,593,607,791 'find':471 'first':567 'fix':193,196,243,286,298,302,306,324,369,442,452,484,489,497,503,533,538,560,563,645,649,653,667,687,766,802 'flow':227 'focus':253,343,499,712 'found':284,458,480 'full':201,329,569,691,762 'function':238 'get':258,412,494 'goal':267 'good':338 'green':693 'group':216 'handl':391 'happen':50,709 'identifi':213,433 'impact':780 'implement':456 'increas':469 'independ':9,47,59,80,115,120,130,171,214,242,630,688,723 'input':848 'instead':400 'integr':316,332,685,803 'interfer':206,590,727 'interrupt':385 'investig':39,45,85,123,185,565,708,798 'issu':418,437,474,616 'key':703 'know':510,543,581 'label':116,125,136,145,154 'less':718 'let':62 'limit':810 'logic':633 'lost':495 'major':609 'make':268,774 'markdown':368 'match':819 'messag':388,516 'might':195,523,562 'miss':856 'mistak':486 'mix':392 'multipl':29,74,111,168,707 'name':519 'narrow':716 'need':198,354,568 'one':56,89,194,261,344,561 'other':180,197,564 'output':279,362,382,537,828 'overview':25 'parallel':3,23,52,100,107,135,142,143,151,290,700,706,796 'partial':381 'pass':271 'past':513 'pattern':211 'pendingtoolcount':407 'per':58,91 'permiss':849 'place':674 'principl':54 'problem':60,92,173,346,358,697,734 'product':530 'prompt':336,340 'proper':405 'race':505,640 'read':320,422 'real':473,597,778 'real-world':777 'refactor':524,610 'relat':127,192,558 'replac':444,658 'requir':572,847 'resourc':596 'result':410,655 'return':319,367,475,547,743 'review':314,745,840 'root':166,434,550 'run':311,328,761 'safeti':850 'save':695 'scenario':601 'scope':260,500,717,821 'see':573 'self':350 'self-contain':349 'separ':634,638 'sequenti':20,41,103,152,702 'session':600,783 'shape':76,81,87,94,101,105,109 'share':17,156,182,586 'simultan':710 'singl':83,121 'skill':813 'skill-dispatching-parallel-agents' 'solv':698,735 'source-sickn33' 'specif':259,360,496,546,835 'speed':732 'spot':770 'src/agents/agent-tool-abort.test.ts':375 'state':18,157,183,203,587 'stop':841 'structur':337,669 'substitut':831 'subsystem':36,169,265 'success':804,853 'suit':331,692,763 'summari':280,322,476,548,747 'system':202,575 'systemat':775 'task':10,255,297,301,305,420,817 'test':33,161,224,230,236,250,262,270,330,373,424,430,460,463,492,518,534,603,837 'threadid':671 'three':310 'time':43,436,615,694,737 'timeout':446,470,659 'timing/race':416 'togeth':566,768 'tool':225,244,379,396,398,620,681 'tool-approval-race-conditions.test.ts':307,623,654 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'track':406,721 'treat':826 'typescript':291 'understand':200,356,427,571,748 'understood':176 'unrel':30 'use':5,68,73,158,188,557,594,811 'vagu':536 'valid':836 'verif':740 'verifi':323,431,764 'vs':701 'wait':451,664,678 'wast':42 'without':16,177 'work':14,64,98,133,140,149,767 'world':779 'would':205,589 'wrong':673 'yes':117,137,146 'yet':585 'zero':805","prices":[{"id":"37df1e36-bc46-49e1-9fbb-d3eca63b0442","listingId":"6f5b3671-8bfa-4f3f-9714-2fed4edf575b","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:36:09.055Z"}],"sources":[{"listingId":"6f5b3671-8bfa-4f3f-9714-2fed4edf575b","source":"github","sourceId":"sickn33/antigravity-awesome-skills/dispatching-parallel-agents","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/dispatching-parallel-agents","isPrimary":false,"firstSeenAt":"2026-04-18T21:36:09.055Z","lastSeenAt":"2026-04-24T06:51:04.554Z"}],"details":{"listingId":"6f5b3671-8bfa-4f3f-9714-2fed4edf575b","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"dispatching-parallel-agents","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34831,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-24T06:41:17Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"9173210422dbd1f50a227212614b231d1060ed4f","skill_md_path":"skills/dispatching-parallel-agents/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/dispatching-parallel-agents"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"dispatching-parallel-agents","description":"Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies"},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/dispatching-parallel-agents"},"updatedAt":"2026-04-24T06:51:04.554Z"}}