agentleFS
XData-siXData-si/xdata-agenthub/skills/multi-agent-orchestration/SKILL.md

multi-agent-orchestration

Skill1 starsChanged 33 days agoMITView on GitHub

Design and review multi-agent systems — when to split work across agents, orchestrator and worker roles, task contracts, shared state, isolation of tools and credentials, budgets, human checkpoints and evaluation. Use when building agent teams (planner/coder/reviewer, research swarms, support triage) or when a multi-agent setup is slow, expensive or unpredictable.

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use prompt-engineering, context-engineering and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • kongyo2Skill

    prompt-engineering

    Comprehensive prompt engineering framework for designing, optimizing, and iterating LLM prompts. This skill should be used when users request prompt creation, optimization, or improvement for any LLM task, or when users need help translating vague requirements into effective prompts through collaborative dialogue and iterative refinement.

    Also in 4 projects that use this

  • mrgoonieSkill

    context-engineering

    Master context engineering for AI agent systems. Use when designing agent architectures, debugging context failures, optimizing token usage, implementing memory systems, building multi-agent coordination, evaluating agent performance, or developing LLM-powered pipelines. Covers context fundamentals, degradation patterns, optimization techniques (compaction, masking, caching), compression strategies, memory architectures, multi-agent patterns, LLM-as-Judge evaluation, tool design, and project development.

    Also in 4 projects that use this

  • pproencaSkill

    refactoring

    Code refactoring best practices based on Martin Fowler's catalog and Clean Code principles. This skill should be used when refactoring existing code, improving code structure, reducing complexity, eliminating code smells, or reviewing code for maintainability. Triggers on tasks involving extract method, rename, decompose conditional, reduce coupling, or improve readability.

    Also in 3 projects that use this

  • lodetomasiSkill

    tdd-workflow

    Test-Driven Development workflow with red-green-refactor pattern and best practices

    Also in 3 projects that use this

  • BlockSkill

    debugging

    Debugging guidelines and best practices

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use several agents only where it improves results or safety, with clear contracts between them, bounded cost and the same guardrails as a …

    line 10
  2. Distinctive:

    Every agent role has a tool and credential list and a budget.

    line 41

“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Multi-Agent Orchestration

Goal

Use several agents only where it improves results or safety, with clear contracts between them, bounded cost and the same guardrails as a single agent.

Inputs

  • Task types and volumes, quality and latency targets, available models and tools, budget, risk of actions, existing single-agent baseline.

Procedure

  1. Start with a baseline: a single agent with good tools and prompts. Add agents only when evaluation shows a benefit (parallelism, specialised context, independent review).
  2. Choose a pattern:
    PatternUse when
    orchestrator → workerstasks decompose into independent subtasks (parallel research, per-file changes)
    pipelinefixed stages (extract → transform → review)
    generator + reviewerquality gate before output or action
    routerdifferent task types need different tools or models
  3. Task contracts: each subtask has an explicit input, expected output schema, done criteria and limits — not free-form chat between agents.
  4. Context and state: pass minimal, structured context; shared state in a store with ownership rules (who writes what); avoid agents silently overwriting each other's work (branches, locks, separate work directories).
  5. Isolation: each agent gets only the tools and credentials for its role; reviewers cannot be overridden by the agent they review; outputs from one agent are untrusted input for the next (prompt-injection boundary).
  6. Budgets and termination: per-task step, token, time and cost limits; maximum fan-out; detection of loops and repeated failures; a global kill switch.
  7. Human checkpoints for irreversible or external actions (see agent-guardrails).
  8. Observability: trace the full tree of agent calls with costs and decisions (see llm-observability).
  9. Evaluate end-to-end against the baseline on the same task set (see agent-evaluation): quality, cost, latency, failure modes.

Example fixture

Design: planner splits a feature into 6 subtasks → 6 coder agents edit the same branch in parallel → reviewer approves.
Findings: parallel edits conflict (no isolation), reviewer reads only the final diff (no task contracts), no cost cap (one run used 3 M tokens).
Fix: one branch per subtask + merge step, contracts with tests per subtask, budget 300 k tokens per run.

Acceptance checks

  • The multi-agent design beats the single-agent baseline on the evaluation set, or is not adopted.
  • Every agent role has a tool and credential list and a budget.
  • Negative case: an injected instruction in one worker's output does not cause another agent to perform an unauthorized action (test).

Output

Architecture with roles and contracts, budgets, guardrail mapping, evaluation results.

Safety

More agents means more autonomous actions: keep approval gates for irreversible operations, and never let agents grant themselves or each other additional permissions. Agent systems that process personal data must follow GDPR, and AI systems offered in the EU may have AI Act obligations (see eu-ai-act-readiness, dpia).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.