/superpowers-optimized:dispatching-parallel-agentsfrom superpowers-optimized
Dispatches parallel subagents for truly independent tasks that don't share files or state. Includes decision checks, context isolation rules, and cache-optimized prompt construction.
Ships in superpowers-optimized. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use parallel subagents only for truly independent work.
Use parallel dispatch when all are true:
If any condition fails, run sequentially.
Do not use when:
curl (URLs).Never forward parent session context or history to subagents. Construct each subagent's prompt from scratch using only the items listed below. Subagents must not receive conversation history, prior reasoning chains, or context from other subagent runs.
Why this is also the cache-optimal approach: All subagents share the same system prompt prefix, which is cached by the API. By keeping each subagent's input as [cached system prompt] + [small unique task prompt], every agent gets a cache hit on the heavy shared prefix and only pays full price for its small task-specific tail. Forwarding parent conversation history would make each subagent's prefix unique and large, breaking cache sharing and multiplying input token costs.
Each agent prompt must include:
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
Your task:
1. Read the test file and understand what each test verifies.
2. Identify root cause — timing issues or actual bugs?
3. Fix the root cause. Do NOT just increase timeouts.
4. Do NOT change any files outside src/agents/agent-tool-abort.test.ts and its direct implementation file.
You are a focused subagent. Do NOT invoke any skills from the superpowers-optimized plugin.
Do NOT use the Skill tool. Do NOT dispatch, spawn, or delegate to any subagent of your own. Do all of this work yourself.
Your only job is the task described above.
Return: Summary of root cause and what you changed.
❌ Too broad: "Fix all the tests" — agent gets lost ✅ Specific: "Fix agent-tool-abort.test.ts" — focused scope
❌ No context: "Fix the race condition" — agent doesn't know where ✅ With context: Paste the error messages and test names
❌ No constraints: Agent might refactor everything ✅ Constrained: "Do NOT change files outside X"
❌ Vague output: "Fix it" — you don't know what changed ✅ Specific output: "Return summary of root cause and what you changed"
When risk is high, fall back to sequential execution.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub repozy/superpowers-optimized --plugin superpowers-optimized24 skills in this plugin
/brainstormingUse when the user wants new features, behavior changes, refactoring with new capabilities, or architecture decisions and no approved design exists yet. Produces a design before any code is written — in the conversation for small changes, as an approved spec document for larger work. Triggers on: "build this", "add a feature", "I want to change", "how should we", "design", "architect", "new project", "refactor", "we need to add/build/create", "implement a new". Routed by using-superpowers, or invoke directly via /brainstorming.
/claude-md-creatorCreates minimal, high-signal CLAUDE.md and AGENTS.md context files based on empirical best practices. Invoke on /init command, "create CLAUDE.md", "update CLAUDE.md", "write AGENTS.md", or "set up Claude Code for this project". Also invoked by brainstorming when repo lacks a context file. tools: Read, Glob, Grep, Bash, Edit
/context-managementUse in long or noisy sessions to persist durable state across session boundaries via state.md. Also generates project-map.md when asked to map the project. Triggers on: user explicitly asks to "save state", "compress context", "map this project", "generate project map", "create project map", cross-session handoff needed, or repeated failures indicate context is getting stale.
/deliberationUse BEFORE brainstorming when facing a complex architectural, technology, or design decision where the options are not yet well-defined or the problem itself may need reframing. Assembles named stakeholder perspectives that each speak once without debate, then surfaces where they converge and where real tension remains — without forcing a premature choice. Triggers on: "should we use X or Y", "not sure which approach", "evaluate these options", "what are the trade-offs between", "help me think through this decision", "architecture decision", "technology choice". Routed by using-superpowers before brainstorming when the decision space is unclear.
/dependency-managementUse when updating, migrating, or auditing project dependencies: upgrading packages, fixing security vulnerabilities (CVEs), resolving breaking changes, migrating to new major versions, or auditing outdated dependencies. Enforces incremental updates with verification at each step. Distinct from systematic-debugging (which fixes application bugs) and refactoring (which restructures application code). Triggers on: "update dependencies", "upgrade packages", "npm update", "pip upgrade", "outdated", "vulnerability", "CVE", "security advisory", "breaking change", "migration guide", "dependency conflict", "peer dependency", "update to latest", "audit dependencies", "npm audit", "dependabot". Routed by using-superpowers, or invoke directly via /dependency-management.
/error-recoveryMaintains a project-specific known-issues.md mapping recurring errors to their solutions. Consulted automatically by systematic-debugging before investigation. Saves time by avoiding rediscovery of known problems across sessions. Triggers on: "save this fix", "remember this error", "known issues", or automatically when systematic-debugging resolves a recurring error.
Other plugins' skills for the same job