Creates specialized AI agents on-demand when no existing agent matches a request. Use when the Router cannot find a suitable agent for a task. Enables self-evolution by generating persistent agents.
Mode: Script-First - Use scripts/main.cjs as the canonical path for generation and validation, then use this guide for research, skill assignment, and integration follow-through.
Creates specialized AI agents on-demand for capabilities that do not already have a good owner.
| Operation | Primary command or tool |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ----------- | --------------- |
| Check for existing agents | Glob: .claude/agents/**/*.md |
| Generate the managed template | node .claude/skills/agent-creator/scripts/main.cjs --action generate --name <agent-name> --description "<summary>" --category <core | domain | specialized | orchestrators> |
| Validate the managed template | node .claude/skills/agent-creator/scripts/main.cjs --action validate --file .claude/agents/<category>/<agent-name>.md |
| Research the role | Follow occupational alignment details and research and skills-gap details |
| Final integration | Follow integration reference |
Before creating any agent file, check whether the target already exists.
test -f .claude/agents/<category>/<agent-name>.md && echo "EXISTS" || echo "NEW"
artifact-updater.Run the duplicate detector before creating a new artifact:
const { checkDuplicate } = require('.claude/lib/creation/duplicate-detector.cjs');
const result = checkDuplicate({
artifactType: 'agent',
name: proposedName,
description: proposedDescription,
keywords: proposedKeywords || [],
});
Handle the outcomes exactly as before:
EXACT_MATCH -> stop and route to agent-updaterREGISTRY_MATCH -> inspect registry drift before creatingSIMILAR_FOUND -> review the candidates and decide whether to create or updateNO_MATCH -> continue to Step 0.5Run checkCompanions("agent", "{agent-name}") from .claude/lib/creators/companion-check.cjs before you continue. Record missing companion artifacts and carry them into post-creation follow-ups.
Search .claude/agents/**/*.md and the surrounding directories before proceeding. If an existing core, specialized, domain, or orchestrator agent already fits, use it instead of creating a duplicate specialist.
Complete the preserved research flow before finalizing the agent contract:
Every new agent still needs a deliberate skill set.
Decide the agent archetype, category, and model before generation.
| Agent Type | Use when | Model |
| ---------- | --------------------------------------- | -------- |
| Worker | Executes tasks directly | sonnet |
| Analyst | Research, review, or evaluation focused | sonnet |
| Specialist | Deep domain expertise | opus |
| Advisor | Strategic guidance or consulting | opus |
Choose the output directory that matches the role: core, specialized, domain, or orchestrators.
Use the contract-first generator and validate the output before any manual refinement:
node .claude/skills/agent-creator/scripts/main.cjs --action generate --name <agent-name> --description "<summary>" --category <core|domain|specialized|orchestrators>
node .claude/skills/agent-creator/scripts/main.cjs --action validate --file .claude/agents/<category>/<agent-name>.md
The preserved template details in research and skills-gap details still define the required skills: array, Step 0 skill loading, lazy-load path usage, hook/workflow tables, response approach, behavioral traits, and examples.
Keep this minimum frontmatter and workflow contract:
---
name: agent-name
description: What the agent does and when to use it
tools: [Read, Write, Edit, Grep, Glob, Bash, WebSearch, WebFetch, TaskUpdate, TaskList, TaskCreate, TaskGet, Skill]
model: sonnet
context_strategy: lazy_load
skills:
- task-management-protocol
- code-semantic-search
context_files:
- @.claude/context/memory/learnings.md
---
And keep the generated body aligned with these sections:
## Enforcement Hooks## Related Workflows## Core Persona## Workflow with ### Step 0: Load Skills (FIRST)## Response Approach## Behavioral Traits## Example Interactions## Task Progress Protocol and ## Memory Protocolscripts/main.cjs and validated with --action validate.@AGENT_ROUTING_TABLE.md and any required routing keywords were updated.node .claude/tools/cli/validate-integration.cjs .claude/agents/<category>/<agent-name>.md passes.node .claude/tools/cli/generate-agent-registry.cjs was run when the agent is new or materially changed..claude/config/agent-config.json was updated when tool defaults are required.npm run gen:all-registries was run for new or re-registered agents.This creator skill must keep new or updated agents aligned with the rest of the creator ecosystem:
skill-creator for reusable capabilities and assignmentstool-creator for executable automation surfaceshook-creator for guardrails and enforcementtemplate-creator for scaffold reuseworkflow-creator for orchestration and phase gatingcommand-creator for operator-facing entry pointsBefore handoff, verify the related ecosystem updates:
validate-integration.cjs passes for the affected agent artifact.For new agent patterns, role designs, orchestration models, or evaluation flows:
skill-creator inline.Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer