/specialagent — Best Agent for a Task
Finds the best installed agent for a task. Never recommend from memory or from a hardcoded roster: the agent set differs per install, and a subagent_type that is not installed fails at spawn time.
Step 1: Use the pick index
In this order, stop at the first that answers:
[PICK]line — if the prompt carries[PICK] agent: <name> · skill: <invoke>, recommend that agent unless it is clearly wrong for the task.mcp__monomind__pick({ task: "<task>", kind: "agents", top: 5 })— choose the best fit amongagents.ranked[](prefer the top entry unless another is clearly more specific). Eachnameis a spawnablesubagent_type.- Local CLI —
monomind pick -t "<task>" --top 5 --json | jq -r '.agents.ranked[].name'(local binary only, never npx; seemastermind-agent-select/SKILL.mdfor the version-checkedmmpickhelper).
Step 2 (fallback): Two-stage domain → agent selection
Only when Step 1 returned nothing. Only names are passed at each stage — no descriptions, no keyword dumps.
Stage 1: Give LLM the category names → LLM picks the best category
Stage 2: Give LLM the agent names installed in that category → LLM picks the best agent
Categories are the .claude/agents/ folder names: architecture consensus core design engineering github goal marketing monoswarm optimization specialists specialized templates testing.
List the installed agent names in a category from the registry (or the definitions on disk):
CAT="engineering"
jq -r --arg c "$CAT" '.agents[] | select(.category == $c and .deprecated != true) | .name' .monomind/registry.json 2>/dev/null \
|| grep -h -m1 "^name:" packages/@monomind/cli/.claude/agents/$CAT/*.md .claude/agents/$CAT/*.md 2>/dev/null | sed 's/^name: *//'
Stage 1 prompt to yourself:
"Given the task:
<task>— which single category from this list best fits:<category names>? Answer with just the category name."
Stage 2 prompt to yourself:
"Given the task:
<task>— which single agent from this category is the best fit:<agent names listed above>? Answer with just the agent name."
If both stages come up empty, fall back to a core agent: coder, reviewer, tester, researcher, planner.
Slug Mapping
The subagent_type is the agent's frontmatter name: — what the pick index returns as name, and what the registry lists as .name.
Output Format
TASK: <one-line task summary>
PICKED BY: <[PICK] line | mcp__monomind__pick | monomind pick | category fallback: <category>>
RECOMMENDED AGENT: <Agent Name>
Invoke: Task({ subagent_type: "<agent name>", prompt: "..." })
Then ask: "Should I spawn this agent now?"
Rules
- Prefer the pick index; in the fallback, only pass names at each stage — no descriptions, no keyword dumps, no scoring tables
- Recommend exactly one agent, and only a name that is installed
- For tasks that clearly need a specialized tool (e.g. accessibility audits → Accessibility Auditor, not tester), prefer the more specific agent
- Never recommend a generic role (coder, tester) when a specialized agent in the right domain exists