dispatching-parallel-agents/SKILL.md
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
npx skillsauth add lidge-jun/cli-jaw-skills dispatching-parallel-agentsInstall 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.
Core principle: dispatch one agent per independent problem domain. Let them work concurrently.
⚠️ Cost awareness: Parallel agents consume significantly more tokens than sequential approaches (often 10-15× more). Each agent loads its own full context. Use parallel dispatch only when the speed gain justifies the cost.
Group failures by what's broken:
Each domain is independent - fixing tool approval doesn't affect abort tests.
Each agent gets:
// In Claude Code / AI environment
Task("Fix agent-tool-abort.test.ts failures")
Task("Fix batch-completion-behavior.test.ts failures")
Task("Fix tool-approval-race-conditions.test.ts failures")
// All three run concurrently
When agents return:
Good agent prompts are:
Fix the 3 failing tests in src/agents/agent-tool-abort.test.ts:
1. "should abort tool with partial output capture" - expects 'interrupted at' in message
2. "should handle mixed completed and aborted tools" - fast tool aborted instead of completed
3. "should properly track pendingToolCount" - expects 3 results but gets 0
These are timing/race condition issues. Your task:
1. Read the test file and understand what each test verifies
2. Identify root cause - timing issues or actual bugs?
3. Fix by:
- Replacing arbitrary timeouts with event-based waiting
- Fixing bugs in abort implementation if found
- Adjusting test expectations if testing changed behavior
Do NOT just increase timeouts - find the real issue.
Return: Summary of what you found and what you fixed.
| Quality | Bad | Good | |---------|-----|------| | Scope | "Fix all the tests" | "Fix agent-tool-abort.test.ts" | | Context | "Fix the race condition" | Paste error messages and test names | | Constraints | (none — agent refactors everything) | "Fix tests only, no production code changes" | | Output | "Fix it" | "Return summary of root cause and changes" |
After agents return:
Dispatch N agents for the same question with different strategies, then merge results:
Agent A: "Search codebase for usages of deprecated API"
Agent B: "Search git history for when API was introduced"
Agent C: "Search docs for migration guide"
→ Merge: synthesize findings into migration plan
For tasks with partial dependencies, model as a directed acyclic graph:
Agent A (research) ──→ Agent C (implement)
Agent B (design) ──→ Agent C (implement)
Agent C ──→ Agent D (verify)
Always define stop conditions for parallel dispatches:
tools
Use only on the Codex CLI for native image generation or image editing without an API key. Save final PNG files under ~/.cli-jaw/uploads, report web-ready absolute-path markdown, and send to Telegram or Discord only when explicitly requested.
tools
Ranked repository structure map via `cli-jaw map`. Use for codebase overview, structure map, symbol overview, unfamiliar codebase exploration, architecture orientation. Triggers: repo map, structure map, codebase overview, 와꾸, project structure, unfamiliar code.
tools
cli-jaw Design workspace: create, preview, run, and export design pages from the right sidebar. Covers panel UX, direct-write workflow, artifact lifecycle, wireframe generation, design system, and Open Design adapter.
development
MUST USE for infrastructure and delivery work — container builds, deploy pipelines, Kubernetes, Infrastructure as Code, SRE foundations, edge/serverless, ML infrastructure. Triggers: Dockerfile, K8s manifests, CI/CD pipeline, Terraform/IaC, release/deploy, devops/infra/deploy or release_cd task_tags.