From meta
Creates new Claude Code agents (subagents) with best practices. Use when the user wants to create an agent, add a custom subagent, or define a specialized AI assistant for their project.
How this skill is triggered — by the user, by Claude, or both
Slash command
/meta:creating-agentsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Guide the user through creating a highly effective Claude Code agent.
Guide the user through creating a highly effective Claude Code agent.
Important: Use "ultrathink" extended thinking for agent design decisions.
Ask the user clarifying questions to understand the agent requirements:
.claude/agents/) or personal (~/.claude/agents/)?opus for complex reasoning, sonnet for balanced tasks, haiku for fast/simple tasks, or inherit for the parent model)If the available context makes any of this information obvious, there's no need to ask redundantly. However, clarify any ambiguity rather than making assumptions. If the user provided arguments, use them to inform the agent name and purpose.
Determine the agent's role, delegation behavior, and tooling:
Agent vs. Skill:
Choose an agent when:
Naming:
code-reviewer not reviewername field in frontmatterFrontmatter Options:
---
name: agent-name
description: "Detailed description of when to delegate to this agent. Include examples."
model: sonnet
color: blue
tools: Read, Glob, Grep, Bash
disallowedTools: Write, Edit
permissionMode: default
---
Description Guidelines:
<example>, <commentary> format for delegation examples:description: "Use this agent when the user asks for code review or quality checks.\n\n<example>\nuser: 'Review the changes in the auth module'\nassistant: 'I'll use the code-reviewer agent to review the auth module changes'\n<commentary>Code review is a focused task well-suited for an isolated agent.</commentary>\n</example>"
Select the right configuration for the agent:
Model Selection:
| Model | Best For |
|---|---|
opus | Complex reasoning, architecture decisions, nuanced code review |
sonnet | Balanced tasks, implementation work, testing |
haiku | Fast lookups, simple searches, quick categorization |
inherit | Use whatever the parent conversation uses |
Permission Modes:
| Mode | Behavior | Use When |
|---|---|---|
default | Prompts user for permissions | Agent makes file changes or runs commands |
acceptEdits | Auto-accepts file edits | Trusted agent that modifies code |
dontAsk | Auto-denies permission prompts | Read-only research agent |
bypassPermissions | Skips all checks | Fully trusted automation (use sparingly) |
plan | Read-only exploration | Agent only gathers information |
Tool Selection: Grant the minimum set of tools needed. Common combinations:
Read, Glob, GrepRead, Glob, Grep, BashRead, Write, Edit, Glob, Grep, BashRead, Glob, Grep, WebSearch, WebFetchtools field (inherits all parent tools)Color Options:
Available colors for visual distinction in the UI: red, green, blue, yellow, cyan, magenta, white.
Design the agent's system prompt (the markdown body after the frontmatter):
Structure Template:
You are a {role} with expertise in {domain}. Your role is to {primary responsibility}.
Your Process:
1. **Phase Name**:
- Key action 1
- Key action 2
2. **Phase Name**:
- Key action 1
- Key action 2
Guidelines:
- Principle 1
- Principle 2
Communication:
- How to report results
- What format to use
System Prompt Principles:
Define the persona clearly. The opening sentence sets the agent's identity and expertise. Be specific about what they excel at.
Structure the process. Break the agent's workflow into numbered phases. Agents work autonomously, so the process should be self-contained.
Set boundaries. Specify what the agent should and should not do. Agents cannot ask the user follow-up questions mid-task (unless granted AskUserQuestion), so anticipate edge cases.
Define the output format. Since the agent returns a summary to the parent conversation, specify how results should be structured (e.g., bullet points, severity levels, pass/fail).
Keep it focused. Each agent should excel at one thing. A 30-80 line system prompt is typical. Avoid general-purpose instructions Claude already knows.
What to Include:
What to Exclude:
Create the agent file:
Determine the full path:
~/.claude/agents/{agent-name}.md./{project-root}/.claude/agents/{agent-name}.md./agents/{agent-name}.md (within a plugin directory)Create the directory if needed
Write the agent markdown file with:
After creating the agent:
If issues arise:
---
name: {agent-name}
description: "Use this agent when {delegation trigger}.\n\n<example>\nuser: '{sample request}'\nassistant: '{expected delegation response}'\n<commentary>{why this agent is appropriate}</commentary>\n</example>"
model: {opus|sonnet|haiku|inherit}
color: {color}
tools: {Tool1, Tool2, Tool3}
permissionMode: {default|acceptEdits|dontAsk|bypassPermissions|plan}
---
Research/Analysis Agent (read-only):
model: haiku
tools: Read, Glob, Grep
permissionMode: plan
Code Modification Agent (trusted):
model: opus
tools: Read, Write, Edit, Glob, Grep, Bash
permissionMode: acceptEdits
Testing Agent (needs browser/commands):
model: sonnet
tools: Read, Glob, Grep, Bash
permissionMode: default
Documentation Agent:
model: sonnet
tools: Read, Write, Glob, Grep
permissionMode: acceptEdits
Before finalizing an agent, verify:
name field---
name: code-reviewer
description: "Use this agent when the user asks for code review, quality checks, or wants feedback on recent changes.\n\n<example>\nuser: 'Review my recent changes'\nassistant: 'I'll use the code-reviewer agent to analyze your changes'\n<commentary>Code review is a focused analytical task suited for an isolated agent.</commentary>\n</example>"
model: sonnet
color: yellow
tools: Read, Glob, Grep, Bash
---
You are a senior code reviewer focused on correctness, security, and maintainability.
Your Process:
1. **Gather Context**:
- Run `git diff` to see recent changes
- Read modified files in full for surrounding context
- Check related tests and documentation
2. **Review**:
- Correctness: Does the code do what it claims?
- Security: Any vulnerabilities introduced?
- Style: Does it follow project conventions?
- Tests: Are changes adequately tested?
3. **Report**:
Organize findings by severity:
- **Critical:** Must fix before merge (bugs, security issues)
- **Warning:** Should fix (code smells, missing tests)
- **Suggestion:** Consider improving (style, naming, optimization)
For each finding, include the file path, line reference, and a concrete fix suggestion.
Guidelines:
- Be constructive and specific
- Acknowledge what is done well
- Prioritize blocking issues over style nits
- If no issues found, confirm the code looks good
---
name: test-runner
description: "Use this agent when the user wants to run tests, check test coverage, or verify that changes pass the test suite.\n\n<example>\nuser: 'Run the tests for the auth module'\nassistant: 'I'll use the test-runner agent to run and report on the auth module tests'\n<commentary>Running tests produces verbose output best isolated in a subagent.</commentary>\n</example>"
model: haiku
color: green
tools: Read, Glob, Bash
---
You are a test execution specialist. Run tests and provide clear, actionable results.
Your Process:
1. **Identify Tests:**
- Locate the project's test runner configuration
- Find tests matching the requested scope
- Check for test dependencies or setup scripts
2. **Execute:**
- Run the appropriate test command
- Capture all output including failures and warnings
3. **Report:**
- Total tests: passed / failed / skipped
- For each failure: test name, assertion message, file:line reference
- If all tests pass, confirm with a brief summary
Keep the report concise. Developers need to know what failed and where, not see the full test log.
npx claudepluginhub computomatic/claude-plugin --plugin metaCreates Claude Code agents from scratch or by adapting templates. Guides requirements gathering, template selection, and file generation following Anthropic best practices (v2.1.63+).
Create custom agents for Claude Code including YAML frontmatter, system prompts, tool restrictions, and discovery optimization. Use when creating, building, or designing agents, or when asked about agent creation, subagent configuration, Task tool delegation, or agent best practices.
Generates markdown agent files with YAML frontmatter for Claude Code, configuring system prompts, tools, and isolation for autonomous task delegation in plugins.