원클릭으로
agent-creator
Guided agent personality creation with schema validation and registry integration
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Guided agent personality creation with schema validation and registry integration
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
DEPRECATED compatibility shim; workflow-common-core is canonical for all conventions referenced here
Interprets --just-* and --skip-* command flags for /legion:build and /legion:review, validates flag combinations against rules, and resolves the matching team template from intent-teams.yaml. Use when the user passes intent flags to build or review commands, asks about flag combinations, or needs to filter agent teams by intent.
Dev-QA loop engine with structured feedback, fix routing, and user escalation for /legion:review
Executes wave-structured plans with personality-injected agents — parallel or sequential per CLI adapter
Maps all 48 Legion agents by division, capability, and task type for intelligent team assembly
Engine for /legion:map. Analyzes an existing codebase, generates CODEBASE.md for backward-compatible architecture context, and writes .planning/codebase/ index artifacts consumed by /legion:start, /plan, /build, /review, /status, and /quick.
| name | agent-creator |
| description | Guided agent personality creation with schema validation and registry integration |
| triggers | ["agent","create","custom","personality","new-agent"] |
| token_cost | medium |
| summary | Guided workflow for creating new agent personalities. Validates uniqueness, generates frontmatter and personality sections, registers in catalog. Use when adding a custom agent to the legion. |
Guided conversation engine for creating new agent personalities. Captures agent identity, validates the schema, generates the agent .md file, and inserts the registry row so the new agent appears in future planning recommendations.
References:
workflow-common.md (Agent Personality Paths, Division Constants)agent-registry.md (Section 1 row format, Section 3 scoring)questioning-flow.md (3-stage structure, AskUserQuestion usage)Complete schema for agent personality files. Every agent .md file must conform to this structure.
| Field | Format | Validation Rule |
|---|---|---|
name | Kebab-case string | Non-empty. Must match regex ^[a-z][a-z0-9-]+$. No spaces, uppercase, or underscores. Must match the filename (without .md). Must be globally unique across all agent files in agents/. |
description | Free text (single line) | Non-empty. At least 10 characters. No newlines within the value. |
color | Color keyword | Must be one of: red, green, blue, purple, cyan, orange, yellow, pink. |
| Field | Format | When to Include |
|---|---|---|
tools | Comma-separated list | When the agent needs specific tools beyond defaults (e.g., WebFetch, WebSearch, Read, Write) |
All agents MUST use Format A — emoji headings with "Your" pronouns. The required sections are:
| Section | Heading | Purpose |
|---|---|---|
| Title | # {AgentName} Agent Personality | Agent identity |
| Identity | ## 🧠 Your Identity & Memory | Who you are — personality, experience, domain |
| Mission | ## 🎯 Your Core Mission | What you do — 3-5 key capabilities |
| Rules | ## 🚨 Critical Rules You Must Follow | Hard rules the agent always follows |
| Deliverables | ## 🛠️ Your Technical Deliverables | Concrete output artifacts |
| Workflow | ## 🔄 Your Workflow Process | Step-by-step task approach |
| Communication | ## 💭 Your Communication Style | Voice, tone, how the agent communicates |
| Learning | ## 🔄 Learning & Memory | What patterns to track across sessions |
| Metrics | ## 🎯 Your Success Metrics | Observable success criteria |
Conventions:
## canonical heading must include the emoji prefix## sections are allowed after the canonical ones---The agent must be placed in an existing division directory OR custom:
Valid divisions: Engineering, Design, Marketing, Product,
Project Management, Testing, Support, Spatial Computing,
Specialized, Custom
The agents/ directory holds all agent files (no division subdirectories). It is created on first use if it doesn't exist.
A 3-stage adaptive conversation that captures everything needed to write a valid agent file. Follows the questioning-flow.md pattern: infer where possible, confirm where uncertain.
Open with:
"What kind of specialist do you want to add to your team? Give me the one-liner — what does this agent do?"
From the user's response, extract:
Infer from the extracted information:
custom only when none of the existing divisions fit.{division}-{specialty} (e.g., engineering-security-auditor, design-motion-designer). Keep names descriptive but concise.Confirm via AskUserQuestion:
"I'll create a {division} agent — '{suggested-name}'. Specialty: {description}. Correct, or would you like to adjust?"
Options:
If the user adjusts: update the inferred values and re-confirm before proceeding.
Ask these questions adaptively — skip any that the user already answered in Stage 1:
Capabilities: "What are the top 3-5 things this agent can do that others can't?"
Personality: "How does this agent think and communicate? What's its personality?"
Hard rules: "Are there any hard rules this agent always follows?"
Confirm summary via AskUserQuestion before proceeding:
"Here's the agent I'll create:
- Division: {division}
- Name: {name}
- Capabilities: {capability_list}
- Personality: {personality_traits}
- Hard rules: {rules} Anything to adjust?"
Options:
Generate 3-5 task type tags from the captured capabilities. Tags must be:
Present via AskUserQuestion:
"For recommendations to work, I need task type tags. Based on capabilities, I suggest: {tag1}, {tag2}, {tag3}. These align with existing registry tags like: {example_existing_tags}. Add or remove any?"
Options:
After tag confirmation, generate the full agent file content and registry row. Present both to the user for final review before writing any files:
"Here's what I'll create:
Agent file:
agents/{agent-name}.mdRegistry row:| {agent-id} | agents/{agent-id}.md | {specialty} | {tags} |Ready to write?"
Run this validation checklist BEFORE writing any files. All checks must pass.
Validation Checklist:
1. Name uniqueness
- Search: grep -rl "^name: {proposed_name}$" agents/
- PASS: no output (name not found in any existing agent file)
- FAIL: output lists files with the same name — name is taken
2. Name format
- Check: proposed_name matches regex ^[a-z][a-z0-9-]+$
- PASS: matches
- FAIL: contains spaces, uppercase, underscores, or starts with a digit
3. Description
- Check: non-empty AND single line (no newlines) AND at least 10 characters
- PASS: all conditions met
- FAIL: empty, multiline, or too short
4. Color
- Check: value is one of: red, green, blue, purple, cyan, orange, yellow, pink
- PASS: matches allowed set
- FAIL: value not in allowed set
5. Division
- Check: value is one of: Engineering, Design, Marketing, Product,
Project Management, Testing, Support, Spatial Computing, Specialized, Custom
- PASS: valid division name
- FAIL: unknown division
6. Body content length
- Check: generated body content is at least 80 lines after the frontmatter
- PASS: 80+ lines
- FAIL: too short — flesh out the personality content
7. Heading check
- Check: body contains at least one # or ## heading
- PASS: heading found
- FAIL: no headings — body must have structured sections
8. Name in body
- Check: the agent name (from frontmatter) appears at least once in the body text
- PASS: name found in body
- FAIL: name missing from body content
On validation failure:
"Validation found {N} issue(s):
- {error_1}
- {error_2} Fix these before I can create the agent."
After all validation checks pass, generate and write the agent file.
agents/{agent-name}.md
Example: agents/engineering-security-auditor.md
If agents/ doesn't exist, create it:
mkdir -p agents
Generate the agent .md file with:
YAML frontmatter:
---
name: {agent-name}
description: {description}
color: {color}
---
If tools are specified:
---
name: {agent-name}
description: {description}
tools: {tool1}, {tool2}
color: {color}
---
Body content — generate substantive prose from the conversation data. Target 80-120 lines. Structure:
# {AgentName} Agent Personality
## 🧠 Your Identity & Memory
{2-3 paragraphs establishing who this agent is, their background,
expertise, and what drives them. Written in second person ("You are...").
Draw from Stage 2 personality traits and domain knowledge.}
## 🎯 Your Core Mission
{Prose description of the agent's primary mission, followed by
the capability list from Stage 2 written as detailed descriptions,
not bare bullets. Each capability should be 2-3 sentences explaining
what the agent does and how.}
## 🚨 Critical Rules You Must Follow
{The hard rules from Stage 2, each as a numbered item with
explanation of why the rule exists and what happens if violated.}
## 🔄 Your Workflow Process
{Inferred workflow from the agent's capabilities. How does this agent
approach a task from start to finish? What steps does it take?
This section is generated — not directly from user input — based on
the capabilities and personality captured in Stage 2.}
## 🎯 Your Success Metrics
{How the agent measures its own success. Derived from capabilities
and mission. Specific, observable outcomes — not vague aspirations.}
The body must be substantive prose — not placeholder templates. Use the user's responses to generate detailed, character-specific content.
After writing, verify the file exists:
test -f agents/{agent-name}.md && echo "OK" || echo "FAIL"
If verification fails: report the error and do NOT proceed to registry update.
After the agent file is written and verified, update agent-registry.md to include the new agent.
Read the current content of skills/agent-registry/SKILL.md.
Locate the division table heading in Section 1:
### {Division} Division ({N} agents) headingcustom division: find ### Custom Division headingFor existing divisions:
### heading or --- separator)| {agent-id} | `agents/{agent-id}.md` | {specialty description} | {tag1}, {tag2}, {tag3} |
### {Division} Division ({N+1} agents)For custom division:
### Custom Division table*No custom agents yet. Run /legion:agent to create one.*:
For non-custom divisions, update the agent count in the section heading:
### Engineering Division (7 agents) → ### Engineering Division (8 agents)
Read agent-registry.md after the edit and confirm the new row appears in the correct division table.
"The name '{proposed-name}' is already taken by
{existing-file-path}."
"Try: '{proposed-name}-2', '{alternative-qualifier}-{base-name}', or provide a different name."
mkdir -p agentsagents/ directory."{path}. The registry update failed — you can manually add the row to agent-registry.md."After both the agent file and registry row are created:
Agent created successfully!
- **Name**: {agent-name}
- **Division**: {division}
- **File**: agents/{agent-name}.md
- **Task types**: {tag1}, {tag2}, {tag3}
- **Registry**: Row added to agent-registry.md Section 1
Your new agent '{agent-name}' is ready. It will appear in
`/legion:plan` recommendations for tasks matching: {tags}.
After creating the agent file and updating the registry, regenerate the compressed knowledge index:
node scripts/generate-knowledge-index.js --patch
This updates the Dynamic Knowledge Index in AGENTS.md and CLAUDE.md to include the new agent. If the script is not available (e.g., global install without scripts/), skip this step — the index can be regenerated later.
Do NOT automatically commit. The calling command (/legion:agent) handles git commit in its Step 8. This skill focuses on file creation and registry update only.
This skill is consumed by:
| Consumer | Purpose | Integration Point |
|---|---|---|
/legion:agent command | Entry point for agent creation | Wires all 7 sections into an 8-step process |
agent-registry.md | New agents added to catalog | Section 5 inserts rows into Section 1 tables |
workflow-common.md | Division paths and custom agent convention | Section 1 schema references division constants |