Guide for creating custom agents for Claude Code. Use when creating specialized agents, configuring agent tools.
Creates custom agents with specialized tools and behaviors for specific workflows.
npx claudepluginhub vinnie357/claude-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
templates/basic-agent.mdtemplates/full-access-agent.mdtemplates/mcp-agent.mdtemplates/read-only-analyzer.mdtemplates/write-capable-agent.mdGuide for creating custom agents that provide specialized behaviors and tool access for specific tasks.
Activate this skill when:
Agents are specialized Claude instances with:
| Feature | Agents | Skills |
|---|---|---|
| Activation | Explicitly launched via Task tool | Auto-activated based on context |
| Tool Access | Configurable, can be restricted | Inherit from parent context |
| State | Independent, isolated | Share parent context |
| Use Case | Complex multi-step tasks | Knowledge and guidelines |
| Persistence | Single execution | Always available when loaded |
Agents are defined in markdown files located in:
<plugin-root>/agents/.claude/agents/code-reviewer.md---
name: code-reviewer
description: Reviews code for quality and best practices
tools: Read, Grep, Glob
model: sonnet
---
You are a code reviewer. Analyze code for quality, security, and best practices.
## Workflow
1. **Find files**: Glob to locate target files
2. **Read code**: Examine contents
3. **Check patterns**: Grep for anti-patterns
4. **Report**: Provide prioritized feedback
## Guidelines
- **Specific**: Reference file:line locations
- **Actionable**: Suggest concrete fixes
- **Prioritized**: Critical issues first
Effective agents use direct, imperative language:
Required and optional fields:
---
name: agent-name # Required: kebab-case identifier
description: Brief description # Required: What this agent does
tools: # Optional: Tool allowlist
- Read
- Write
- Bash
model: sonnet # Optional: Model to use (sonnet, opus, haiku)
max_iterations: 10 # Optional: Maximum task iterations
timeout: 300 # Optional: Timeout in seconds
---
Restrict agent to specific tools:
Example:
---
tools: Read, Grep, Glob
---
No tool restrictions (access to all tools):
---
# Omit tools field entirely
---
Choose appropriate model for the task:
---
model: haiku # Fast, cost-effective for simple tasks
# model: sonnet # Balanced (default)
# model: opus # Most capable for complex tasks
---
For security scans, code reviews, or audits. Restricted to Read, Grep, Glob.
See: templates/read-only-analyzer.md
For generating tests, documentation, or code. Includes Write tool.
See: templates/write-capable-agent.md
For refactoring, migrations, or complex modifications. Omit tools field entirely for no restrictions.
See: templates/full-access-agent.md
For browser automation, external APIs, or specialized MCP server tools. Mix core tools with MCP tools.
See: templates/mcp-agent.md
{
"agents": [
"./agents/code-reviewer.md",
"./agents/test-generator.md",
"./agents/security-analyzer.md"
]
}
{
"agents": "./agents"
}
Loads all .md files in agents/ directory.
Agents are launched via the Task tool:
# In parent Claude conversation
Task(
subagent_type="code-reviewer",
description="Review authentication module",
prompt="""
Review the authentication module for:
- Security vulnerabilities
- Error handling
- Input validation
- Best practices
"""
)
Each agent should have a specific, well-defined purpose:
---
name: migration-helper
description: Assists with database schema migrations
---
# Database Migration Agent
Specialized in creating and validating database migrations.
Only grant necessary tools:
---
# Analysis agent - read-only
tools: Read, Grep, Glob
---
---
# Implementation agent - can modify
tools: Read, Write, Edit, Glob, Grep
---
Match model to task complexity:
Set appropriate limits for task complexity:
---
max_iterations: 5 # Simple, focused task
# max_iterations: 20 # Complex, multi-step workflow
---
Provide explicit behavior guidelines:
# Testing Agent
## Mandatory Requirements
- Generate tests for ALL public methods
- Achieve minimum 80% code coverage
- Include edge cases and error scenarios
- Use project's testing framework conventions
## Constraints
- Do not modify source code
- Follow existing test file naming patterns
- Use appropriate assertions
Limit dangerous operations:
---
# Don't give Bash access to untrusted agents
tools:
- Read
- Write # Safer than arbitrary shell commands
---
Validate agent inputs:
# Deployment Agent
Before deploying:
1. Verify target environment is valid
2. Check deployment permissions
3. Validate configuration
4. Confirm destructive operations
Never hardcode:
For complete, production-ready agent templates:
templates/basic-agent.md - Official minimal exampletemplates/read-only-analyzer.md - Security analyzer patterntemplates/write-capable-agent.md - Test generator patterntemplates/full-access-agent.md - Refactoring pattern (no tool restrictions)templates/mcp-agent.md - Browser testing with MCP toolsTemplates directory:
templates/basic-agent.md - Official minimal exampletemplates/read-only-analyzer.md - Security analysis patterntemplates/write-capable-agent.md - Test generation patterntemplates/full-access-agent.md - Refactoring pattern (no tool restrictions)templates/mcp-agent.md - MCP tools pattern (browser automation)Documentation:
This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.
UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 9 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient. Integrations: shadcn/ui MCP for component search and examples.