skills/subagent-dispatch/SKILL.md
Protocol for dispatching subagents effectively. Use this skill EVERY TIME you are about to delegate work to a custom or built-in agent. Covers when to dispatch, which agent to pick, how to write self-contained prompts, and parallel execution. Trigger phrases: "delegate to agent", "dispatch subagent", "run agent", "use subagent", "context isolation", "parallel agents".
npx skillsauth add rakaadi/agent-kit subagent-dispatchInstall 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.
This skill governs when and how to dispatch subagents in this project. Its purpose is to help the main agent make effective delegation decisions and write high-quality, self-contained prompts for each specialist.
Dispatch a subagent when any of these apply:
| Signal | Why dispatch? | |--------|---------------| | Context isolation needed | Command output, logs, or search results are verbose and would pollute the main conversation | | Specialist expertise | The task maps cleanly to an existing agent's domain (see registry below) | | Parallelizable work | Two or more independent tasks can run concurrently in separate agents | | Review/validation gate | A second opinion or compliance check is needed before accepting work |
Do it yourself when the task is trivial, already in-context, or requires tight back-and-forth with the user that a stateless subagent cannot provide.
Custom agents live at agents/<agent-name>.agent.md.
| Agent | Role | Key trait | Invocable |
|-------|------|-----------|-----------|
| Bash Search Worker | Shell-based repository search and filtering | Context isolation; read-only execute only | Subagent only |
| Code Simplifier | Simplify and refine code for clarity | Preserves functionality; applies project standards | User + subagent |
| Compliance Reviewer | Compare implementation against plan/spec | Deviation analysis; requirement verification | Subagent only |
| Codebase Analyzer | Analyze implementation details of existing code | Precise file:line references; no speculation | User + subagent |
| Generalist | General-purpose coding, research, debugging | Broad skill set; retrieval-led reasoning | Subagent only |
| Green (TDD) | Write minimal code to pass a failing test | Never modifies tests; minimal production code | Subagent only |
| Orchestrator | Delegate and coordinate multi-agent workflows | Never implements; dispatches and consolidates | User only |
| Quality Reviewer | In-depth code review and analysis | Security, patterns, maintainability | Subagent only |
| Red (TDD) | Write one failing test for one behaviour | Never touches production code | Subagent only |
| Reviewer Group | Orchestrate multi-perspective code review | Spawns multiple Quality Reviewers | User only |
| UI Composer | Build visually polished, performant UI components | Styling, animation, layout expertise | User + subagent |
If an agent is not listed (newly added), read its
.agent.mdfile and extract thedescriptionandmodelfields from the YAML frontmatter.
Always use the model specified in the frontmatter. Use this table only when the agent's preferred model is temporarily unavailable:
| Preferred model | Fallback | |-----------------|----------| | Gemini 3.1 Pro (Preview) | Claude Opus 4.6 | | Gemini 3 Pro (Preview) | Claude Opus 4.6 | | Claude Opus 4.6 | GPT-5.4 | | Claude Sonnet 4.6 | GPT-5.4 | | GPT-5.4 mini | Claude Haiku 4.5 |
For built-in agent types (
explore,code-review, etc.) that have no.agent.md, skip model resolution — use platform defaults.
When two or more tasks are independent, dispatch them in the same turn:
Rule of thumb: if task B does not need task A's output, they can run in parallel.
Every subagent prompt must answer all four of these:
Thin prompts produce thin results. If a subagent fails or produces something off-target, the root cause is almost always an underspecified prompt — not the agent's capability.
development
Guide for writing a unit test. Use when writing a unit test for functions or components, and when fixing a bug in existing code.
development
Use when you have a spec or requirements for a multi-step task, before touching code. Supports either Markdown plans or review-oriented HTML plan artifacts.
development
Guide for code refactoring, use this skill to guide you when user asked to refactor a components or functions and when an implementation of a plan requiring a code refactoring.
development
Guide for debugging issue on a specific code sections, pattern, or files. Used this skill when user asking for assistant when debugging an issues or explaining a code.