agent-creator
/agent-creator
Expert guidance for creating effective Claude Code agents (subagents). Use when users want to create a new agent, update an existing agent, or learn agent design best practices. Covers agent architecture, prompt engineering, tool selection, model choice, and common pitfalls. Integrates with skill-creator when agent needs accompanying skills.
- Author
- agdev ↗
- Repository
- claude-code ↗
- Licence
- MIT
- Last repository change
- 26.10.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Expert guidance for creating effective Claude Code agents (subagents). Use when users want to create a new agent, update an existing agent, or learn agent design best practices. Covers agent architecture, prompt engineering, tool selection, model choice, and common pitfalls. Integrates with skill-creator when agent needs accompanying skills.
Original author description
Expert guidance for creating effective Claude Code agents (subagents). Use when users want to create a new agent, update an existing agent, or learn agent design best practices. Covers agent architecture, prompt engineering, tool selection, model choice, and common pitfalls. Integrates with skill-creator when agent needs accompanying skills.
How it works
- About Agents
- Agent Architecture
- Core Principles
- Agent Creation Process
- Prompt Engineering Best Practices
- Common Pitfalls to Avoid
- Integration with Skills
- Quality Checklist
- Example: Well-Designed Agent
- Resources
SKILL.md preview
--- name: agent-creator description: Expert guidance for creating effective Claude Code agents (subagents). Use when users want to create a new agent, update an existing agent, or learn agent design best practices. Covers agent architecture, prompt engineering, tool selection, model choice, and common pitfalls. Integrates with skill-creator when agent needs accompanying skills. --- # Agent Creator Expert guidance for creating effective Claude Code agents following best practices. ## About Agents Agents are specialized subprocesses that handle complex tasks autonomously with **isolated context windows**. They extend Claude's capabilities by providing focused expertise, specific tool access, and appropriate model selection for different task types. ### Agents vs Skills | Aspect | Agents | Skills | |--------|--------|--------| | **Context** | Isolated context window | Shared with main conversation | | **Purpose** | Autonomous task execution | Procedural knowledge & guidance | | **Model** | Can specify different model | Uses current model | | **Tools** | Can restrict/expand tool access | Uses available tools | | **Use when** | Task needs isolation, different capabilities, or parallel execution | Task benefits from guidance staying in current context | **Choose agents when:** - Task benefits from isolated context (clean slate) - Different model is optimal (haiku for speed, opus for reasoning) - Tool access should be restricted for security - Tasks can run in parallel **Choose skills when:** - Knowledge should stay in current conversation - Guidance benefits from seeing full context - No special tool/model requirements ## Agent Architecture ### File Structure Agents are Markdown files with YAML frontmatter stored in: - **Project agents**: `.claude/agents/` (highest priority) - **User agents**: `~/.claude/agents/` (all projects) ### Configuration Format ```yaml --- name: agent-identifier # Required: lowercase, hyphens only description: When and why... # Required: PRIMARY TRIGGER MECHANISM tools: Tool1, Tool2, Tool3 # Optional: restrict/specify tools model: sonnet # Optional: sonnet, opus, haiku skills: skill1, skill2 # Optional: auto-load skills color: blue # Optional: UI indicator --- [Agent system prompt here - Markdown instructions] ``` ### Configuration Fields | Field | Required | Details | |-------|----------|---------| | `name` | Yes | Lowercase letters and hyphens only (e.g., `code-reviewer`) | | `description` | Yes | **PRIMARY TRIGGERING MECHANISM** - determines when agent is invoked | | `tools` | No | Comma-separated list; omit to inherit all tools | | `model` | No | `haiku` (fast), `sonnet` (balanced), `opus` (reasoning) | | `skills` | No | Skills to auto-load when agent invokes | | `color` | No | UI color indicator | ## Core Principles ### 1. Single-Purpose Focus Create focused, single-responsibility agents: - One clear job per agent - Better composability and predictability - Easier to debug and maintain ### 2. Description is Everything The `description` field is the **PRIMARY TRIGGERING MECHANISM**. Include: - WHAT the agent does - WHEN to use it (trigger scenarios) - Specific examples in angle brackets **Pattern:** ```yaml description: [Role/capability]. MUST BE USED for [specific scenarios]. [Additional context]. Examples: "[trigger phrase 1]", "[trigger phrase 2]" ``` ### 3. Minimal Viable Toolset Grant only necessary tools: - **Read-only agents**: Glob, Grep, Read, LS - **Analysis agents**: Add WebFetch, WebSearch - **Planning agents**: Add Write, Edit, TodoWrite - **Implementation agents**: Add Bash, Task **Performance impact:** - 3-5 tools: ~2-5k tokens - 7-8 tools: ~7-10k tokens - 15+ tools: 15-25k tokens (avoid) ### 4. Appropriate Model Selection - **Haiku**: Fast, lightweight tasks (exploration, simple analysis) - **Sonnet**: Balanced tasks (orchestration, validation, general work) - **Opus**: Complex reasoning (planning, architecture, research) ## Agent Creation Process ### Step 1: Define Purpose Before creating, answer: 1. What specific problem does this agent solve? 2. When should Claude automatically invoke this agent? 3. What makes this different from existing agents? 4. Does this need isolation, or would a skill suffice? ### Step 2: Design Description Write a comprehensive description: 1. Start with role/capability statement 2. Add "MUST BE USED" or "use PROACTIVELY" for strong triggers 3. Include specific scenarios and trigger phrases 4. Add examples using XML tags for complex scenarios ### Step 3: Select Tools Determine minimum tools needed: 1. List all operations the agent must perform 2. Map operations to specific tools 3. Remove any tools not strictly necessary 4. Consider security implications ### Step 4: Choose Model Select based on task complexity: - Simple/fast tasks → `haiku` - Standard tasks → `sonnet` or omit (default) - Complex reasoning → `opus` ### Step 5: Write System Prompt Structure the prompt body: ```markdown # [Role Title] [One-sentence mission statement] ## Core Principles - [Principle 1]: [Brief explanation] - [Principle 2]: [Brief explanation] ## Responsibilities / Methodology 1. [Step/responsibility 1] 2. [Step/responsibility 2] ## [Workflow/Process] (if multi-step) ### Step 1: [Name] [Instructions] ## Quality Standards / Output Format [Checklists, criteria, format requirements] ## Constraints (if critical) - [What agent MUST NOT do] - [Boundaries and limitations] ``` ### Step 6: Define Boundaries Add explicit boundaries if agent has limited scope: ```markdown ## YOUR ROLE ENDS HERE **CRITICAL BOUNDARY**: You are strictly a [role]. Once you have [completed work]: - Your work is COMPLETE - DO NOT [prohibited action 1] - DO NOT [prohibited action 2] ``` ## Prompt Engineering Best Practices ### Use Imperative Form - "Identify issues" not "You should identify" - "Generate report" not "The report should be generated" ### Strong Emphasis Markers - **MUST**, **NEVER**, **ALWAYS**, **CRITICAL** for non-negotiables - Bold or capitalize critical constraints - Use strategically, not everywhere ### Include Examples - Good vs Bad examples (Use checkmarks/X marks) - Concrete user scenarios - Before/after for transformations ### Be Specific, Not Vague - "Test min/max values, zero, negative" not "test edge cases" - "Check for SQL injection, XSS, path traversal" not "check security" - Include decision criteria and thresholds ## Common Pitfalls to Avoid ### Over-Engineering - Creating 15+ tool agents with 30k token prompts - One mega-agent instead of composable focused agents - Adding features "just in case" **Solution:** Start lightweight (<3k tokens, 3-5 tools), expand based on need ### Vague Descriptions - "Helps with coding" - too generic - Missing "when to use" information - No concrete trigger examples **Solution:** Specific triggers, scenarios, and examples ### Tool Overload - Giving all tools "just in case" - Read-only agents with Write/Bash access - Security risk and performance hit **Solution:** Minimal viable toolset per agent purpose ### Missing Boundaries - Agent scope creeps during execution - No clear "done" criteria - Agent attempts tasks outside its role **Solution:** Explicit "YOUR ROLE ENDS HERE" section for bounded agents ### Ignoring Token Budget - Verbose explanations Claude already knows - Repeated information - Unnecessary examples **Solution:** Challenge each paragraph - "Does this justify its token cost?" ## Integration with Skills When an agent needs domain expertise, use skills: ```yaml --- name: specialized-agent skills: domain-skill, helper-skill --- ``` **When to create an accompanying skill:** - Agent needs substantial domain knowledge - Knowledge is reusable across multiple agents - Information would bloat agent prompt **Use the skill-creator skill** to create accompanying skills: ``` Invoke skill: skill-creator ``` ## Quality Checklist Before finalizing an agent: - [ ] **Name**: Lowercase with hyphens, descriptive - [ ] **Description**: Includes WHAT, WHEN, and examples - [ ] **Tools**: Minimal viable set for the task - [ ] **Model**: Appropriate for task complexity - [ ] **Prompt**: Follows structure (role → principles → methodology → standards) - [ ] **Boundaries**: Clear scope and "done" criteria (if bounded) - [ ] **Token efficiency**: <5k words for most agents - [ ] **Examples**: Concrete scenarios in description or prompt - [ ] **No overlap**: Doesn't duplicate existing agent functionality ## Example: Well-Designed Agent ```yaml --- name: code-reviewer description: Expert code review specialist. MUST BE USED when reviewing pull requests, code changes, or architecture decisions. Focuses on security, performance, maintainability, and best practices. Examples: "Review this PR", "Check this implementation for issues", "Review the changes in feature branch" tools: Glob, Grep, Read, LS, WebSearch model: sonnet color: yellow --- # Code Review Specialist You are an expert code reviewer focused on identifying issues that impact security, performance, and maintainability. ## Review Priorities 1. **Security**: Injection vulnerabilities, auth issues, data exposure 2. **Performance**: O(n²) operations, memory leaks, unnecessary computation 3. **Maintainability**: Code clarity, naming, separation of concerns 4. **Best Practices**: Framework conventions, error handling, testing ## Review Process 1. Understand the change context (what problem is being solved) 2. Review for security vulnerabilities first 3. Check performance implications 4. Assess code quality and maintainability 5. Verify test coverage ## Output Format For each issue found: - **Severity**: Critical/High/Medium/Low - **Location**: file:line - **Issue**: Clear description - **Recommendation**: Specific fix suggestion ## YOUR ROLE ENDS HERE You are strictly a reviewer. After completing review: - Your work is COMPLETE - DO NOT implement fixes - DO NOT modify code ``` ## Resources - See `references/prompt-patterns.md` for advanced prompt engineering patterns - Use `skill-creator` skill when agent needs accompanying skills
Files in this package (2)
- SKILL.md 10 KB
- references/prompt-patterns.md 7 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · agdev/claude-code | 100 | MIT |
| jeremylongshore/tons-of-skills-marketplace | 100 | MIT |
| Navinspire-ia/navin | 100 | AGPL-3.0 |
| hotovo/aider-desk | 100 | Apache-2.0 |
| OpenHands/extensions | 100 | MIT |
| openjiuwen-ai/jiuwenswarm | 100 | Apache-2.0 |
| krzysztofsurdy/code-virtuoso | 100 | MIT |
| mhylle/claude-skills-collection | 100 | MIT |
| fusengine/agents | 100 | MIT |
Database snapshot: 13.11.2026 · package version 4c16458c3ba3 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 91agent-builder
Use when creating, improving, or troubleshooting Claude Code subagents. Expert guidance on agent design, system prompts, tool access, model selection, and best practices for building specialized AI assistants. - 100create-agent-skills
Expert guidance for creating, writing, building, and refining Claude Code Skills. Use when working with SKILL.md files, authoring new skills, improving existing skills, or understanding skill structure and best practices. - 100skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends the AI agent's capabilities with specialized knowledge, workflows, or tool integrations. Compatible with both Claude Code and OpenCode. - 95creating-claude-agents
Use when creating or improving Claude Code agents. Expert guidance on agent file structure, frontmatter, persona definition, tool access, model selection, and validation against schema. - 100skill-creator
Guide for creating effective skills that extend DAIV agent with specialized knowledge, workflows, or tool integrations. Use this skill when the user wants to create a new skill, update an existing skill, or get guidance on skill design patterns. - 100create-agent-skills
Expert guidance for creating Claude Code skills and slash commands. Use when working with SKILL.md files, authoring new skills, improving existing skills, creating slash commands, or understanding skill structure and best practices.