Your general-purpose AI assistant is trying to do too much.
When you ask for help creating UI components, you get generic advice. When you need database optimization, you get something that works but misses the performance tricks an expert would catch.
Instead of one overworked AI, you can build specialized sub agents that actually know their stuff.
Here are the three methods I personally use to build agents that actually work.
Start with Claude Code docs
When I'm new to sub agents, I start with the Claude Code documentation. There's one example agent, but more importantly, there's the file format reference that shows you exactly how to structure your agents.
The example is general-purpose, but it teaches you the fundamentals: how to write effective descriptions, which tools to grant, and how to structure system prompts. I use the file format as a template, then customize for my specific needs.
Search with grep.app
This is where I find the real gold. I use grep.app to search GitHub for .claude/agents/
and see how actual developers structure their agents in production. You'd be surprised how many people are sharing their agent configurations publicly.
I search for specific patterns like:
.claude/agents/
to find agent directoriesfrontend-expert
orcode-reviewer
to see naming conventions- System prompts that match my domain needs
This method lets me steal proven configurations from developers who've already solved similar problems. Someone's always built the exact specialist I need, and grep.app helps me find their solution fast.
Use cursor.directory or similar
When I need battle-tested patterns, I visit cursor.directory or similar rule collections. These aren't random prompts - they're proven by thousands of developers across different tech stacks.
I grab rules for Next.js + TypeScript, Python FastAPI, or whatever I'm working with, then transform them into focused sub agents using this prompt:
From these cursor rules, create a frontend-expert sub agent with:
- Clear domain expertise
- Detailed system prompt with best practices
- Designed for proactive use
[Paste your cursor rules here]
I keep it simple - one agent at a time. Much cleaner results.
Creating Your Agent
Once I have examples from any of these methods, I run /agents
in Claude Code to create the actual agent. The interface makes it easy to:
- Generate with Claude first (let it create the initial structure)
- Customize the system prompt and tool permissions
- Save as project-level for team sharing
Within an hour using any of these methods, you've gone from a single overworked AI to a specialized development team. Each agent has deep expertise in their domain, proven patterns to work with, and the right tools for their job.
The tools are here today, the patterns are proven, and your specialized development team is just a few prompts away.