subagent-creator
Create new Claude Code custom agents (subagents). Use when: (1) User wants to create a new custom agent, (2) User says 'create agent', 'new agent', 'make subagent', (3) User wants a specialized agent for delegation. Covers agent file format, YAML frontmatter, tool restrictions, model selection, permission modes, persistent memory, placement.
Best use case
subagent-creator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create new Claude Code custom agents (subagents). Use when: (1) User wants to create a new custom agent, (2) User says 'create agent', 'new agent', 'make subagent', (3) User wants a specialized agent for delegation. Covers agent file format, YAML frontmatter, tool restrictions, model selection, permission modes, persistent memory, placement.
Teams using subagent-creator should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/subagent-creator/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How subagent-creator Compares
| Feature / Agent | subagent-creator | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create new Claude Code custom agents (subagents). Use when: (1) User wants to create a new custom agent, (2) User says 'create agent', 'new agent', 'make subagent', (3) User wants a specialized agent for delegation. Covers agent file format, YAML frontmatter, tool restrictions, model selection, permission modes, persistent memory, placement.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Create Custom Agent ## Agent File Format Custom agents are **Markdown files with YAML frontmatter** stored in: | Location | Scope | |----------|-------| | `$HOME/.claude/agents/` | All projects (personal) | | `.claude/agents/` | Current project only | ## Frontmatter Fields | Field | Required | Description | |-------|----------|-------------| | `name` | Yes | Lowercase letters and hyphens identifier | | `description` | Yes | What the agent does. Claude uses this to decide when to delegate | | `model` | No | `sonnet`, `opus`, `haiku`, or `inherit` (default) | | `tools` | No | Allowlist of tools. Inherits all if omitted. Use `Task(agent-name)` to restrict subagent spawning | | `disallowedTools` | No | Denylist of tools | | `permissionMode` | No | `default`, `acceptEdits`, `delegate`, `dontAsk`, `bypassPermissions`, `plan` | | `maxTurns` | No | Max agentic turns before stopping | | `skills` | No | Skills to preload at startup | | `mcpServers` | No | MCP servers available to agent | | `hooks` | No | Lifecycle hooks scoped to agent | | `memory` | No | `user`, `project`, or `local` - persistent memory across sessions | | `color` | No | Color for UI display | ## Workflow ### Step 1: Understand the agent's purpose Ask user: - What tasks should this agent handle? - Should it be personal (`$HOME/.claude/agents/`) or project-scoped (`.claude/agents/`)? - Does it need write access or is it read-only? ### Step 2: Choose appropriate settings **Model selection:** - `opus` - Complex reasoning, code review, architecture decisions - `sonnet` - General development, balanced speed/quality - `haiku` - Fast simple tasks, formatting, quick lookups **Tool restrictions:** - Read-only agent: `tools: Read, Grep, Glob` - Developer agent: omit `tools` (inherits all) - No web access: `disallowedTools: WebFetch, WebSearch` **Key constraints:** - Subagents CANNOT spawn other subagents (no nesting) - Keep the body focused - it becomes the agent's system prompt **Path safety -- NEVER use `~` in agent instructions:** - WARNING: `~` (tilde) is only expanded by interactive shells. It is NOT expanded by Node.js `fs` operations, non-login shell contexts, or most programmatic file APIs. Using `~` in file paths passed to `fs.writeFileSync`, `fs.mkdirSync`, etc. will create a literal directory named `~` inside the working directory - In agent instructions, ALWAYS write `$HOME` instead of `~` for home directory paths. For example: `$HOME/cclogs/...` not `~/cclogs/...`, `$HOME/.claude/...` not `~/.claude/...` - This applies to all file paths in the agent body: log directories, config paths, output directories, temp file locations, etc. ### Step 3: Create the agent file Template: ```markdown --- name: agent-name description: One sentence describing when Claude should delegate to this agent model: sonnet tools: Read, Grep, Glob, Bash --- You are a specialized [role]. [Core instruction in 1-2 sentences.] ## Responsibilities [What this agent does - keep concise] ## Workflow [Step-by-step procedure if applicable] ``` ### Step 4: Format the agent file Format the created agent file using the mdx-formatter to ensure consistent markdown formatting: ```bash pnpm dlx @takazudo/mdx-formatter --write <path-to-agent-file.md> ``` ### Step 5: Verify After creating the file, verify: 1. File is at the correct location 2. YAML frontmatter parses correctly (no syntax errors) 3. Description clearly indicates when to use the agent ## Examples ### Read-only code explorer ```yaml --- name: code-explorer description: Explore and explain codebase architecture and patterns tools: Read, Grep, Glob model: sonnet --- You are a codebase explorer. Analyze code structure, explain architecture, and find patterns. ``` ### Developer with memory ```yaml --- name: project-dev description: Project-aware developer that learns conventions over time model: opus memory: project --- You are a developer for this project. Maintain memory of conventions, patterns, and architectural decisions. ``` ## Reference - Agents are used via Task tool's `subagent_type` parameter - Skills can use agents via `context: fork` + `agent: agent-name` - Run directly: `claude --agent agent-name`
Related Skills
subagent-tweaker
Fix, improve, or update existing Claude Code custom agents (subagents). Use when: (1) User reports an agent isn't working well, (2) User wants to adjust agent behavior, tools, or model, (3) User says 'fix agent', 'update agent', 'tweak agent', 'agent not working'. Edits agent frontmatter, tool restrictions, prompts.
skill-creator
Guide for creating new Claude Code skills AND tweaking/fixing existing ones. Use when: (1) User wants to create a new skill, (2) User wants to improve, fix, or tweak an existing skill, (3) User says 'create skill', 'new skill', 'fix skill', 'update skill', 'tweak skill', 'skill not working', or 'skill triggers too often'. Covers skill anatomy (SKILL.md, scripts/, references/, assets/), progressive disclosure, frontmatter, bundled resources, init_skill.py, diagnosing trigger/behavior issues, and iteration.
mermaid-creator
Use proactively whenever generating Mermaid diagram code in any context (markdown blocks, .md files, docs). Covers flowcharts, sequence, class, state, ER, gantt, pie, mindmaps, timelines, and all Mermaid types. Applies strict syntax rules to prevent rendering errors (HTML tags, style directives, invalid escapes). No explicit request needed — load automatically when Mermaid syntax is being produced.
custom-command-creator
Create and manage custom slash commands in Claude Code. Use when: (1) User wants to create a new slash command, (2) User asks about /commands or custom commands, (3) User wants to automate frequent prompts, (4) User says 'create global command' or 'create local command', (5) User mentions 'command-creator'. Covers creation (global/local), command anatomy, frontmatter, arguments, bash, file references, namespacing, command vs skill comparison.
ascii-circuit-diagram-creator
Create and validate ASCII circuit diagrams with automatic rule checking and iterative refinement. Use when the user requests circuit diagrams in ASCII/text format, or when creating technical documentation with embedded schematics. Ensures golden rules (no line crossings without junctions, no lines crossing labels, proper component connections, correct polarity). Includes preview validation using monospace rendering.
zudoesa-articlify
Convert conversation context into an esa article via the zudoesa-writer subagent. ONLY invoke when the user explicitly asks — NEVER proactively propose. Triggers: 'write esa article', 'esa記事', 'esaに書いて', 'articlify for esa', or /zudoesa-articlify. Gathers context, creates a writing brief, delegates to the writer subagent.
zudoesa-apply-voice
Apply Takazudo's esa writing voice and vocabulary rules to text. Use when: (1) User wants to write/rewrite text in Takazudo's esa style, (2) User says 'apply voice', 'esa voice', 'esa文体で', 'esa風に書いて', '文体を適用', (3) User provides text to transform to esa style. Reads writing-style.md and vocabulary-rule.md from takazudo-esa-writing repo and applies the rules.
zudocg-articlify
Convert conversation context into a CodeGrid article via the zudocg-writer subagent. ONLY invoke when the user explicitly asks — NEVER proactively propose. Triggers: 'write codegrid article', 'CodeGrid記事', 'codegridに書いて', 'articlify for codegrid', or /zudocg-articlify. Gathers context, creates a writing brief, delegates to the writer subagent.
zudocg-apply-voice
Apply Takazudo's CodeGrid writing voice and vocabulary rules to text. Use when: (1) User wants to write/rewrite text in Takazudo's CodeGrid style, (2) User says 'apply voice', 'codegrid voice', 'codegrid文体で', 'codegrid風に書いて', '文体を適用', (3) User provides text to transform to CodeGrid style. Reads writing-style.md and vocabulary-rule.md from takazudo-codegrid-writing repo and applies the rules.
zpaper-articlify
Convert conversation context into a zpaper blog article via the zpaper-writer subagent. ONLY invoke when the user explicitly asks — NEVER proactively propose. Triggers: 'write zpaper article', 'zpaper記事', 'zpaperに書いて', 'articlify for zpaper', or /zpaper-articlify. Gathers context, creates a writing brief, delegates to the writer subagent.
zpaper-apply-voice
Apply Takazudo's zpaper blog writing voice and vocabulary rules to text. Use when: (1) User wants to write/rewrite text in Takazudo's zpaper style, (2) User says 'apply voice', 'zpaper voice', 'zpaper文体で', 'zpaper風に書いて', 'ブログ文体を適用', (3) User provides text to transform to zpaper style. Reads writing-style.md and vocabulary-rule.md from the zpaper repo and applies the rules.
xlsx
Spreadsheet creation, editing, and analysis. Use when working with .xlsx, .xlsm, .csv, .tsv files for: (1) Creating spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modifying existing spreadsheets while preserving formulas, (4) Data analysis and visualization, (5) Recalculating formulas.