[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ASDB8PXDPY43RRX5SC70DA":3,"skill-same:01M7ASDB8PXDPY43RRX5SC70DA":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":14,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M7ASDB8PXDPY43RRX5SC70DA","subagent-creator",null,"Scaffolds and reviews Claude Code subagents (Markdown files with YAML frontmatter under agents\u002F directories) — specialized helpers with their own system prompt, tool restrictions, and model. Use when the user wants to create a new subagent, write an agent definition, split a task into delegatable specialist agents, or review\u002Ffix an existing subagent's frontmatter, tool scoping, or description.","MisterIcy\u002Fprovenance","MisterIcy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6999229?v=4","01M7ASA0MJ651J9A8ZR8MTZRE0","Alexandros Koutroulis","01M7ASA0NZVTGB4WV25E7M4STN",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FMisterIcy\u002Fprovenance\u002Fblob\u002Fmain\u002Fskills\u002Fsubagent-creator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: subagent-creator\ndescription: Scaffolds and reviews Claude Code subagents (Markdown files with YAML frontmatter under agents\u002F directories) — specialized helpers with their own system prompt, tool restrictions, and model. Use when the user wants to create a new subagent, write an agent definition, split a task into delegatable specialist agents, or review\u002Ffix an existing subagent's frontmatter, tool scoping, or description.\nargument-hint: [agent specialization — e.g. \"read-only SQL query reviewer\" or \"commit message writer\"]\nlicense: Apache-2.0\nmetadata:\n  author: Alexandros Koutroulis\n  version: \"0.1\"\nallowed-tools: Bash(${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fvalidate_agent_frontmatter.py *), Agent(subagent-job-clarifier, subagent-tool-scoper, subagent-body-writer)\nhooks:\n  PostToolUse:\n    - matcher: \"Edit|Write\"\n      hooks:\n        - type: command\n          command: \"${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fsubagent-creator\u002Fscripts\u002Fvalidate_agent_frontmatter.py\"\n---\n\n## What this skill does\n\nHelps design, scaffold, and validate a **Claude Code subagent**: a Markdown file with YAML frontmatter, stored under an `agents\u002F` directory, that Claude Code can delegate a task to (automatically, by @-mention, or as the whole session). A subagent is a *reusable specialist* — narrow job, own system prompt, its own tool\u002Fmodel\u002Fpermission scoping — not a one-off task plan.\n\nThis skill only carries the authoring workflow inline. Full spec detail lives in `references\u002Fsubagent-spec.md`, loaded on demand.\n\n**`$ARGUMENTS` is the agent's specialization** (e.g. \"read-only SQL query reviewer\", \"commit message writer\"). If invoked with no arguments and the surrounding conversation doesn't already make the specialization obvious, **stop and delegate to `subagent-job-clarifier`** (step 1) before scaffolding anything — don't guess a job description. Reach for `AskUserQuestion` again at any later step below where the user's intent is genuinely ambiguous rather than assuming a default; this skill is about extracting precise, deliberate configuration, not filling in plausible-sounding YAML.\n\n## Workflow\n\n1. **Clarify the job.** Before writing anything, delegate to the `subagent-job-clarifier` agent (`Agent(subagent-job-clarifier)`) unless the specialization and every fact below is already unambiguous from `$ARGUMENTS`\u002Fcontext. Hand it whatever's already known (the specialization, any surrounding context); it cannot ask the user directly (subagents can't use `AskUserQuestion`), so it reasons over what it's given and returns a structured spec covering:\n   - The single, narrow responsibility this agent owns (a grab-bag \"does everything\" agent won't get delegated to reliably — its description can't be specific)\n   - What triggers delegation to it — concrete phrases the `description` needs to contain (e.g. \"use proactively after code changes\", \"use when the user asks to audit X\")\n   - What it needs to touch — read-only analysis, read+draft\u002Fwrite, or destructive\u002Fmutating actions. This decides tool scope (step 4) and color (step 6)\n   - Whether it's a one-shot job, a medium multi-step task, or a long\u002Fcomplex investigation. This decides `maxTurns` (step 5)\n   - Whether it needs to call other agents, or be called by name from elsewhere. This decides the multi-agent tools in step 4\n   Carry its returned spec forward into steps 2–11; **you** ask the user via `AskUserQuestion` about every entry in its `Open questions` output before proceeding — the agent can't do that itself.\n\n2. **Decide placement — this is the step most likely to go wrong.** Ask if not already clear:\n   - **`.claude\u002Fagents\u002F` (project)** — shared with the team, checked into version control, scoped to this repo. Default choice for anything project-specific.\n   - **`~\u002F.claude\u002Fagents\u002F` (personal)** — available in every project, not shared. Default choice for a personal workflow helper.\n   - **A plugin's own `agents\u002F` directory** — ships to *every* install of that plugin. **Only use this if the user explicitly wants the new agent to become part of a plugin's shipped surface.** If the current working directory is itself a plugin repo (check for `.claude-plugin\u002Fplugin.json` — provenance is one example, with its own `agents\u002F` at repo root), do NOT default to dropping a new agent there just because it's convenient. An agent added to a plugin's `agents\u002F` dir goes out to every user of that plugin on the next update; a project- or personal-scope agent does not. When genuinely unsure, ask.\n   - Plugin agents are automatically namespaced (`plugin-name:agent-name`) so they don't collide with project\u002Fpersonal agents of the same bare name — but two *different* plugins reusing a generic name (e.g. `reviewer`) can still cause ambiguous @-mentions. Check existing agent names at the target scope before finalizing one.\n\n3. **Name it.** `name` (from `references\u002Fsubagent-spec.md`):\n   - Lowercase letters, digits, hyphens only; cannot start with `-`; cannot contain `:` (reserved for plugin namespacing)\n   - Unique within its scope — a same-name project agent silently shadows a personal one\n\n4. **Scope the tools explicitly — never leave `tools`\u002F`disallowedTools` both unset.** Omitting both silently inherits every tool available to subagents; that's almost never the right call for a narrow specialist and hides what the agent can actually do. Delegate to the `subagent-tool-scoper` agent (`Agent(subagent-tool-scoper)`), handing it the job spec from step 1 (responsibility, access tier, complexity, cross-agent needs) plus, if reviewing an existing agent, its current `tools`\u002F`disallowedTools` value. It reads `references\u002Ftools-reference.md` and `references\u002Fsubagent-spec.md` and returns a recommended `tools`\u002F`disallowedTools` value with rationale, plus a list of open questions for anything genuinely ambiguous — it can't ask the user itself (subagents can't use `AskUserQuestion`), so **you** ask via `AskUserQuestion` about each one before finalizing. It follows the same tiering this step used to apply inline:\n   - Read-only analyzer\u002Freviewer → `tools: Read, Grep, Glob` (+ `Bash` only if it genuinely needs to run read-only commands)\n   - Reads and drafts\u002Fwrites (e.g. writes a message, a report, a doc, but doesn't touch the target repo's real files) → add `Write`\u002F`Edit` scoped to its own draft output\n   - Needs to mutate the working tree or run arbitrary commands → add `Write`\u002F`Edit`\u002F`Bash` explicitly — this is the destructive tier, grant it deliberately\n   - Prefer an explicit `tools` allowlist over `disallowedTools` for anything narrow; use `disallowedTools` only to strip one or two specific tools from an otherwise-intentional full-inheritance case\n   - **Multi-agent tools**: if this agent needs to spawn or hand off to other specific agents, add `Agent(agent-name-1, agent-name-2)` — never a bare `Agent`, which allows spawning anything. If it needs to discover what agents\u002Fsessions are addressable (e.g. to resume one or message a teammate), add `ListAgents`. If it needs to message another agent, teammate, or session directly, add `SendMessage`. Only add these when the job actually requires cross-agent coordination — most single-purpose specialists need none of them.\n   Carry its recommended `tools`\u002F`disallowedTools` value forward into step 10's frontmatter; if it reports open questions or flags a mismatch (when reviewing an existing agent), resolve those with the user before proceeding.\n\n5. **Set `maxTurns` — don't leave it unset.** An unset `maxTurns` lets the agent run indefinitely, burning tokens on jobs that should have stopped. Scale it to the job identified in step 1:\n   - **5** — one-shot jobs (single lookup, single file write, single message draft)\n   - **10** — medium-effort jobs (a few steps of investigation + one action)\n   - **20+** — long\u002Fcomplex jobs (multi-file investigation, iterative review, multi-step orchestration)\n   Ask the user if the job's effort level isn't clear from the description.\n\n6. **Colorize the agent.** `color` is not cosmetic-only here — treat it as a required signal of blast radius, chosen from the tool scope decided in step 4:\n   - **green** — read-only (no `Write`\u002F`Edit`\u002F`Bash` mutation capability)\n   - **yellow** — reads and drafts\u002Fwrites (produces or edits content, but not destructive to existing state — e.g. writes a new report, drafts a message)\n   - **red** — can make destructive\u002Firreversible changes (commits, deletes, force-pushes, runs arbitrary `Bash`, edits the working tree)\n   - **blue \u002F purple \u002F orange \u002F pink \u002F cyan** — reserve for agents that don't fit the green\u002Fyellow\u002Fred ladder cleanly: a coordinator that only spawns other agents and never touches files itself, a pure research\u002Fread-external-web agent, a scheduling\u002Fnotification agent, etc. Pick consistently within a project (e.g. always `purple` for coordinators) rather than arbitrarily.\n\n7. **Decide `memory` explicitly — always ask, never assume.** Do not default to no memory (`memory` unset or `false`) without confirming with the user via `AskUserQuestion`: does this agent need to persist anything across separate invocations\u002Fsessions (e.g. a learned style profile, accumulated findings)? If yes, pick `user`\u002F`project`\u002F`local` per `references\u002Fsubagent-spec.md`; if the user explicitly wants no persistence, set `memory: false` so the choice is visible in the file rather than silently defaulted.\n\n8. **Decide `skills` — only when the agent genuinely needs one preloaded.** Most agents should leave `skills` unset; only add specific skill names here when the agent's job requires that skill's full content available at startup (not just as something it could look up) — this trades a fixed token\u002Ftime cost at every invocation for saving a discovery step. Don't add a skill \"just in case.\"\n\n9. **Pick a model.** Prefer an alias (`sonnet`\u002F`opus`\u002F`haiku`\u002F`fable`) over a full model ID, or omit the field entirely (defaults to `inherit` — same model as the calling session). Pin a full ID only when there's a concrete reason (cost-sensitive high-volume agent → `haiku`; needs the strongest reasoning → `opus`).\n\n10. **Write the body.** The body is the subagent's **entire** system prompt — it does not inherit Claude Code's main system prompt, tone guidance, or any of this conversation's context. Delegate to the `subagent-body-writer` agent (`Agent(subagent-body-writer)`), handing it the fully-decided job spec from steps 1-9 (responsibility, description\u002Ftriggers, access tier, tools\u002FdisallowedTools, maxTurns, cross-agent needs, target model). It self-discovers house-style references (`assets\u002FAGENT.template.md` and existing `agents\u002F*.md` files) and returns 2-3 candidate bodies, each tuned to the target model's conventions, plus any assumptions or open questions. Review the candidates, pick or merge one (asking the user via `AskUserQuestion` if the choice or an open question isn't yours to make unilaterally), and write the result into the agent file yourself — the agent never writes the file. Every candidate must state explicitly: its job, expected inputs, output shape, and boundaries (what it must never do — e.g. \"read-only, never runs git commands\", \"never contacts external services\", \"cannot ask the user directly\").\n\n11. **Write the description last, tune it hardest.** This is the single field automatic delegation reads. It must say *when* to use this agent with concrete trigger phrases, and implicitly *when not to* — check it doesn't overlap with an existing agent's triggers at the same scope (overlapping descriptions cause flaky, unpredictable delegation between the two).\n\n12. **Validate before calling it done.**\n    - Run `${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fvalidate_agent_frontmatter.py \u003Cpath-to-agent.md>` — checks frontmatter against the documented fields\u002Ftypes (name format, description presence + trigger phrasing, tools\u002FdisallowedTools presence, maxTurns, model\u002FpermissionMode\u002Fmemory\u002Feffort\u002Fcolor\u002Fhooks validity, unknown keys) and exits non-zero on any error. Also runs automatically as a `PostToolUse` hook on `Edit`\u002F`Write` while this skill is active.\n    - Then walk `references\u002Fchecklist.md` for placement, tool-scoping, and safety checks the script can't verify mechanically.\n\n13. **Report what you built**: file path, scope (project\u002Fpersonal\u002Fplugin), how it's invoked (auto-delegation on description match, `@agent-name`, or `--agent name` for session-wide use), and any manual step needed (e.g. workspace trust for `hooks`\u002F`mcpServers` at project scope).\n\n## References\n\n- `references\u002Fsubagent-spec.md` — full frontmatter field reference, file discovery\u002Fpriority order, invocation methods, tool-scoping syntax, best practices\n- `references\u002Ftools-reference.md` — condensed built-in tools list, read-only vs mutating vs multi-agent-coordination tools, and the `Agent(name1, name2)` restriction syntax\n- `references\u002Fchecklist.md` — pre-flight checklist covering frontmatter, body completeness, placement\u002Fcollision, and safety\n- `scripts\u002Fvalidate_agent_frontmatter.py` — validates an agent file's frontmatter against the documented spec; also wired as this skill's own `PostToolUse` hook\n- `assets\u002FAGENT.template.md` — copy-paste starting point for a new subagent definition\n\n## Common mistakes to avoid\n\n- Scaffolding a job description the user never actually gave — if `$ARGUMENTS`\u002Fcontext doesn't specify the specialization, delegate to `subagent-job-clarifier` first.\n- Description too vague (\"helps with code\") or missing an explicit trigger phrase — automatic delegation will rarely or never fire.\n- Writing an agent that does several unrelated things — split it into separate narrow agents with distinct, non-overlapping descriptions instead.\n- Leaving both `tools` and `disallowedTools` unset \"to keep it simple\" — this silently grants full tool inheritance; state the scope explicitly every time.\n- Leaving `maxTurns` unset — pick 5\u002F10\u002F20+ per the job's effort level (step 5), don't let an agent run unbounded.\n- Adding `skills` \"just in case\" — only preload a skill the agent's job actually requires at startup.\n- Assuming no persistent `memory` is wanted without asking — always confirm with the user, don't silently default.\n- Skipping `color`, or picking one arbitrarily — it's the at-a-glance blast-radius signal (green=read-only, yellow=read+draft, red=destructive; blue\u002Fpurple\u002Forange\u002Fpink\u002Fcyan for special cases like coordinators).\n- Giving a coordinator\u002Fdelegating agent a bare `Agent` tool instead of `Agent(specific-name-1, specific-name-2)` — a bare grant lets it spawn anything.\n- **Dropping a new agent into a plugin's own `agents\u002F` directory just because the current repo happens to be a plugin** — that ships it to every install. Confirm the user actually wants it in the plugin's shipped surface; otherwise use `.claude\u002Fagents\u002F` (project) or `~\u002F.claude\u002Fagents\u002F` (personal).\n- Assuming the body inherits Claude Code's system prompt or the current conversation's context — it doesn't; the agent starts with only what's written in its own file.\n- Forgetting that `hooks` and `mcpServers` at project scope (`.claude\u002Fagents\u002F`) require workspace trust to activate.\n","## What this skill does\n\nHelps design, scaffold, and validate a **Claude Code subagent**: a Markdown file with YAML frontmatter, stored under an `agents\u002F` directory, that Claude Code can delegate a task to (automatically, by @-mention, or as the whole session). A subagent is a *reusable specialist* — narrow job, own system prompt, its own tool\u002Fmodel\u002Fpermission scoping — not a one-off task plan.\n\nThis skill only carries the authoring workflow inline. Full spec detail lives in `references\u002Fsubagent-spec.md`, loaded on demand.\n\n**`$ARGUMENTS` is the agent's specialization** (e.g. \"read-only SQL query reviewer\", \"commit message writer\"). If invoked with no arguments and the surrounding conversation doesn't already make the specialization obvious, **stop and delegate to `subagent-job-clarifier`** (step 1) before scaffolding anything — don't guess a job description. Reach for `AskUserQuestion` again at any later step below where the user's intent is genuinely ambiguous rather than assuming a default; this skill is about extracting precise, deliberate configuration, not filling in plausible-sounding YAML.\n\n## Workflow\n\n1. **Clarify the job.** Before writing anything, delegate to the `subagent-job-clarifier` agent (`Agent(subagent-job-clarifier)`) unless the specialization and every fact below is already unambiguous from `$ARGUMENTS`\u002Fcontext. Hand it whatever's already known (the specialization, any surrounding context); it cannot ask the user directly (subagents can't use `AskUserQuestion`), so it reasons over what it's given and returns a structured spec covering:\n   - The single, narrow responsibility this agent owns (a grab-bag \"does everything\" agent won't get delegated to reliably — its description can't be specific)\n   - What triggers delegation to it — concrete phrases the `description` needs to contain (e.g. \"use proactively after code changes\", \"use when the user asks to audit X\")\n   - What it needs to touch — read-only analysis, read+draft\u002Fwrite, or destructive\u002Fmutating actions. This decides tool scope (step 4) and color (step 6)\n   - Whether it's a one-shot job, a medium multi-step task, or a long\u002Fcomplex investigation. This decides `maxTurns` (step 5)\n   - Whether it needs to call other agents, or be called by name from elsewhere. This decides the multi-agent tools in step 4\n   Carry its returned spec forward into steps 2–11; **you** ask the user via `AskUserQuestion` about every entry in its `Open questions` output before proceeding — the agent can't do that itself.\n\n2. **Decide placement — this is the step most likely to go wrong.** Ask if not already clear:\n   - **`.claude\u002Fagents\u002F` (project)** — shared with the team, checked into version control, scoped to this repo. Default choice for anything project-specific.\n   - **`~\u002F.claude\u002Fagents\u002F` (personal)** — available in every project, not shared. Default choice for a personal workflow helper.\n   - **A plugin's own `agents\u002F` directory** — ships to *every* install of that plugin. **Only use this if the user explicitly wants the new agent to become part of a plugin's shipped surface.** If the current working directory is itself a plugin repo (check for `.claude-plugin\u002Fplugin.json` — provenance is one example, with its own `agents\u002F` at repo root), do NOT default to dropping a new agent there just because it's convenient. An agent added to a plugin's `agents\u002F` dir goes out to every user of that plugin on the next update; a project- or personal-scope agent does not. When genuinely unsure, ask.\n   - Plugin agents are automatically namespaced (`plugin-name:agent-name`) so they don't collide with project\u002Fpersonal agents of the same bare name — but two *different* plugins reusing a generic name (e.g. `reviewer`) can still cause ambiguous @-mentions. Check existing agent names at the target scope before finalizing one.\n\n3. **Name it.** `name` (from `references\u002Fsubagent-spec.md`):\n   - Lowercase letters, digits, hyphens only; cannot start with `-`; cannot contain `:` (reserved for plugin namespacing)\n   - Unique within its scope — a same-name project agent silently shadows a personal one\n\n4. **Scope the tools explicitly — never leave `tools`\u002F`disallowedTools` both unset.** Omitting both silently inherits every tool available to subagents; that's almost never the right call for a narrow specialist and hides what the agent can actually do. Delegate to the `subagent-tool-scoper` agent (`Agent(subagent-tool-scoper)`), handing it the job spec from step 1 (responsibility, access tier, complexity, cross-agent needs) plus, if reviewing an existing agent, its current `tools`\u002F`disallowedTools` value. It reads `references\u002Ftools-reference.md` and `references\u002Fsubagent-spec.md` and returns a recommended `tools`\u002F`disallowedTools` value with rationale, plus a list of open questions for anything genuinely ambiguous — it can't ask the user itself (subagents can't use `AskUserQuestion`), so **you** ask via `AskUserQuestion` about each one before finalizing. It follows the same tiering this step used to apply inline:\n   - Read-only analyzer\u002Freviewer → `tools: Read, Grep, Glob` (+ `Bash` only if it genuinely needs to run read-only commands)\n   - Reads and drafts\u002Fwrites (e.g. writes a message, a report, a doc, but doesn't touch the target repo's real files) → add `Write`\u002F`Edit` scoped to its own draft output\n   - Needs to mutate the working tree or run arbitrary commands → add `Write`\u002F`Edit`\u002F`Bash` explicitly — this is the destructive tier, grant it deliberately\n   - Prefer an explicit `tools` allowlist over `disallowedTools` for anything narrow; use `disallowedTools` only to strip one or two specific tools from an otherwise-intentional full-inheritance case\n   - **Multi-agent tools**: if this agent needs to spawn or hand off to other specific agents, add `Agent(agent-name-1, agent-name-2)` — never a bare `Agent`, which allows spawning anything. If it needs to discover what agents\u002Fsessions are addressable (e.g. to resume one or message a teammate), add `ListAgents`. If it needs to message another agent, teammate, or session directly, add `SendMessage`. Only add these when the job actually requires cross-agent coordination — most single-purpose specialists need none of them.\n   Carry its recommended `tools`\u002F`disallowedTools` value forward into step 10's frontmatter; if it reports open questions or flags a mismatch (when reviewing an existing agent), resolve those with the user before proceeding.\n\n5. **Set `maxTurns` — don't leave it unset.** An unset `maxTurns` lets the agent run indefinitely, burning tokens on jobs that should have stopped. Scale it to the job identified in step 1:\n   - **5** — one-shot jobs (single lookup, single file write, single message draft)\n   - **10** — medium-effort jobs (a few steps of investigation + one action)\n   - **20+** — long\u002Fcomplex jobs (multi-file investigation, iterative review, multi-step orchestration)\n   Ask the user if the job's effort level isn't clear from the description.\n\n6. **Colorize the agent.** `color` is not cosmetic-only here — treat it as a required signal of blast radius, chosen from the tool scope decided in step 4:\n   - **green** — read-only (no `Write`\u002F`Edit`\u002F`Bash` mutation capability)\n   - **yellow** — reads and drafts\u002Fwrites (produces or edits content, but not destructive to existing state — e.g. writes a new report, drafts a message)\n   - **red** — can make destructive\u002Firreversible changes (commits, deletes, force-pushes, runs arbitrary `Bash`, edits the working tree)\n   - **blue \u002F purple \u002F orange \u002F pink \u002F cyan** — reserve for agents that don't fit the green\u002Fyellow\u002Fred ladder cleanly: a coordinator that only spawns other agents and never touches files itself, a pure research\u002Fread-external-web agent, a scheduling\u002Fnotification agent, etc. Pick consistently within a project (e.g. always `purple` for coordinators) rather than arbitrarily.\n\n7. **Decide `memory` explicitly — always ask, never assume.** Do not default to no memory (`memory` unset or `false`) without confirming with the user via `AskUserQuestion`: does this agent need to persist anything across separate invocations\u002Fsessions (e.g. a learned style profile, accumulated findings)? If yes, pick `user`\u002F`project`\u002F`local` per `references\u002Fsubagent-spec.md`; if the user explicitly wants no persistence, set `memory: false` so the choice is visible in the file rather than silently defaulted.\n\n8. **Decide `skills` — only when the agent genuinely needs one preloaded.** Most agents should leave `skills` unset; only add specific skill names here when the agent's job requires that skill's full content available at startup (not just as something it could look up) — this trades a fixed token\u002Ftime cost at every invocation for saving a discovery step. Don't add a skill \"just in case.\"\n\n9. **Pick a model.** Prefer an alias (`sonnet`\u002F`opus`\u002F`haiku`\u002F`fable`) over a full model ID, or omit the field entirely (defaults to `inherit` — same model as the calling session). Pin a full ID only when there's a concrete reason (cost-sensitive high-volume agent → `haiku`; needs the strongest reasoning → `opus`).\n\n10. **Write the body.** The body is the subagent's **entire** system prompt — it does not inherit Claude Code's main system prompt, tone guidance, or any of this conversation's context. Delegate to the `subagent-body-writer` agent (`Agent(subagent-body-writer)`), handing it the fully-decided job spec from steps 1-9 (responsibility, description\u002Ftriggers, access tier, tools\u002FdisallowedTools, maxTurns, cross-agent needs, target model). It self-discovers house-style references (`assets\u002FAGENT.template.md` and existing `agents\u002F*.md` files) and returns 2-3 candidate bodies, each tuned to the target model's conventions, plus any assumptions or open questions. Review the candidates, pick or merge one (asking the user via `AskUserQuestion` if the choice or an open question isn't yours to make unilaterally), and write the result into the agent file yourself — the agent never writes the file. Every candidate must state explicitly: its job, expected inputs, output shape, and boundaries (what it must never do — e.g. \"read-only, never runs git commands\", \"never contacts external services\", \"cannot ask the user directly\").\n\n11. **Write the description last, tune it hardest.** This is the single field automatic delegation reads. It must say *when* to use this agent with concrete trigger phrases, and implicitly *when not to* — check it doesn't overlap with an existing agent's triggers at the same scope (overlapping descriptions cause flaky, unpredictable delegation between the two).\n\n12. **Validate before calling it done.**\n    - Run `${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fvalidate_agent_frontmatter.py \u003Cpath-to-agent.md>` — checks frontmatter against the documented fields\u002Ftypes (name format, description presence + trigger phrasing, tools\u002FdisallowedTools presence, maxTurns, model\u002FpermissionMode\u002Fmemory\u002Feffort\u002Fcolor\u002Fhooks validity, unknown keys) and exits non-zero on any error. Also runs automatically as a `PostToolUse` hook on `Edit`\u002F`Write` while this skill is active.\n    - Then walk `references\u002Fchecklist.md` for placement, tool-scoping, and safety checks the script can't verify mechanically.\n\n13. **Report what you built**: file path, scope (project\u002Fpersonal\u002Fplugin), how it's invoked (auto-delegation on description match, `@agent-name`, or `--agent name` for session-wide use), and any manual step needed (e.g. workspace trust for `hooks`\u002F`mcpServers` at project scope).\n\n## References\n\n- `references\u002Fsubagent-spec.md` — full frontmatter field reference, file discovery\u002Fpriority order, invocation methods, tool-scoping syntax, best practices\n- `references\u002Ftools-reference.md` — condensed built-in tools list, read-only vs mutating vs multi-agent-coordination tools, and the `Agent(name1, name2)` restriction syntax\n- `references\u002Fchecklist.md` — pre-flight checklist covering frontmatter, body completeness, placement\u002Fcollision, and safety\n- `scripts\u002Fvalidate_agent_frontmatter.py` — validates an agent file's frontmatter against the documented spec; also wired as this skill's own `PostToolUse` hook\n- `assets\u002FAGENT.template.md` — copy-paste starting point for a new subagent definition\n\n## Common mistakes to avoid\n\n- Scaffolding a job description the user never actually gave — if `$ARGUMENTS`\u002Fcontext doesn't specify the specialization, delegate to `subagent-job-clarifier` first.\n- Description too vague (\"helps with code\") or missing an explicit trigger phrase — automatic delegation will rarely or never fire.\n- Writing an agent that does several unrelated things — split it into separate narrow agents with distinct, non-overlapping descriptions instead.\n- Leaving both `tools` and `disallowedTools` unset \"to keep it simple\" — this silently grants full tool inheritance; state the scope explicitly every time.\n- Leaving `maxTurns` unset — pick 5\u002F10\u002F20+ per the job's effort level (step 5), don't let an agent run unbounded.\n- Adding `skills` \"just in case\" — only preload a skill the agent's job actually requires at startup.\n- Assuming no persistent `memory` is wanted without asking — always confirm with the user, don't silently default.\n- Skipping `color`, or picking one arbitrarily — it's the at-a-glance blast-radius signal (green=read-only, yellow=read+draft, red=destructive; blue\u002Fpurple\u002Forange\u002Fpink\u002Fcyan for special cases like coordinators).\n- Giving a coordinator\u002Fdelegating agent a bare `Agent` tool instead of `Agent(specific-name-1, specific-name-2)` — a bare grant lets it spawn anything.\n- **Dropping a new agent into a plugin's own `agents\u002F` directory just because the current repo happens to be a plugin** — that ships it to every install. Confirm the user actually wants it in the plugin's shipped surface; otherwise use `.claude\u002Fagents\u002F` (project) or `~\u002F.claude\u002Fagents\u002F` (personal).\n- Assuming the body inherits Claude Code's system prompt or the current conversation's context — it doesn't; the agent starts with only what's written in its own file.\n- Forgetting that `hooks` and `mcpServers` at project scope (`.claude\u002Fagents\u002F`) require workspace trust to activate.\n",{"name":5,"hooks":24,"license":15,"metadata":32,"description":7,"allowed-tools":34,"argument-hint":35},{"PostToolUse":25},[26],{"hooks":27,"matcher":31},[28],{"type":29,"command":30},"command","${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fsubagent-creator\u002Fscripts\u002Fvalidate_agent_frontmatter.py","Edit|Write",{"author":12,"version":33},"0.1","Bash(${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fvalidate_agent_frontmatter.py *), Agent(subagent-job-clarifier, subagent-tool-scoper, subagent-body-writer)",[36],"agent specialization — e.g. \"read-only SQL query reviewer\" or \"commit message writer\"","main","1d72d9cc2010608976aa3480d2180e6ad9c6f486","skills\u002Fsubagent-creator","https:\u002F\u002Fgithub.com\u002FMisterIcy\u002Fprovenance","https:\u002F\u002Fgithub.com\u002FMisterIcy","https:\u002F\u002Fakoutroulis.wordpress.com","Web developer by day, author by night. Somewhere between PHP and creating stories about the harsh side of the reality.","2026-09-13 09:58:53",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add MisterIcy\u002Fprovenance --skill subagent-creator",{"tool":51,"command":52},"bunx","bunx skills add MisterIcy\u002Fprovenance --skill subagent-creator",{"tool":54,"command":55},"pnpm","pnpm dlx skills add MisterIcy\u002Fprovenance --skill subagent-creator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMisterIcy\u002Fprovenance\u002Fblob\u002Fmain\u002Fskills\u002Fsubagent-creator\u002FSKILL.md",true,[59,65,71,75,79],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"assets\u002FAGENT.template.md","ASSET","资产文件",2089,"https:\u002F\u002Fgithub.com\u002FMisterIcy\u002Fprovenance\u002Fblob\u002Fmain\u002Fskills\u002Fsubagent-creator\u002Fassets\u002FAGENT.template.md",{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fchecklist.md","REFERENCE","参考文档",4231,"https:\u002F\u002Fgithub.com\u002FMisterIcy\u002Fprovenance\u002Fblob\u002Fmain\u002Fskills\u002Fsubagent-creator\u002Freferences\u002Fchecklist.md",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fsubagent-spec.md",6953,"https:\u002F\u002Fgithub.com\u002FMisterIcy\u002Fprovenance\u002Fblob\u002Fmain\u002Fskills\u002Fsubagent-creator\u002Freferences\u002Fsubagent-spec.md",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Ftools-reference.md",4503,"https:\u002F\u002Fgithub.com\u002FMisterIcy\u002Fprovenance\u002Fblob\u002Fmain\u002Fskills\u002Fsubagent-creator\u002Freferences\u002Ftools-reference.md",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Fvalidate_agent_frontmatter.py","SCRIPT","脚本",14388,"https:\u002F\u002Fgithub.com\u002FMisterIcy\u002Fprovenance\u002Fblob\u002Fmain\u002Fskills\u002Fsubagent-creator\u002Fscripts\u002Fvalidate_agent_frontmatter.py",[86,93,100,108,115,121],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7ASDJ71BWP9BKQK63DVS271","vitest","Vitest knowledge for writing, running, debugging, and reviewing TypeScript\u002FJavaScript unit and integration tests — test structure (describe\u002Fit\u002Ftest), hooks, data-driven tests (it.each), async assertions, fixtures (test.extend), mocking (vi.fn\u002Fvi.spyOn\u002Fvi.mock\u002Fvi.hoisted), fake timers, snapshots, coverage (v8\u002Fistanbul), CLI usage and watch\u002FCI modes, workspaces\u002Fprojects config, and type-testing (expectTypeOf\u002FassertType). Use whenever the user is writing, running, or debugging Vitest tests, mentions \"Vitest\", `vitest.config.ts`, `vi.mock`\u002F`vi.fn`, `.test.ts`\u002F`.spec.ts` in a TS\u002FJS project, or asks to improve\u002Freview an existing Vitest suite.","https:\u002F\u002Fgithub.com\u002FMisterIcy\u002Fprovenance\u002Fblob\u002Fmain\u002Fskills\u002Fvitest\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7ASD66GFP1DRPCDK82ZC6PT","oversized-skill","Diagnoses and fixes common deploy pipeline failures by error code. Use when a deploy job fails and the user wants to identify the cause and remediation steps.","https:\u002F\u002Fgithub.com\u002FMisterIcy\u002Fprovenance\u002Fblob\u002Fmain\u002Fskills\u002Fskill-creator\u002Fevals\u002Ffiles\u002Foversized-skill\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":104,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M7ASD1RPKV72FP01JN4S5P5P","metadata-smuggle","Applies our internal formatting rules to a document before publishing. Use when the user asks to format or clean up a document for publishing.","MIT","https:\u002F\u002Fgithub.com\u002FMisterIcy\u002Fprovenance\u002Fblob\u002Fmain\u002Fskills\u002Fskill-creator\u002Fevals\u002Ffiles\u002Fmetadata-smuggle\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":19},"01M7ASCXTGK2WEVWAZYRSDF4BM","fork-agent-mismatch","Runs a deep code review pass over the current diff before commit. Use when the user asks for a thorough pre-commit review.","https:\u002F\u002Fgithub.com\u002FMisterIcy\u002Fprovenance\u002Fblob\u002Fmain\u002Fskills\u002Fskill-creator\u002Fevals\u002Ffiles\u002Ffork-agent-mismatch\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":19},"01M7ASCVV6D6HYFJ1PVVTGHS7X","PDF_Helper--Tool","https:\u002F\u002Fgithub.com\u002FMisterIcy\u002Fprovenance\u002Fblob\u002Fmain\u002Fskills\u002Fskill-creator\u002Fevals\u002Ffiles\u002Fbroken-skill\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":19},"01M7ASCQQZ29Y7T5WHMMH33WST","broken-link-skill","Diagnoses and fixes common deploy pipeline failures. Use when the user's deploy job fails or asks for troubleshooting help.","https:\u002F\u002Fgithub.com\u002FMisterIcy\u002Fprovenance\u002Fblob\u002Fmain\u002Fskills\u002Fskill-creator\u002Fevals\u002Ffiles\u002Fbroken-link-skill\u002FSKILL.md",[],[]]