When you find yourself repeating the same complex prompts, or need a reusable unit of work within an agentic workflow, it's time to consider building a custom agent.
A custom agent is a reusable, task-specific agent designed to integrate into agentic workflows. Think of custom agents like functions in programming - they encapsulate specific capabilities that can be called when needed.
Key characteristics of custom agents:
For example, Claude Code uses custom agents like Explore (for codebase exploration), Plan (for designing implementation approaches), and Bash (for command execution). Each has a narrow focus and specific toolset.
Like functions in code, custom agents help you avoid repeating yourself. Consider building one when:
User: Create an implementation plan for the user authentication feature. Break it down into actionable tasks with clear steps, dependencies, and acceptance criteria. Include considerations for testing and deployment. Output as a structured markdown document.
Agent: ✅ Created authentication-implementation-plan.md
User: Create an implementation plan for the payment integration. Break it down into actionable tasks with clear steps, dependencies, and acceptance criteria. Include considerations for testing and deployment. Output as a structured markdown document.
Agent: ✅ Created payment-implementation-plan.md
User: Create an implementation plan for the notification system. Break it down into actionable tasks with clear steps, dependencies, and acceptance criteria. Include considerations for testing and deployment. Output as a structured markdown document.
Agent: ✅ Created notification-implementation-plan.md
❌ Figure: Bad example - The user repeats the same detailed instructions for every planning task, which is error-prone and tedious
---name: implementation-plannerdescription: Creates detailed implementation plans and technicalspecifications in markdown formattools: ["read", "search", "edit"]---You are a technical planning specialist focused on creating comprehensiveimplementation plans. Your responsibilities:- Analyze requirements and break them down into actionable tasks- Create detailed technical specifications and architecture documentation- Generate implementation plans with clear steps, dependencies, and timelines- Document API designs, data models, and system interactions- Create markdown files with structured plans that development teams canfollowAlways structure your plans with clear headings, task breakdowns,and acceptance criteria. Include considerations for testing,deployment, and potential risks. Focus on creating thorough documentationrather than implementing code.
✅ Figure: Good example - A custom agent definition with specialized scope, defined tools, and clear instructions