$npx -y skills add krzysztofsurdy/code-virtuoso --skill agent-creatorInteractive tool to design a well-scoped sub-agent definition - specialist, role, or team-lead - with the right frontmatter, tool permissions, isolation, memory, and system prompt. Use when the user asks to create a sub-agent, write an agent file, design a specialized worker, sca
| 1 | # Agent Creator |
| 2 | |
| 3 | Create a sub-agent that earns its context window. Most agents fail not because the model is weak but because the definition is vague - unclear trigger, sprawling tool list, a body that mixes persona and procedure, and no output contract. This skill walks you through a six-phase design so the resulting agent is focused, least-privileged, and predictable. |
| 4 | |
| 5 | ## Core Principles |
| 6 | |
| 7 | | Principle | Meaning | |
| 8 | |---|---| |
| 9 | | **One job, one agent** | An agent that does two things does neither well. Split the responsibility before writing. | |
| 10 | | **Least privilege** | Grant the smallest tool set that lets the agent finish its job. Read-only by default. | |
| 11 | | **Trigger-first description** | The `description` field is the only thing read before delegation. Pack it with keywords and "when to use". | |
| 12 | | **Contract over conversation** | Define explicit input, process, and output. Agents are not chat sessions. | |
| 13 | | **Isolation when writing** | If the agent edits files, run it in a worktree so the orchestrator can review before merging. | |
| 14 | | **Portable body, platform frontmatter** | Keep the system prompt agent-agnostic. Adapt frontmatter fields per target platform. | |
| 15 | |
| 16 | --- |
| 17 | |
| 18 | ## Agent vs Skill - Quick Disambiguation |
| 19 | |
| 20 | Before creating an agent, confirm it is the right primitive. |
| 21 | |
| 22 | | Use a Skill | Use an Agent | |
| 23 | |---|---| |
| 24 | | Reference material (patterns, checklists, schemas) | Work to perform (investigate, review, implement) | |
| 25 | | Loaded into an existing session | Runs in its own context window | |
| 26 | | Passive knowledge | Active actor with tools and a workflow | |
| 27 | | "Where do I learn about X" | "Do X for me and return a result" | |
| 28 | |
| 29 | If the answer is reference material, stop and use the `skill-creator` skill instead. If the answer is work, continue. |
| 30 | |
| 31 | --- |
| 32 | |
| 33 | ## Archetype Selection |
| 34 | |
| 35 | Agents fall into three archetypes. Pick one before designing. |
| 36 | |
| 37 | | Archetype | Scope | Memory | Modifies files | Typical examples | |
| 38 | |---|---|---|---|---| |
| 39 | | **Specialist** | Single, repeatable task type | Stateless | Rarely (doc writer, implementer) | Investigator, Reviewer, Refactor Scout, Dependency Auditor, Test Gap Analyzer | |
| 40 | | **Role** | Entire domain of responsibility | Often persistent (project-level) | Dev roles yes, others no | Product Manager, Architect, Backend Dev, QA Engineer, Project Manager | |
| 41 | | **Team-Lead** | Coordinates multiple workers in parallel | Shared task list | No (delegates) | Orchestrator, release-train lead, review dispatcher | |
| 42 | |
| 43 | ### Decision tree |
| 44 | |
| 45 | 1. Does the agent do **one repeatable task type** (review this PR, investigate this area, audit dependencies)? -> **Specialist** |
| 46 | 2. Does the agent **own a domain** across many task types and benefit from remembering context across sessions (requirements, architecture decisions, risk register)? -> **Role** |
| 47 | 3. Does the agent need to **spawn and coordinate other agents** working in parallel (research teams, multi-layer refactors)? -> **Team-Lead** |
| 48 | |
| 49 | If the user provided an archetype as an argument, use it. Otherwise present a selectable menu using `AskUserQuestion` (or the platform's equivalent interactive prompt) with the three options from the table above. |
| 50 | |
| 51 | See [references/archetypes.md](references/archetypes.md) for worked examples of each archetype and the anti-patterns to avoid. |
| 52 | |
| 53 | --- |
| 54 | |
| 55 | ## Workflow |
| 56 | |
| 57 | This skill uses **guided phases** - each phase is a separate file loaded one at a time. Every phase ends with a gate where you must wait for user confirmation before proceeding. Do not skip phases or merge them. |
| 58 | |
| 59 | | Phase | File | What it covers | |
| 60 | |---|---|---| |
| 61 | | 1 | [Purpose and Trigger](phases/01-purpose-and-trigger.md) | What the agent does, when to delegate, out-of-scope, output shape, archetype | |
| 62 | | 2 | [Name and Identity](phases/02-name-and-identity.md) | Kebab-case name, collision check, user confirmation | |
| 63 | | 3 | [Capabilities](phases/03-capabilities.md) | Tool permissions, isolation, memory, preloaded skills | |
| 64 | | 4 | [System Prompt](phases/04-system-prompt.md) | Five-section contract: Input, Process, Rules, Output | |
| 65 | | 5 | [Placement and Scope](phases/05-placement-and-scope.md) | Where the file lives: project, personal, plugin, session | |
| 66 | | 6 | [Validate and Write](phases/06-validate-and-write.md) | Checklist, file creation, marketplace registration | |
| 67 | |
| 68 | **Start by loading Phase 1.** After the user confirms each phase, load the next. Never load multiple phases at once. Never skip a pha |