A comprehensive guide to specialized agents in Claude Code - maximize your productivity with targeted AI assistance
Claude Code features powerful specialized subagents designed to handle specific types of development tasks. Each subagent is optimized for particular workflows and comes with specialized tools and knowledge domains.
Subagents in Claude Code provide specialized expertise for different aspects of software development. Instead of using a general-purpose agent for all tasks, you can leverage these focused agents to get better results for specific use cases.
- Specialized Knowledge: Each agent has domain-specific expertise
- Optimized Tools: Agents have access to tools most relevant to their specialty
- Better Context: Focused agents maintain context relevant to their domain
- Faster Results: Specialized agents can work more efficiently in their area
Specialized for building, modifying, and debugging frontend components, UI elements, styling, and user interface logic.
Expert in server-side development, APIs, databases, and system architecture.
Focused on API design, implementation, documentation, and integration.
Specialized in mobile application development for iOS and Android platforms.
Expert in Python development, frameworks, and ecosystem tools.
Specialized in JavaScript development, Node.js, and browser-based applications.
Expert in TypeScript development, type systems, and modern JavaScript patterns.
Specialized in PHP development, frameworks, and web application development.
Expert in WordPress development, themes, plugins, and customization.
Specialized in iOS application development using Swift and Objective-C.
Expert in database design, optimization, and data modeling.
Specialized in code review, quality assessment, and best practices enforcement.
Expert in debugging, troubleshooting, and problem resolution.
Specialized in creating comprehensive documentation for codebases.
Expert in code refactoring, optimization, and restructuring.
Specialized in security analysis, vulnerability assessment, and secure coding practices.
Expert in coding standards, style guides, and code consistency enforcement.
| Task Type | Recommended Subagent | Example Use Case |
|---|---|---|
| Building UI components | Frontend UI Expert | "Create a responsive navigation bar" |
| Code quality review | Production Validator | "Review this code for production readiness" |
| Writing documentation | Code Documentor | "Document this authentication module" |
| Complex research | General Purpose | "Find all API endpoints in this codebase" |
| Multi-step automation | General Purpose | "Set up CI/CD pipeline with testing" |
# Using Task tool to invoke subagents
/task description="Build user profile component" subagent_type="frontend-ui-expert"
/task description="Review code quality" subagent_type="production-validator"
/task description="Create API docs" subagent_type="code-documentor"
/task description="Research database schema" subagent_type="general-purpose"- Match Task to Expertise: Choose the subagent whose specialty aligns with your task
- Consider Tool Requirements: Some subagents have limited tool access by design
- Think About Context: Specialized agents maintain better focused context
- Use General Purpose for Complex Tasks: When tasks span multiple domains, use the general-purpose agent
- Be Specific: Provide clear, detailed task descriptions
- Set Clear Expectations: Specify what you want the subagent to deliver
- Provide Context: Include relevant background information
- Chain Subagents: Use multiple subagents in sequence for complex workflows
# Frontend Development Workflow
1. Frontend UI Expert: Build component
2. Production Validator: Review for production
3. Code Documentor: Create component documentation
# Code Review Workflow
1. Production Validator: Initial quality check
2. General Purpose: Complex analysis if needed
3. Code Documentor: Update documentation
# Research and Implementation
1. General Purpose: Research and planning
2. Specialized Agent: Implementation
3. Production Validator: Final reviewClaude Code allows you to chain subagents together for complex workflows:
- Sequential Processing: Use agents one after another
- Parallel Processing: Run multiple agents concurrently
- Conditional Logic: Choose agents based on task requirements
1. General Purpose: Research requirements and plan architecture
2. Frontend UI Expert: Build user interface components
3. Production Validator: Review code quality and security
4. Code Documentor: Create comprehensive documentation
1. Production Validator: Automated quality checks
2. General Purpose: Complex issue analysis (if needed)
3. Frontend UI Expert: UI-specific fixes (if applicable)
4. Code Documentor: Update documentation
- Identify Your Task Type: Determine which subagent is most appropriate
- Use the Task Tool: Invoke the subagent using Claude Code's Task tool
- Provide Clear Instructions: Be specific about what you want accomplished
- Review Results: Each subagent will provide a focused response
- Chain as Needed: Use multiple subagents for complex workflows
You can create sophisticated workflows by combining subagents with Claude Code's other features:
- Session Management: Maintain context across subagent invocations
- Tool Permissions: Configure specific tool access for security
- Output Formatting: Use structured output for automation
- Error Handling: Implement fallback patterns between subagents
- Use specialized subagents to reduce context switching
- Leverage parallel subagent execution when possible
- Cache common subagent results for repeated tasks
- Monitor subagent performance with Claude Code's cost tracking
For detailed information about each subagent, see the individual documentation files in the subagents/ directory.