skills/agent-creator/SKILL.md
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.
npx skillsauth add agdev/claude-code agent-creatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Expert guidance for creating effective Claude Code agents following best practices.
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.
| 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:
Choose skills when:
Agents are Markdown files with YAML frontmatter stored in:
.claude/agents/ (highest priority)~/.claude/agents/ (all projects)---
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]
| 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 |
Create focused, single-responsibility agents:
The description field is the PRIMARY TRIGGERING MECHANISM. Include:
Pattern:
description: [Role/capability]. MUST BE USED for [specific scenarios]. [Additional context]. Examples: "[trigger phrase 1]", "[trigger phrase 2]"
Grant only necessary tools:
Performance impact:
Before creating, answer:
Write a comprehensive description:
Determine minimum tools needed:
Select based on task complexity:
haikusonnet or omit (default)opusStructure the prompt body:
# [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]
Add explicit boundaries if agent has limited scope:
## 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]
Solution: Start lightweight (<3k tokens, 3-5 tools), expand based on need
Solution: Specific triggers, scenarios, and examples
Solution: Minimal viable toolset per agent purpose
Solution: Explicit "YOUR ROLE ENDS HERE" section for bounded agents
Solution: Challenge each paragraph - "Does this justify its token cost?"
When an agent needs domain expertise, use skills:
---
name: specialized-agent
skills: domain-skill, helper-skill
---
When to create an accompanying skill:
Use the skill-creator skill to create accompanying skills:
Invoke skill: skill-creator
Before finalizing an agent:
---
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
references/prompt-patterns.md for advanced prompt engineering patternsskill-creator skill when agent needs accompanying skillsdevelopment
Expert guidance for writing clean, simple, and effective unit, integration, component, microservice, and API tests. Use this skill when reviewing existing tests for violations, writing new tests, or refactoring tests. NOT for end-to-end tests that span multiple processes - use testing-e2e skill instead. Covers AAA pattern, data factories, mocking strategies, DOM testing, database testing, and assertion best practices.
tools
Expert guidance for writing resilient end-to-end tests that span multiple processes and components. Use this skill when reviewing, writing, or refactoring system-wide e2e tests. Covers user-facing scenarios, helper functions, data factories, ARIA-based selectors, and auto-retriable assertions. NOT for unit/integration tests - use testing-unit-integration skill instead. See references/playwright-resilience.md for detailed selector patterns.
tools
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 Claude's capabilities with specialized knowledge, workflows, or tool integrations.
data-ai
Expert guidance for creating, updating, and maintaining CLAUDE.md memory files following best practices for hierarchical memory, structure, content organization, and team collaboration