
Create Agent
Scaffold Claude Code Task agents with YAML frontmatter, triggering examples, and system prompts instead of hand-writing `agents/*.md` files.
Overview
Create Agent is an agent skill for the Build phase that guides you through authoring Claude Code Task agents with frontmatter, trigger examples, and validated system prompts under `agents/*.md`.
Install
npx skills add https://github.com/neolabhq/context-engineering-kit --skill create-agentWhat is this skill?
- Contrasts agents (Task subprocess, isolated context) vs commands (`/name`, shared conversation)
- Documents required agent file shape: YAML frontmatter plus markdown system prompt
- Covers triggering conditions with concrete `<example>` blocks Claude uses for routing
- Aligns structure and validation with Anthropic agent guidance and proven repo patterns
- Allowed tooling: Read, Write, Glob, Grep, Bash(mkdir:*), and Task for spawn workflows
- Documents agents vs commands comparison across trigger, purpose, context, and file format
Adoption & trust: 515 installs on skills.sh; 1.1k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need autonomous multi-step helpers in Claude Code but only have ad-hoc prompts or command files that share context and lack reliable Task triggers.
Who is it for?
Indie developers standardizing Claude Code agent libraries in a monorepo or context-engineering kit alongside commands and skills.
Skip if: Builders who only need one-shot slash commands or who are not using Claude Code’s Task tool and `agents/*.md` layout.
When should I use this skill?
User wants to create or refactor a Claude Code autonomous agent with proper `agents/*.md` structure, triggers, and validation.
What do I get? / Deliverables
You end up with a properly structured agent file Claude can spawn via Task, with clear triggering examples and a system prompt ready to drop into version control.
- New or updated `agents/<name>.md` with frontmatter and system prompt
- Triggering `<example>` blocks embedded in the agent description
Recommended Skills
Journey fit
Agent definitions are core build-time agent tooling for Claude Code, separate from slash commands and shared context kits. Fits agent-tooling because it produces autonomous subprocess agents under `agents/*.md`, not application backend or frontend code.
How it compares
Use this for Task-spawned agents with isolated context—not for user-invoked slash commands in `commands/*.md`.
Common Questions / FAQ
Who is create-agent for?
Solo and indie builders using Claude Code who want documented, reusable autonomous agents—not informal chat sub-personas.
When should I use create-agent?
During Build → agent-tooling when adding a new domain agent, splitting a heavy workflow out of the main session, or aligning agent files with Anthropic structure before teammates rely on them.
Is create-agent safe to install?
Review the Security Audits panel on this Prism page for the upstream repo; the skill can Write files and run mkdir via Bash, so scope it to trusted projects.
SKILL.md
READMESKILL.md - Create Agent
# Create Agent Command Create autonomous Claude Code agents that handle complex, multi-step tasks independently. This command provides comprehensive guidance based on official Anthropic documentation and proven patterns. ## User Input ```text Agent Name: $1 Description: $2 ``` ## What Are Agents? Agents are **autonomous subprocesses** spawned via the Task tool that: - Handle complex, multi-step tasks independently - Have their own isolated context window - Return results to the parent conversation - Can be specialized for specific domains | Concept | Agent | Command | |---------|-------|---------| | **Trigger** | Claude decides based on description | User invokes with `/name` | | **Purpose** | Autonomous work | User-initiated actions | | **Context** | Isolated subprocess | Shared conversation | | **File format** | `agents/*.md` | `commands/*.md` | ## Agent File Structure Agents use a unique format combining **YAML frontmatter** with a **markdown system prompt**: ```markdown --- name: agent-identifier description: Use this agent when [triggering conditions]. Examples: <example> Context: [Situation description] user: "[User request]" assistant: "[How assistant should respond and use this agent]" <commentary> [Why this agent should be triggered] </commentary> </example> <example> [Additional example...] </example> model: inherit color: blue tools: ["Read", "Write", "Grep"] --- You are [agent role description]... **Your Core Responsibilities:** 1. [Responsibility 1] 2. [Responsibility 2] **Analysis Process:** [Step-by-step workflow] **Output Format:** [What to return] ``` ## Frontmatter Fields Reference ### Required Fields #### `name` (Required) **Format**: Lowercase with hyphens only **Length**: 3-50 characters **Rules**: - Must start and end with alphanumeric character - Only lowercase letters, numbers, and hyphens - No underscores, spaces, or special characters | Valid | Invalid | Reason | |-------|---------|--------| | `code-reviewer` | `helper` | Too generic | | `test-generator` | `-agent-` | Starts/ends with hyphen | | `api-docs-writer` | `my_agent` | Underscores not allowed | | `security-analyzer` | `ag` | Too short (<3 chars) | | `pr-quality-reviewer` | `MyAgent` | Uppercase not allowed | #### `description` (Required, Critical) **The most important field** - Defines when Claude triggers the agent. **Requirements**: - Length: 10-5,000 characters (ideal: 200-1,000 with 2-4 examples) - **MUST start with**: "Use this agent when..." - **MUST include**: `<example>` blocks showing usage patterns - Each example needs: context, user request, assistant response, commentary **Example Block Format**: ```markdown <example> Context: [Describe the situation - what led to this interaction] user: "[Exact user message or request]" assistant: "[How Claude should respond before triggering]" <commentary> [Explanation of why this agent should be triggered in this scenario] </commentary> assistant: "[How Claude triggers the agent - 'I'll use the [agent-name] agent...']" </example> ``` **Best Practices for Descriptions**: - Include 2-4 concrete examples - Show both proactive and reactive triggering scenarios - Cover different phrasings of the same intent - Explain reasoning in commentary - Be specific about when NOT to use the agent #### `model` (Required) **Values**: `inherit`, `sonnet`, `opus`, `haiku` **Default**: `inherit` (recommended) | Value | Use Case | Cost | |-------|----------|------| | `inherit` | Use parent conversation model | Default | | `haiku` | Fast, simple tasks | Lowest | | `sonnet` | Balanced performance | Medium | | `opus` | Maximum