Skip to main content

Custom Agent Tactics

Advanced tactics and strategies for maximizing the potential of Claude Code's custom agent system. This guide assumes you understand the fundamentals and focuses on sophisticated usage patterns, community building, and expert-level orchestration.


Agent Chaining & Combinations

Custom agents can be chained together to create sophisticated, reliable workflows:

First use the security-audit agent to identify vulnerabilities,
then use the fix-implementation agent to resolve them,
finally use the test-validation agent to verify the fixes

This approach is particularly powerful for non-coding domains where specialized expertise can be combined:

  • UX → SEO → Accessibility analysis pipeline
  • Frontend → Accessibility → UX development workflow
  • Dumb user → Smart user → UX designer evaluation pipeline
  • Research → Analysis → Documentation → Fact checker workflow
  • Planning → Implementation → Validation sequence

Effective Agent Combinations

Measure efficacy versus token usage for different combination strategies:

  • Minimum viable chain: 25,000 tokens for two-agent workflow
  • Parallel validation: Multiple agents reviewing same artifact
  • Sequential refinement: Output from one agent feeds into next
  • Multi-part integration: Breaking complex tasks into specialized concerns

Exploring Role Possibilities

The potential for custom agent roles is virtually limitless. Beyond basic specialists, consider experimenting with creative combinations:

Creative and Analytical Roles

  • Storytelling specialist, UX empathy mapper, devil's advocate reviewer
  • Pattern recognition analyst, edge case identifier, assumption challenger
  • Simplicity advocate, complexity reducer, clarity enhancer

Domain-Specific Expertise

  • Industry compliance checker, regulatory requirement validator
  • Cultural sensitivity reviewer, localization specialist, accessibility advocate
  • Performance benchmarker, scalability assessor, maintainability evaluator

Communication and Process Roles

  • Technical translator (complex → simple), documentation quality reviewer
  • Meeting facilitator, decision synthesizer, conflict resolver
  • Project risk assessor, timeline validator, resource optimizer

Experimental Combinations

  • Combine multiple perspectives: "Create agents to analyze this from: security + UX + performance perspectives"
  • Temporal analysis: "Review this as: past-experience validator + current-state assessor + future-scaling predictor"
  • Stakeholder simulation: "Evaluate from: end-user + developer + business-owner viewpoints"

Community Goal: Universal Discipline Coverage

I believe we should be endeavouring as a community to form as many diverse agents as possible to cover ALL disciplines. This includes:

Essential Specialists:

  • SEO Agent, Planning Agent, Noob friendly Agent, English Grammar Agent
  • Same style Agent, Layout Agent, Design not broken Agent, IP Agent
  • MCP tool focused agent, Final check agents

Unexplored Territories:

  • Patent search agent, Legal compliance reviewer, Ethics validator
  • Accessibility champion, Performance optimizer, Security hardening specialist
  • Documentation clarity enforcer, Code simplification advocate
  • User journey mapper, Conversion optimizer, A/B testing analyst

The key is continuous experimentation - try unconventional role combinations and measure their effectiveness. Each domain and project may benefit from unique specialist configurations that haven't been explored yet.


Advanced Usage Patterns

Situational Agent Activation

Use --append-system-prompt to provide additional steering for scenarios where specific agents must be invoked:

claude --append-system-prompt "Before any commit, MUST use code-review agent"

This can also be implemented more deterministically via hooks for automated workflow enforcement.

Multi-Chain Workflows

Design workflows where non-destructive analysis happens in parallel, then consolidate findings:

  1. Research Phase: 3-5 agents investigate different aspects
  2. Analysis Phase: Specialist agents process research findings
  3. Implementation Phase: Sequential agents handle implementation steps
  4. Validation Phase: Quality assurance agents verify results

Benchmarkability Strategy

Custom agents enable granular performance measurement:

  • Individual agents can be evaluated independently
  • Different inputs can test specific agent capabilities
  • Token efficiency can be measured per specialist
  • Agents can be tweaked independently instead of modifying master Claude.md

Advanced Considerations

Information Density vs. Hand-offs

Key Decision: How much information should you pack into a single agent versus creating specialized hand-offs?

Single Agent Approach:

  • Lower token cost (one 13k initialization)
  • Simpler workflow management
  • Risk of reduced specialization
  • Harder to benchmark individual capabilities

Specialized Hand-off Approach:

  • Higher token cost (multiple 13k initializations)
  • Better separation of concerns
  • Enhanced benchmarkability
  • More granular optimization opportunities

Embracing Weak Models

Explore heavily specialized weak model configurations that have been benchmarked for great performance with lighter models. This could dramatically reduce costs while maintaining quality for specific domains.


Concerns and Limitations

Server Capacity Issues

When servers are busy, multi-chained agent workflows become problematic due to token inefficiency. The 13k initialization cost per agent multiplies quickly, making simple tasks expensive during peak times.

Activation Reliability

Monitor how reliably Claude routes tasks to appropriate agents, especially when you have many custom agent options. Too many choices can reduce routing accuracy.

Token Efficiency Trade-offs

The minimum cost for agent chaining (25,000+ tokens) merits caution. Balance the sophistication of multi-agent workflows against token costs, especially for routine tasks.


Community Vision

The true potential of custom agents lies in collaborative development:

Agent Sharing Economy

  • Refine agents across multiple projects
  • Share battle-tested configurations
  • Build upon community expertise
  • Create domain-specific agent libraries

Quality Standards

  • Benchmark agent performance metrics
  • Document effective usage patterns
  • Establish best practices for different domains
  • Measure token efficiency vs. value delivered

Ecosystem Growth

Think of custom agents like Pokémon - collect diverse specialists, refine their capabilities, and combine them strategically. The goal is building a comprehensive ecosystem where any task can be handled by the appropriate specialist combination.

Community Collaboration Strategy

Sharing Mechanisms:

  • Standardized agent configuration templates
  • Performance benchmarking frameworks
  • Community repositories of battle-tested agents
  • Cross-project compatibility standards

Measurement and Iteration:

  • Token cost vs. value analysis
  • Reliability metrics for different domains
  • Effectiveness comparison across similar agents
  • Community feedback loops for continuous improvement

Collective Intelligence:

  • Domain expert networks contributing specialized agents
  • Peer review processes for agent quality
  • Collaborative debugging of agent behavior
  • Knowledge transfer through agent documentation

Expert-Level Tactics

Advanced Orchestration

Context Management:

  • Strategic agent selection to preserve main thread context
  • Intelligent consolidation of multi-agent findings
  • Context window optimization through agent delegation

Workflow Design:

  • Dependency mapping for sequential agent chains
  • Parallel processing optimization for independent tasks
  • Error handling and fallback strategies in agent chains

Performance Optimization:

  • Agent warm-up strategies for frequently used specialists
  • Batch processing techniques for similar tasks
  • Load balancing across different agent types
Advanced Strategy

Master the art of agent orchestration by treating custom agents as specialized team members. Design workflows that leverage their strengths while minimizing token costs through strategic sequencing and parallel processing.

See Also: Agent Engineering | Custom Agents | Split Role Sub-Agents | Hooks | Sanity Check