Designs supervisor-based multi-agent systems with centralized orchestration, coordinating specialized worker agents for complex tasks. Useful for hierarchical agent architectures and workflow coordination.
Ships in agent-architect. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Design centralized orchestration systems where a supervisor agent coordinates specialized worker agents.
┌─────────────┐
│ SUPERVISOR │
│ AGENT │
└──────┬──────┘
│
┌───────────────┼───────────────┐
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Research │ │ Writer │ │ Reviewer │
│ Agent │ │ Agent │ │ Agent │
└──────────┘ └──────────┘ └──────────┘
The brain that orchestrates the workflow.
interface SupervisorConfig {
name: string;
description: string;
workers: WorkerAgent[];
maxIterations: number;
routingStrategy: 'sequential' | 'parallel' | 'conditional';
}
const supervisorPrompt = `
You are a supervisor agent coordinating specialized workers.
Available Workers:
{{#each workers}}
- {{name}}: {{description}}
{{/each}}
Your responsibilities:
1. Analyze the incoming task
2. Decompose into subtasks for appropriate workers
3. Route subtasks to the right worker
4. Synthesize results into final output
5. Handle errors and retry if needed
For each step, output:
{
"reasoning": "Why this worker for this subtask",
"worker": "worker_name",
"task": "Specific instructions for the worker",
"expectedOutput": "What you expect back"
}
When complete, output:
{
"status": "complete",
"result": "Final synthesized result"
}
`;
Specialized agents for specific tasks.
interface WorkerAgent {
name: string;
description: string;
systemPrompt: string;
tools: Tool[];
outputSchema?: JSONSchema;
}
const researchWorker: WorkerAgent = {
name: 'researcher',
description: 'Searches and analyzes information from various sources',
systemPrompt: `You are a research specialist.
Search for accurate, up-to-date information.
Always cite sources.
Return structured findings.`,
tools: [webSearch, documentReader],
outputSchema: {
type: 'object',
properties: {
findings: { type: 'array' },
sources: { type: 'array' },
confidence: { type: 'number' }
}
}
};
Routes tasks to appropriate workers.
interface RouterDecision {
worker: string;
task: string;
priority: number;
dependencies: string[];
}
async function routeTask(
task: string,
context: WorkflowContext
): Promise<RouterDecision[]> {
// Supervisor decides routing
const decision = await supervisor.decide({
task,
availableWorkers: workers.map(w => ({
name: w.name,
description: w.description,
currentLoad: w.pendingTasks
})),
completedSteps: context.history
});
return decision.subtasks;
}
Task → Worker A → Worker B → Worker C → Result
async function sequentialPipeline(task: string) {
const supervisor = createSupervisor({
routingStrategy: 'sequential',
workers: [researcher, writer, reviewer]
});
let context = { task, results: {} };
// Supervisor determines order
const plan = await supervisor.plan(task);
for (const step of plan.steps) {
const worker = workers.find(w => w.name === step.worker);
const result = await worker.execute(step.task, context);
context.results[step.worker] = result;
// Supervisor validates and decides next step
const validation = await supervisor.validate(result, step);
if (!validation.proceed) {
return supervisor.handleFailure(validation.reason, context);
}
}
return supervisor.synthesize(context.results);
}
┌─→ Path A Workers ─┐
Task → Classifier ─┤ ├→ Result
└─→ Path B Workers ─┘
async function conditionalWorkflow(task: string) {
// Supervisor classifies the task
const classification = await supervisor.classify(task);
const workflow = workflowMap[classification.type];
return executeWorkflow(workflow, task);
}
const workflowMap = {
'code_review': [securityReviewer, performanceReviewer, styleReviewer],
'content_creation': [researcher, writer, editor],
'data_analysis': [dataFetcher, analyzer, visualizer]
};
┌─→ Worker A ─┐
Task → ────┼─→ Worker B ─┼─→ Aggregator → Result
└─→ Worker C ─┘
async function parallelExecution(task: string) {
// Supervisor splits task
const subtasks = await supervisor.decompose(task);
// Execute in parallel
const results = await Promise.all(
subtasks.map(async (subtask) => {
const worker = selectWorker(subtask);
return {
worker: worker.name,
result: await worker.execute(subtask)
};
})
);
// Supervisor synthesizes
return supervisor.aggregate(results);
}
## Your Role
You are the Supervisor Agent for a content creation system.
## Your Capabilities
- Decompose complex writing tasks into subtasks
- Assign subtasks to specialized worker agents
- Validate worker outputs meet quality standards
- Synthesize multiple outputs into coherent final product
## Your Constraints
- Never attempt tasks yourself - always delegate to workers
- Maximum 5 worker invocations per task
- Must validate each output before proceeding
## Output Format
For every decision, provide:
```json
{
"thought": "Your reasoning process",
"decision": "What you decided",
"rationale": "Why this is the right choice",
"nextAction": {
"type": "delegate|validate|synthesize|complete|error",
"details": {...}
}
}
### Error Handling Instructions
```markdown
## When Workers Fail
1. First retry: Same worker, rephrased instructions
2. Second retry: Same worker, simpler subtask
3. Third failure: Try alternative worker if available
4. Final failure: Return partial results with explanation
Always log failures for human review.
interface WorkflowState {
taskId: string;
originalTask: string;
currentPhase: string;
completedSteps: Step[];
pendingSteps: Step[];
workerOutputs: Map<string, WorkerOutput>;
errors: Error[];
startTime: Date;
tokenUsage: TokenUsage;
}
class SupervisorStateManager {
async checkpoint(state: WorkflowState): Promise<void> {
// Persist state for recovery
await this.store.save(state.taskId, state);
}
async recover(taskId: string): Promise<WorkflowState | null> {
return this.store.load(taskId);
}
}
interface SupervisorMetrics {
taskId: string;
totalDuration: number;
workerInvocations: {
worker: string;
duration: number;
tokens: number;
success: boolean;
}[];
decisionPoints: {
timestamp: Date;
decision: string;
reasoning: string;
}[];
finalStatus: 'success' | 'partial' | 'failed';
}
// Log for analysis
function logSupervisorRun(metrics: SupervisorMetrics) {
console.log(JSON.stringify({
type: 'supervisor_run',
...metrics
}));
}
| Pattern | Best For |
|---|---|
| Supervisor | Complex orchestration, visibility needed |
| Swarm/Mesh | Peer-to-peer collaboration, resilience |
| Pipeline | Linear workflows, streaming |
| Hierarchical | Large scale, nested supervision |
What SKILL.md sets; muted values are Claude Code's defaults
/agent-architect:agent-supervisor-patternfrom agent-architect
npx claudepluginhub latestaiagents/agent-skills --plugin agent-architect13 skills in this plugin
/a2a-protocolsImplement Agent-to-Agent (A2A) communication for cross-framework interoperability.
Use this skill when building multi-agent communication, implementing agent protocols,
connecting agents across frameworks, or standardizing agent interfaces.
Activate when: agent to agent, A2A, agent communication, agent protocol,
cross-framework agents, agent interoperability, MCP, agent discovery.
/agent-checkpointingImplement checkpointing for agent recovery, debugging, and replay.
Use this skill when building recoverable agents, implementing replay,
debugging agent failures, or creating resumable workflows.
Activate when: agent checkpoint, agent recovery, resume agent, agent restart,
workflow replay, agent debugging, failure recovery, state snapshot.
/agent-cost-budgetingUse this skill when managing AI agent costs. Activate when the user needs to control token usage,
implement cost limits for agents, optimize LLM spending, track agent costs, or prevent runaway
API bills in agent systems.
/agent-error-recoveryUse this skill when implementing error handling for AI agents. Activate when the user needs agents to
handle failures gracefully, implement retry strategies, design fault-tolerant agent systems, or build
agents that can recover from errors without human intervention.
/agent-handoff-protocolsUse this skill when designing task handoffs between agents. Activate when the user needs to pass work
between agents, transfer context between agents, implement agent-to-agent communication, or design
protocols for agents to collaborate on sequential tasks.
/agent-memory-systemsUse this skill when implementing memory for AI agents. Activate when the user needs agents to remember
past interactions, implement context persistence, build knowledge bases for agents, design agent state
management, or create shared memory between multiple agents.
4 plugins in one repository ship this exact skill · first indexed Aug 19, 2026
Other plugins' skills for the same job