skills/dispatching-parallel-agents/SKILL.md
Use when facing 2+ independent tasks that can run concurrently without shared state. Use when multiple test files fail with different root causes. Use when independent subsystems need investigation simultaneously. Use when parallel code generation, research, or analysis would save time. NEVER when tasks share state, edit the same files, or have sequential dependencies.
npx skillsauth add sharkitect-solutions/sharkitect-claude-toolkit 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.
Think like someone who has dispatched 100 parallel agent batches and learned that the decision to parallelize matters more than the parallelization itself. Most failures come from dispatching tasks that AREN'T truly independent — agents edit the same files, need the same context, or produce conflicting changes.
Every parallel dispatch must pass this test:
For each pair of tasks, ask:
│
├─ Do they touch the SAME files?
│ └─ YES → NOT independent. Merge into one agent or sequence them.
│
├─ Does Task B need Task A's OUTPUT?
│ └─ YES → NOT independent. Must run sequentially.
│
├─ Do they need the SAME shared resource?
│ (same database, same API with rate limits, same lock)
│ └─ YES → NOT independent. Will conflict.
│
└─ Can each agent solve its task with ONLY its own context?
└─ NO → NOT independent. Agents will miss cross-cutting issues.
If any pair fails this test, don't parallelize those tasks. You can still parallelize the independent subset.
| Scenario | Independent? | Why | |----------|-------------|-----| | 3 test files failing with different root causes | Yes | Each file tests different subsystem | | Research on 4 unrelated topics | Yes | No shared context needed | | Generating code for 3 unrelated features | Usually yes | Unless features share interfaces | | Fixing bug A and refactoring module B | Only if B doesn't contain A | Check for file overlap | | Reviewing 5 independent PRs | Yes | Each PR is self-contained | | Investigating frontend + backend + database issues | Maybe | Check if they share the same root cause |
Each agent prompt must be self-contained — the agent can't ask you or other agents for clarification mid-run.
Every parallel agent prompt needs:
| Element | What It Does | Bad Example | Good Example | |---------|-------------|-------------|-------------| | Scope | What files/area to focus on | "Fix the tests" | "Fix 3 failures in agent-tool-abort.test.ts" | | Context | Error messages, relevant code paths | "There's a bug" | Paste exact error messages and test names | | Constraints | What NOT to touch | (nothing) | "Do NOT modify production code, only test files" | | Output | What to return | "Fix it" | "Return: root cause, changes made, tests passing" |
| Scope Size | Agent Count | Works Well? | |------------|-------------|-------------| | 1 test file per agent | 3-5 agents | Best — focused, fast | | 1 subsystem per agent | 2-4 agents | Good — clear boundaries | | 1 feature per agent | 2-3 agents | Good if features are independent | | Half the codebase per agent | 2 agents | Risky — too broad, agents get lost |
Diminishing returns: Beyond 5-6 parallel agents, the integration overhead (reviewing, merging, conflict checking) outweighs the time savings. Aim for 2-5 agents per dispatch.
| Problem | How You'll Know | Fix | |---------|----------------|-----| | Agents edit same file | Merge conflicts when integrating | Should have been caught by independence test. Resolve manually. | | One agent fails | Returns error or incomplete results | Don't let one failure block others. Review successful agents' work, re-dispatch failed task. | | Agents make contradictory fixes | Tests pass individually but fail together | Run full suite after integration. Root cause was hidden dependency — investigate together. | | Agent scope too broad | Agent takes too long, returns shallow results | Re-dispatch with narrower scope. Split into 2 focused agents. | | Agent makes systematic error | Same wrong pattern in all changes | Spot-check before accepting. Add constraints to prevent the pattern. |
After all agents return:
| Rationalization | When It Appears | Why It's Wrong | |----------------|-----------------|----------------| | "Let me dispatch an agent for each test" | Seeing many test failures | Failures may share a root cause. Investigate first — fixing one may fix 10 others. | | "I'll dispatch 8 agents to go faster" | Lots of independent work | Beyond 5-6 agents, integration overhead exceeds time savings. Batch into 3-5 focused groups. | | "They're probably independent" | Haven't verified independence | "Probably" means you haven't checked. Run the independence test. Conflicting agents waste more time than sequential work. | | "The agent can figure out the scope" | Writing broad agent prompts | Broad scope = shallow results. Agents work best with narrow, specific tasks and all context included. |
development
When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions 'PPC,' 'paid media,' 'ad copy,' 'ad creative,' 'ROAS,' 'CPA,' 'ad campaign,' 'retargeting,' or 'audience targeting.' This skill covers campaign strategy, ad creation, audience targeting, and optimization.
testing
--- name: using-sharkitect-methodology description: Use when starting any conversation in a Sharkitect workspace OR before any task involving NEW pricing, positioning, proposal, strategy, plan-execution, or schema-design work — mandates invocation of Sharkitect-specific methodology skills (pricing-strategy, marketing-strategy-pmm, smb-cfo, hq-revenue-ops, executing-plans, brainstorming) under the same anti-rationalization discipline as using-superpowers. Documentation has failed 4 times across H
testing
Use when user says 'end session', 'wrap up', 'stop for the day', 'done for today', 'close out', 'save session', 'wrapping up', or invokes /end-session. Runs the full 9-step end-of-session protocol: resource audit, MEMORY.md update, lessons capture, plan status, pending items, workspace checklist, .tmp/ audit, git commit+push, Supabase brain sync, session brief, summary. Final step schedules a detached self-kill of the current session ONLY (3s delay) so the window closes cleanly. Other claude.exe processes (active workspaces) are NOT touched -- orphan cleanup is handled separately by Claude-Orphan-Cleanup-Hourly with proper age safeguards. Do NOT use for: mid-session quick saves (use session-checkpoint), skill syncing (use sync-skills.py), brain memory queries (use supabase-sync.py pull), document freshness reviews (use document-lifecycle), resource gap detection (use resource-auditor).
testing
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, passive voice, negative parallelisms, and filler phrases.