plugins/claude-core/skills/claude-subagent-creator/SKILL.md
Author, validate, and install custom Claude Code subagents as .claude/agents Markdown files. Use when the user asks to create a subagent, custom agent, or .claude/agents role; define a reusable reviewer, explorer, planner, or worker persona; set an agent's model or tool allowlist; or turn a recurring workflow into a delegatable role. Produces Markdown agent files with YAML frontmatter (name, description, model, tools) plus a focused system-prompt body, scoped to the smallest tool surface that does the job (read-only by default). Covers naming, description wording for autonomous delegation, model policy (Opus for reasoning/review, inherit for scans), tool scoping, project vs user scope, and a smoke test. Pairs with fan-out, which delegates to these roles. Not for one-off ad-hoc delegation (use fan-out) or authoring Agent Skills (SKILL.md files).
npx skillsauth add bjornmelin/dev-skills claude-subagent-creatorInstall 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.
Create well-scoped custom subagents Claude Code can auto-delegate to. A subagent is a Markdown file with YAML frontmatter plus a system-prompt body; it runs in its own context window with its own tool surface.
fan-out can target.For a one-off delegation, don't author a file — just use fan-out's inline spawn contract.
./.claude/agents/<name>.md (project) or ~/.claude/agents/<name>.md (user):
---
name: <hyphen-case, matches filename>
description: <what it does + WHEN to delegate to it — explicit triggers; this drives auto-selection>
model: opus # or sonnet / haiku / omit to inherit the session model
tools: Read, Grep, Glob, Bash # smallest surface that works; omit = inherit all
---
<system prompt: role, exact scope, output contract, hard boundaries>
Use when ... with concrete triggers
("Use when reviewing a diff for security issues"). The main agent matches this to decide delegation;
vague descriptions don't get auto-selected.opus for reasoning/review/debugging/planning; sonnet/haiku or inherit for
read-heavy scans and inventories. Omit model: to inherit the session model.Read, Grep, Glob, Bash); add
Edit, Write only for workers that own a disjoint write surface./agents (or the Task tool with
subagent_type: <name>) that it loads and a trivial scoped task returns the contracted shape../.claude/agents/) — committed, shared with the repo, available in that project.~/.claude/agents/) — personal, available across all your projects.| Symptom | Fix |
|---|---|
| Agent never auto-delegated | weak description — add explicit "Use when" + trigger keywords |
| Agent over-reaches / edits too much | tighten tools: and the scope line in the body |
| Inconsistent results | pin model: opus; specify an exact return contract |
| Two agents fight over the same work | merge or sharpen responsibilities; one job each |
| Worker reverted another's edits | enforce disjoint write surfaces; read-only by default |
Use fan-out to delegate to the roles you create here.
development
Pre-PR multi-model review, parallel opus and codex exec adversarial lanes, then adversarial verification of merged findings. Read-only. Use before shipping nontrivial diffs.
tools
Independent gpt-5.6 diff review via the Codex CLI, normal or steerable adversarial with JSON findings. Use before shipping nontrivial changes.
development
Delegate implementation, investigation, or bulk work to gpt-5.6 codex via pinned codex exec. Use for clear-spec builds, migrations, debugging, or any task MODELS.md routes to codex.
development
Adversarial pre-mortem: imagine the plan failed, work backwards to surface risky assumptions + irreversible bets, then harden them. Proactively offer it (after the current request; confirm first) before a hard-to-reverse or one-way-door call (API, schema, framework, a hire), an all-upside plan, or unvalidated assumptions. Also on request.