| name | subagent-creator |
| description | Meta-skill that generates Claude Code agent definition files (.md). Creates specialized agents with proper tool access, model selection, and behavioral instructions. Use when asked to "create an agent", "make a sub-agent", or "generate agent for X". |
Sub-Agent Creator — Meta-Skill for Generating Agent Definitions
A meta-skill that produces Claude Code agent .md files. It designs agents
with appropriate expertise, tool access, behavioral rules, and quality
requirements following AgenticWorkflow conventions.
When to Use
- User asks to create a new agent for a specific task
- System needs to generate agents for a workflow (e.g., thesis agents)
- Batch creation of multiple related agents
Inherited DNA
This meta-skill inherits the AgenticWorkflow genome. As a skill that generates agents, it must itself embody the DNA it enforces.
| DNA Component | Expression in subagent-creator |
|---|
| Absolute Criteria 1 (Quality) | Generated agents use optimal model selection (opus for research, sonnet for utility) |
| Absolute Criteria 2 (SOT) | Generated agents respect single-writer SOT pattern; guard_sot_write.py compatibility |
| Absolute Criteria 3 (CCP) | Research agents include GRA compliance; utility agents document CCP exemption rationale |
| English-First | All agent instructions are in English |
| P1 Compliance | Research agents include GroundedClaim schema + Hallucination Firewall |
| Quality Gates | Research agents integrate with validate_grounded_claim.py PostToolUse hook |
Agent File Schema
Agent definitions live in .claude/agents/ and follow this structure:
---
name: {agent-name} # kebab-case
description: {brief description}
model: opus # opus | sonnet | haiku
tools: Read, Write, Glob, Grep # comma-separated tool list
maxTurns: {N} # max reasoning turns (default: 20)
memory: project # project | none
---
{Agent behavioral instructions in English}
Generation Protocol
Step 1: Agent Design Analysis
Determine the agent's requirements:
- Primary task: What is the agent's core responsibility?
- Expertise domain: What specialized knowledge does it need?
- Input/Output: What does it receive and produce?
- Quality criteria: What makes a good output for this agent?
- Tool needs: Which tools does it require?
Step 2: Model Selection
Select the appropriate model based on task complexity:
| Model | Use When | Examples |
|---|
opus | Complex analysis, synthesis, critical reasoning | Thesis writer, critical reviewer, synthesis agent |
sonnet | Structured tasks, search, data processing | Literature searcher, formatting specialist |
haiku | Simple, repetitive tasks | File validation, format checking |
Default to opus when quality is the absolute criterion (Absolute Criteria 1).
Step 3: Tool Selection
Assign tools based on the agent's needs:
| Tool | When to Include |
|---|
Read | Agent needs to read files (almost always) |
Write | Agent produces output files |
Glob | Agent needs to find files by pattern |
Grep | Agent needs to search file contents |
Bash | Agent needs to run commands (use sparingly) |
WebSearch | Agent needs to search the web |
WebFetch | Agent needs to fetch web content |
Agent | Agent needs to delegate to sub-agents |
Step 4: Generate Agent Definition
Write the agent .md file with:
- Frontmatter: name, description, model, tools, maxTurns, memory
- Role definition: "You are a [role] specializing in [domain]."
- Task instructions: Step-by-step protocol for the agent's work
- Output format: Exact specification of expected output structure
- Quality rules: Domain-specific quality requirements
- GRA compliance (if research agent): GroundedClaim schema, Hallucination Firewall rules
Step 5: Context Isolation Assessment
Determine if commands invoking this agent should use context: fork:
| Factor | Inline (no fork) | Fork recommended |
|---|
| Agent is part of orchestration flow | ✅ | ❌ |
| Agent writes to SOT | ✅ (orchestrator only) | ❌ never |
| Agent does independent analysis/production | ❌ | ✅ |
| Agent needs Bash for P1 validation scripts | Fork requires Bash in tool list | Check tool compatibility |
| Agent's work would pollute main context | ❌ | ✅ |
If fork is recommended, note this in the agent's documentation:
## Fork Compatibility
This agent is safe for `context: fork` invocation. It:
- Reads SOT but never writes to it
- Produces independent output files at {output_path}
- Does not require Bash / Does require Bash (specify)
Most thesis workflow agents should NOT be forked — they are invoked by thesis-orchestrator within Agent Teams, which already provides context isolation.
Step 6: GRA Integration (Research Agents Only)
For agents that produce research claims, add:
## GRA Compliance
All claims must follow the GroundedClaim schema:
- **id**: "{CLAIM_PREFIX}-{NNN}" (e.g., "LS-001")
- **claim_type**: FACTUAL | EMPIRICAL | THEORETICAL | METHODOLOGICAL | INTERPRETIVE | SPECULATIVE
- **sources**: At least one PRIMARY or SECONDARY source with reference and DOI
- **confidence**: 0-100 score
- **effect_size**: When applicable (statistical findings)
- **uncertainty**: Explicit limitation statement
### Hallucination Firewall
- BLOCK: "all studies agree", "100%", "no exceptions"
- REQUIRE_SOURCE: Any statistical claim (p-values, effect sizes)
- SOFTEN: "certainly", "obviously", "clearly" → add hedging
- VERIFY: "it is known that" → add citation
Step 7: Validate Agent Definition
Verify the generated agent:
Step 8: Register Agent
Output:
- Agent file location:
.claude/agents/{name}.md
- How to invoke:
@{name} in prompts or via Agent tool
- Claim prefix (if GRA agent):
{PREFIX}
Language Rules
- Agent instructions (body): English — AI performance optimization
- Description (frontmatter): English — for agent matching
- Output instructions for user-facing text: Include Korean translation directive
Batch Creation
When creating multiple related agents:
- Design all agents together for consistency
- Ensure claim prefixes are unique across the set
- Define inter-agent dependencies explicitly
- Verify no overlapping responsibilities
Quality Checklist