/claude-skills:create-agent [name] - or leave empty to interviewfrom claude-skills
Generates structured Claude Code agents from user requests for autonomous subprocesses. Walks through identity, triggering, capabilities, memory, tool access, and execution configuration.
Ships in claude-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Generate well-structured Claude Code agents — markdown files with YAML frontmatter that delegate complex multi-step work to autonomous subprocesses with isolated context windows.
Agents vs Skills — know the difference before generating:
> folded scalar descriptions (50-70 tokens, no <example> blocks), and are spawned via the Agent toolParse $ARGUMENTS for hints. Gather:
Identity:
Triggering: 3. Trigger conditions — When should Claude delegate to this agent? What user messages activate it? 4. Proactive vs reactive — Should it fire automatically after events (e.g., after code is written), or only on explicit request?
Capabilities:
5. Tool access — What tools are actually needed? Least-privilege: an analysis agent doesn't need Write.
6. Memory — Should this agent learn across sessions? (e.g., accumulate codebase patterns, recurring issues, architectural decisions.) If yes, choose scope: project (recommended default, shareable via VCS), user (global across projects), or local (project-specific, not in VCS).
7. MCP servers — Does it need external tools (browser, database, API) not in the parent session?
Execution:
8. Session mode — Will this run as a subagent (delegated by Claude) or as the main session agent (claude --agent <name>)? Session agents need broader tool access, more self-contained prompts, and may use initialPrompt to self-start.
9. Background execution — Should it run concurrently while the user continues? Background agents auto-deny unpre-approved permissions and cannot ask clarifying questions.
10. Context isolation — Does it generate heavy output or modify files? Should it run in a worktree (isolation: worktree)?
11. Effort level — Does it need deep reasoning (high/max) or is it a fast classification task (low)?
If $ARGUMENTS is empty or insufficient, use AskUserQuestion to gather domain, trigger conditions, and proactive intent before proceeding. Proceed to Phase 1 once these are established.
Apply throughout: second-person for system prompt body, intensional over extensional reasoning, minimum viable frontmatter.
Naming rules (enforced by validate_agent.py):
helper, assistant, agentGood: code-reviewer, test-generator, api-docs-writer
Bad: ag (too short), -start (leading hyphen), my_agent (underscore)
Read ${CLAUDE_PLUGIN_ROOT}/skills/create-agent/references/agent-frontmatter.md for the full
field catalog, color semantics, model options, tool selection framework, and execution modifiers.
Required: name, description
Always set: model: inherit (unless specific model capability needed), color (visual ID in UI)
Intensional rule for tools: Restrict to the minimum needed because agents run autonomously —
over-permission has no human in the loop to catch it. ["Read", "Grep", "Glob"] for analysis.
Add Write for generation. Add Bash only when shell execution is essential, never by default.
For session-mode agents that orchestrate subagents, use Agent(type1, type2) to scope spawning.
Set if applicable from Phase 0:
memory — if cross-session learning was identified; add memory maintenance instructions to bodyeffort — if the task warrants non-default thinking depthinitialPrompt — if this is a session agent that should self-startbackground: true — if concurrent execution was identifiedmcpServers — if external tools were identifiedThe description field is loaded into context every session. Token budget matters — write the minimum needed for accurate routing.
Use a > folded scalar with:
<example> blocks — they waste context without improving routing.The markdown body (after ---) becomes the agent's system prompt. Write entirely in second person,
addressing the agent directly. This is the critical authoring difference from skills: agents need
a persona and process, not instructions for Claude to follow.
Standard structure:
You are [role] specializing in [domain].
**Your Core Responsibilities:**
1. [Primary responsibility]
2. [Secondary responsibility]
**Process:**
1. [Step — imperative]
2. [Next step]
**Quality Standards:**
- [Standard]
**Output Format:**
[Structure and content of what to return]
**Edge Cases:**
- [Situation]: [How to handle]
Intensional rules for the system prompt:
If memory is set: Include a section instructing the agent to maintain its knowledge base:
"Update your agent memory as you discover codepaths, patterns, and key architectural decisions.
Consult your memory before starting work." This enables cross-session learning.
Keep under 3,000 words. Detailed domain reference belongs in references/ preloaded via the
skills: frontmatter field, not embedded directly in the system prompt.
See ${CLAUDE_PLUGIN_ROOT}/skills/create-agent/examples/proactive-code-reviewer.md for a
complete working example demonstrating the proactive trigger pattern.
Read ${CLAUDE_PLUGIN_ROOT}/skills/create-agent/references/script-patterns.md and apply the
five signal patterns to every step in the agent's system prompt:
| Signal | Question | If yes → |
|---|---|---|
| Repeated Generation | Does any step produce the same structure across invocations? | Parameterized script in scripts/ |
| Unclear Tool Choice | Does any step combine tools in a fragile sequence? | Script the procedure |
| Rigid Contract | Can you write --help text for this step right now? | CLI candidate |
| Dual-Use Potential | Would a user run this step from the terminal independently? | Design as proper CLI |
| Consistency Critical | Must this step produce identical output for identical inputs? | Script — never LLM generation |
Scan existing agents and skills before finalizing:
Glob: .claude/agents/*.md, ~/.claude/agents/*.md (project + global agents)
Glob: .claude/skills/*/SKILL.md, ~/.claude/skills/*/SKILL.md (project + global skills)
skills: frontmatter for domain knowledge?Always use fully qualified names:
Agent: subagent_type=plugin-dev:agent-creator (not just "agent-creator")Skill: claude-skills:create-skill (not just "create-skill")When creating a new agent file:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/create-agent/scripts/validate_agent.py <agent-file> --output json
Exit 0 = proceed to Phase 2. Exit 1 = parse the errors array; each entry has field, message,
severity. Resolve all critical and major items before writing to disk.
| Scope | Location |
|---|---|
| User agent (global) | ~/.claude/agents/<name>.md |
| Project agent | .claude/agents/<name>.md |
| Plugin agent | <plugin-root>/agents/<name>.md |
Agents in agents/ are auto-discovered — no registration needed. Plugin agents are namespaced
automatically as plugin-name:agent-name.
When creating from scratch:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/create-agent/scripts/init_agent.py <name> --path <agents-dir>
Exit 0 = file created with placeholders, proceed to fill content. Exit 1 = naming collision; ask user to rename or confirm overwrite.
Present the generated agent with brief rationale:
model: sonnet because this agent performs complex multi-file reasoning"isolation unset; no git state management needed"Before writing:
Writing to: [path]
This will [create new / overwrite existing] file.
Proceed?
Summarize:
Proceed to Phase 3.
| Dimension | Criteria |
|---|---|
| Clarity (0-10) | System prompt unambiguous, objective and persona clear |
| Trigger Precision (0-10) | Description + examples cover intended trigger space, not broader |
| Efficiency (0-10) | System prompt token economy — maximum guidance per token |
| Completeness (0-10) | Covers domain requirements; output format defined; edge cases addressed |
| Safety (0-10) | Tools restricted to minimum needed; no runaway permission grants |
Target: 9.0/10.0. If below, refine once addressing the weakest dimension, then deliver.
Phase 3 is complete when score ≥ 9.0 or one refinement pass has run. Deliver: agent file path, key trigger conditions, tools granted and why.
Structure:
<name>.md in an agents/ directoryname and descriptionDescription Quality:
> scalar, 50-70 tokens, no <example> blocksSystem Prompt Quality:
Frontmatter:
model: inherit unless specific model neededcolor set and semantically meaningfultools restricted to minimum neededmemory set if cross-session learning identified, with maintenance instructions in bodyeffort set if non-default thinking depth neededinitialPrompt set if session-mode agent that self-startsbackground: true set if concurrent execution identifiedisolation: worktree set if agent modifies files that need review before merging| Issue | Action |
|---|---|
| Unclear domain | Ask: what does success look like for this agent? |
| Scope too broad | Split into 2–3 focused agents with non-overlapping trigger conditions |
| Conflicts with existing agent | Note overlap; narrow triggering scope or extend the existing one |
| Vague trigger conditions | Ask for 3 concrete user messages that should activate this agent |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub gupsammy/claudest --plugin claude-skills6 skills in this plugin
/create-cliThis skill should be used when the user asks to "design a CLI", "help me design command-line flags", "what flags should my tool have", "create a CLI spec", "refactor my CLI interface", "design a CLI my agent can call", or wants to design command-line UX (args/flags/subcommands/help/output/errors/config) before implementation or audit an existing CLI surface for consistency and composability.
/create-skillThis skill should be used when the user asks to "create a skill" or "make a command". Make sure to use this skill whenever the user mentions skill creation, command authoring, slash commands, or building Claude extensions — even if they don't explicitly say "create-skill". Not for repairing or auditing existing skills — use repair-skill.
/improve-skillThis skill should be used when the user asks to "improve a skill", "make this skill better", "add features to a skill", "this skill is missing something", "upgrade my skill", "what's missing from this skill", "the skill doesn't do X", "make this more useful", or wants to improve skill effectiveness rather than structural correctness. Not for structural fixes — use repair-skill. Not for agents.
/repair-agentThis skill should be used when the user asks to "repair an agent", "audit an agent", "fix my agent", "review agent quality", "check if my agent is well-written", "diagnose agent problems", "what's wrong with this agent", "improve this agent", or "what's wrong with this agent file". Not for skills — use repair-skill.
/repair-skillThis skill should be used when the user asks to "fix my skill" or "audit this skill". Make sure to use this skill whenever the user mentions skill quality, structural issues, broken skills, or skill diagnostics — even if they don't explicitly say "repair-skill". Not for adding features or improving effectiveness — use improve-skill. Not for agents — use repair-agent.
Other plugins' skills for the same job