Kasava
Back to Blog
Engineering

Complete Claude Code Best Practices Guide (Part 3): Specialized Agents

Ben Gregory-Sep 8, 2025

When we built our first specialized agent everything changed. We went from having one generalist AI assistant to having an entire team of specialists, each an expert in their domain.

Specialized Agents: Your Domain Experts

Commands are great for shortcuts, but agents are where the real magic happens. It's useful to think of these not as prompts but as personas with deep domain knowledge, tribal wisdom, and battle-tested patterns. They're not going to magically get smarter just because you tell them 'You're an expert in XYZ' but it does instruct this agent where to focus its attention and how to spend its context allocation. Being able to dedicate valuable context to specific technologies or patterns in a scoped subagent that can then return an answer to the main thread is incredibly powerful for getting higher quality results.

Below are the actual prompts for our agents to give you a sense of how we broadly break down problem areas and how we specify what the agent should pay attention to.

The Cloudflare Backend Architect

The Mastra Workflow Architect

This agent has prevented countless hours of debugging by understanding Mastra's nuances and Cloudflare's constraints together.

The Vector Search Architect

The Browser Extension Developer

This agent handles the complexity of modern browser extension development, from WXT framework patterns to Chrome API integration.

The Next.js Frontend Expert

This agent brings together the entire modern React ecosystem into one expert who understands how these technologies work together.

The Web Research Analyst

This agent transforms Claude from someone who can answer questions into someone who can conduct comprehensive research across the entire internet.

Pro Tips from the Trenches

  1. Start with your biggest pain point - We started with Cloudflare because we were struggling with Workers

  2. Iterate based on actual usage - Our agents evolved from real conversations with Claude

  3. Use web research for new designs - When designing something new or advising on architectural changes, instruct your agents to research current best practices, recent developments, and community recommendations. This ensures your solutions incorporate the latest patterns and avoid known pitfalls.

  4. Give agents memory - Reference previous decisions and patterns in your codebase

  5. Make them opinionated - Agents should have strong opinions based on your team's experience

  6. Update them regularly - As your codebase evolves, so should your agents

The Bottom Line

Specialized agents transformed Claude from a coding assistant into a team of experts. Each agent is a domain specialist, armed with your team's specific patterns, practices, and hard-won wisdom.
The real magic isn't in having AI write code - it's in having AI that thinks like your best engineers, understands your constraints, and applies your team's collective knowledge to every problem.
Start with one agent for your most complex domain. Watch as your entire development process transforms from reactive problem-solving to proactive expertise application.

———

This is part 3 of a 3-part series on Claude Code best practices. From CLAUDE.md structure to specialized agents, these patterns transformed how we build software at [Kasava](_https://kasava.dev)_