一键导入
pb-dispatching-parallel-agents
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation. Contains the reusable grilling loop and domain-modeling discipline.
Execute spec-driven implementation using Generator/Evaluator dual-agent loop with BDD+TDD double-loop verification. Use when implementing features from a design spec, running tasks from tasks.md, or building code with structured testing.
Use when you need to resolve an in-progress git merge/rebase conflict. Guides systematic resolution preserving both intents where possible.
Generate a complete feature design specification (design.md, tasks.md) and Gherkin scenarios from natural language requirements. Use when planning, designing, or scoping new features, refactors, or bug fixes for AI-driven implementation.
Build a throwaway prototype to answer a design question — a terminal app for state/logic questions, or several UI variations toggleable from one route. Use when the user wants to sanity-check whether a state model feels right, or explore what a UI should look like.
Two-axis review of the diff since a fixed point — Standards (does the code follow this repo's coding standards?) and Spec (does the code match what the originating issue/PRD asked for?). Runs both reviews in parallel subagents. Use when completing tasks, implementing major features, or before merging.
| name | pb-dispatching-parallel-agents |
| description | Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies |
You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.
Core principle: Dispatch one agent per independent problem domain. Let them work concurrently.
Use when:
Don't use when:
Group failures by what's broken:
Each domain is independent — fixing tool approval doesn't affect abort tests.
Each agent gets:
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
Multiple dispatch calls in one response = parallel execution. One per response = sequential.
When agents return:
uv run pytestGood agent prompts are:
Fix the 3 failing tests in tests/test_abort.py:
1. "test_abort_tool_with_partial_output" - expects 'interrupted at' in message
2. "test_mixed_completed_and_aborted" - fast tool aborted instead of completed
3. "test_pending_count_tracking" - expects 3 results but gets 0
Your task:
1. Read the test file and understand what each test verifies
2. Identify root cause
3. Fix the issue
4. Run tests to confirm
Do NOT just increase timeouts — find the real issue.
Return: Summary of what you found and what you fixed.
❌ Too broad: "Fix all the tests" — agent gets lost ✅ Specific: "Fix test_abort.py" — 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"
❌ Vague output: "Fix it" — you don't know what changed ✅ Specific: "Return summary of root cause and changes"
After all agents complete and you integrate changes:
Scenario: 6 test failures across 3 files after major refactoring
Failures:
Decision: Independent domains — abort logic separate from batch completion separate from race conditions
Dispatch:
Agent 1 → Fix test_abort.py
Agent 2 → Fix test_batch_completion.py
Agent 3 → Fix test_tool_approval_race.py
Results:
Integration: All fixes independent, no conflicts, full suite green