From rpw-building
Auto-dispatch subagents for research, debugging, and minion tasks outside /build sessions. Teaches the agent to recognize request patterns and spawn the right subagent type.
npx claudepluginhub randypitcherii/rpw-agent-marketplace --plugin rpw-buildingThis skill uses the workspace's default tool permissions.
When you are NOT inside a `/build` session, automatically dispatch subagents for qualifying requests. This keeps the main conversation context clean and leverages parallel fan-out for thoroughness.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides MCP server integration in Claude Code plugins via .mcp.json or plugin.json configs for stdio, SSE, HTTP types, enabling external services as tools.
When you are NOT inside a /build session, automatically dispatch subagents for qualifying requests. This keeps the main conversation context clean and leverages parallel fan-out for thoroughness.
This skill does NOT apply during /build sessions — the build lifecycle has its own dispatch protocol via the subagent-dispatch skill. See that skill for the canonical role reference table, model selection guide, and shared guardrails.
Check this FIRST, before evaluating any dispatch category.
If you can answer the request with 3 or fewer tool calls using context you already have, handle it inline. Do not dispatch.
Stays inline (handle directly):
grep / glob search across the codebasegit log, git status, git diff)Gets dispatched:
If you're uncertain, bias toward inline. Dispatch is for thoroughness and parallel scale — not for offloading simple lookups.
Evaluate every user request against these three categories. If a request matches, dispatch immediately — do not ask permission.
Trigger patterns: Simple, bounded, low-risk tasks that don't require deep reasoning.
bd create with known parameters)Do NOT minion-dispatch: Anything requiring judgment, multi-file coordination, or user-facing decisions.
Agent(
name: "minion-{action}",
description: "{3-5 word summary}",
model: "haiku",
mode: "bypassPermissions", // omit for read-only tasks
run_in_background: false,
prompt: "You are a Minion handling a simple task.
## Task
{exact-action-to-perform}
## Context from conversation
- Goal: {what the user is ultimately trying to accomplish}
- Files/paths examined: {list any already examined, or 'none'}
- Approaches tried/rejected: {list any, or 'none'}
- User preferences/constraints: {list any stated, or 'none'}
## Constraints
- Complete this single action and return the result.
- Do not ask questions — make reasonable assumptions.
- Do not modify files outside the specified scope.
- Return a brief result: what you did, what changed."
)
Notes:
mode: "bypassPermissions" only when the minion needs to edit files.Trigger patterns: Requests requiring investigation, exploration, or gathering information from multiple sources.
Do NOT research-dispatch: Simple factual questions answerable from one file read or one search.
Single-topic research — dispatch one agent (Opus):
Agent(
name: "research-{topic-slug}",
description: "{3-5 word summary}",
model: "opus",
run_in_background: true,
prompt: "You are a Research Lead investigating a topic.
## Research Question
{question-or-topic}
## Context from conversation
- Goal: {what the user is ultimately trying to accomplish}
- Files/paths examined: {list any already examined, or 'none'}
- Approaches tried/rejected: {list any, or 'none'}
- User preferences/constraints: {list any stated, or 'none'}
## Desired Output
{format: summary, comparison table, recommendation, etc.}
## Instructions
- Investigate the topic thoroughly using all available tools (search, web, file reads).
- Use multiple parallel tool calls per response to maximize coverage.
- Cite specific files, URLs, or sources for key claims.
- If a subtopic yields insufficient information, note the gap rather than guessing.
- If you encounter blocking errors, return immediately with what you have rather than retrying indefinitely.
- Return your findings using the structured result format defined in this skill."
)
Multi-angle research — dispatch multiple agents (Sonnet) in parallel from the main conversation, then synthesize their results yourself:
// Dispatch all in ONE message for parallel execution
Agent(name: "rw-{topic}-angle-1", model: "sonnet", run_in_background: true, prompt: "Research {subtopic A}...")
Agent(name: "rw-{topic}-angle-2", model: "sonnet", run_in_background: true, prompt: "Research {subtopic B}...")
Agent(name: "rw-{topic}-angle-3", model: "sonnet", run_in_background: true, prompt: "Research {subtopic C}...")
Notes:
Trigger patterns: Bug reports, failures, and investigation requests.
Do NOT debug-dispatch: Issues where the user clearly already knows the fix and just wants you to implement it.
Agent(
name: "debug-{issue-slug}",
description: "{3-5 word summary}",
model: "opus",
run_in_background: true,
prompt: "You are a Debug Lead investigating an issue.
## Problem
{problem-description-and-any-error-output}
## Context
{relevant-files-or-components}
## Context from conversation
- Goal: {what the user is ultimately trying to accomplish}
- Files/paths examined: {list any already examined, or 'none'}
- Approaches tried/rejected: {list any, or 'none'}
- User preferences/constraints: {list any stated, or 'none'}
## Instructions
Follow systematic debugging methodology:
1. Reproduce: confirm the issue exists and identify exact failure point.
2. Hypothesize: form 2-3 likely root cause hypotheses.
3. Test hypotheses: gather evidence for/against each using parallel tool calls to explore multiple code paths simultaneously.
4. Root cause: identify the confirmed root cause with evidence.
5. Fix recommendation: propose a specific fix with file paths and code changes.
## Constraints
- Do NOT implement fixes — only diagnose and recommend.
- Do NOT edit any files.
- If you encounter blocking errors, return immediately with what you have rather than retrying indefinitely.
- Return: root cause, evidence, recommended fix, and any related issues discovered.
- Return your findings using the structured result format defined in this skill."
)
Notes:
All guardrails from subagent-dispatch skill (section 5) apply here, plus these auto-dispatch specifics:
subagent-dispatch)./build for non-trivial work.grep or single file read does not need a Research Lead.When an agent fails, returns empty/incomplete results, or errors:
Research Leads and Debug Leads must return results using this structured completion report. Minions are exempt — they just return what they did.
**Status**: success | partial | failed
**Confidence**: high | medium | low
**Summary**
2-3 sentence answer to the original question or diagnosis.
**Findings**
- Key finding 1 (with source/file reference)
- Key finding 2 (with source/file reference)
- ...
**Gaps**
- What couldn't be determined and why
- Missing information or inaccessible sources
**Follow-up**
- Recommended next actions
- Beads to create (if applicable)
Based on the reported confidence level, present results to the user as follows: