multi-agent-patterns

A guide to coordinating multiple Claude Code agents on one larger task. It describes patterns such as splitting work by area, assigning specialist roles, and passing results through sequential stages.

In plain words
What is it for?
Parallel repository analysis, specialist teams for feature work, and staged workflows where each agent handles one part before the next stage begins.
Why use it?
It helps divide complex work into manageable parts while giving agents clear responsibilities and a way to combine their findings.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/daffy0208/ai-dev-standards/multi-agent-patterns
Clone the repo
git clone --depth 1 https://github.com/daffy0208/ai-dev-standards

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,484 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02484
Opus 5 $0.00000 $0.01242
Sonnet 5 $0.00000 $0.00497
Haiku 4.5 $0.00000 $0.00248

Measured 2d ago against content hash f68f44e3cd78, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

multi-agent-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/multi-agent-patterns.md · 513 lines

How it starts

The opening of the file, as written. The whole thing — 513 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Multi-Agent Patterns

Patterns for parallel execution and multi-agent coordination in Claude Code.


Overview

Multi-agent patterns enable complex tasks through agent coordination, parallelization, and specialization. This document provides practical patterns for multi-agent workflows.


Core Patterns

1. Divide and Conquer

Problem: Task too large for single agent Solution: Split into subtasks, assign to multiple agents, aggregate results

Example: Repository-wide analysis

Coordinator: Multi-Agent Architect
├── Agent 1: Analyze /frontend
├── Agent 2: Analyze /backend
├── Agent 3: Analyze /database
└── Agent 4: Analyze /tests

Aggregation: Combine findings into report

2. Specialist Team

Problem: Task requires diverse expertise Solution: Assemble team of specialized agents

Example: Feature implementation

Team:
├── UX Designer Agent → User experience
├── Visual Designer Agent → Visual design
├── Frontend Builder Agent → UI implementation
├── API Designer Agent → Backend API
├── Security Engineer Agent → Security review
└── Testing Strategist Agent → Test coverage

Coordinator: Multi-Agent Architect

3. Pipeline Processing

Problem: Sequential stages with large data Solution: Pipeline with buffer between stages

Example: Documentation generation

Stage 1: Explore Agent → Find all files
  ↓ [Buffer: File list]
Stage 2: Analysis Agents → Extract info (parallel)
  ↓ [Buffer: Structured data]
Stage 3: Writing Agent → Generate docs
  ↓ [Buffer: Draft docs]
Stage 4: Review Agent → Polish and format

4. Fan-Out/Fan-In

Problem: Apply same operation to many items Solution: Fan out to parallel agents, fan in to aggregator

Example: Validate all modules

Fan-Out:
Source → [Splitter]
         ├→ Validator 1 (module A)
         ├→ Validator 2 (module B)
         ├→ Validator 3 (module C)
         └→ Validator 4 (module D)

Fan-In:
[Aggregator] ← All validation results
     ↓
Final Report

Read the full file on GitHub · 513 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 513 lines · 0 tokens per session scan A f68f44e3cd78

Subscribe to this mod's changes

multi-agent-patterns is an agent published in the GitHub repository daffy0208/ai-dev-standards (36 stars, last pushed 8mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,484 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.