بنقرة واحدة
dispatching-parallel-agents
Use to run multiple subagents concurrently on independent tasks
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use to run multiple subagents concurrently on independent tasks
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always. Upgraded with AC-first workflow, pre-flight fast-fail, and structured Judge verdicts (inspired by opslane/verify).
Guide for creating Claude Code skills following Anthropic's official best practices. Use when user wants to create a new skill, build a skill, write SKILL.md, or needs skill creation guidelines. Provides structure, naming conventions, description writing, and quality checklist.
Pattern for progressively refining context retrieval to solve the subagent context problem
Fast iteration with two-stage review (spec compliance, then code quality)
Multi-agent coordination SOP derived from Anthropic's internal coordinator architecture. Use when orchestrating parallel workers, dispatching subagents, planning multi-step implementations, or when tasks require research→synthesis→implementation→verification workflow. Triggers: 'coordinate', 'dispatch workers', 'parallel agents', 'multi-agent', 'fan out', 'orchestrate'.
Cross-platform content distribution and growth strategy for DYA app across 10+ platforms (Xiaohongshu, Douyin, TikTok, Instagram Reels, X/Twitter, Reddit, Weibo, Bilibili, WeChat Video). Use when planning social media posts, distributing video content, optimizing for platform algorithms, writing platform-specific copy, scheduling content releases, analyzing engagement data, deciding posting strategy, or maximizing organic reach. Also use when creating video ads that need multi-platform distribution, or when discussing growth/marketing/推广/发帖/推流/算法/涨粉 topics.
| name | dispatching-parallel-agents |
| description | Use to run multiple subagents concurrently on independent tasks |
Pattern for dispatching multiple subagents to work on independent tasks simultaneously.
Core principle: Parallel execution of strictly independent implementation or investigation domains.
v3.0: Enhanced with Anthropic coordinator patterns — synthesis iron law, continue/spawn matrix, concurrency management.
Group tasks by what's independent:
Each domain is independent — fixing one doesn't affect the others.
Iron Law: Workers can't see your conversation. Every prompt must be self-contained with everything the worker needs.
Each agent gets:
// Read-only tasks (research) → parallel freely
Task("Research auth system — find token handling in src/auth/")
Task("Research session management — how are sessions stored?")
Task("Research test helpers for auth")
// Write tasks → one at a time per file area
Task("Fix auth validation in src/auth/validate.ts")
// Wait for completion before dispatching overlapping writes
Task("Fix session expiry in src/auth/session.ts")
Concurrency management:
| Task Type | Rule |
|---|---|
| Read-only (research) | Run in parallel freely |
| Write-heavy (implementation) | One at a time per set of files |
| Verification | Can run alongside implementation on different file areas |
When agents return:
After a worker completes, decide whether to reuse or spawn fresh:
| Situation | Action | Why |
|---|---|---|
| Worker researched exactly the files to edit | Continue | Already has files in context |
| Research was broad, implementation is narrow | Spawn fresh | Avoid exploration noise |
| Correcting a failure | Continue | Has error context |
| Verifying another worker's code | Spawn fresh | Fresh eyes, no bias |
| Wrong approach entirely | Spawn fresh | Avoid anchoring on failed path |
| Unrelated task | Spawn fresh | No useful context |
No universal default. High context overlap → continue. Low overlap → spawn fresh.
| ❌ Anti-Pattern | ✅ Correct |
|---|---|
| "Based on your findings, fix it" | Write specific spec with file paths + line numbers |
| "The worker found an issue, please fix" | "Fix null pointer at src/auth/validate.ts:42 — add null check before user.id" |
| Sending one worker to check another | Workers report to you; you synthesize |
| Predicting worker results | Wait for actual results, then synthesize |
Good agent prompts are:
## Context
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
## Purpose
These are the last blockers before we can merge the feature branch.
## 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.
## Constraints
- Only modify files in src/agents/
- Do NOT change production code outside abort.ts
## Expected Output
Summary of root cause and changes made. Commit hash.
❌ 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 ✅ Context: Paste the error messages and test names
❌ No constraints: Agent might refactor everything ✅ Constraints: "Do NOT change production code" or "Fix tests only"
❌ Lazy delegation: "Based on earlier findings, fix it" ✅ Synthesized spec: Specific file paths, line numbers, what to change
After agents return:
coordinator-mode — Full multi-agent coordination SOPsubagent-driven-development — Per-task dispatch with reviewiterative-retrieval — Progressive context gathering for workersverification-before-completion — Evidence-based verification