# multi-agent-patterns

A skill that lays out three ways to split work across subagents: supervisor, peer-to-peer and hierarchical. Useful once one agent runs out of context.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1300 installs · ★ 1787
- Author: NeoLabHQ
- License: GPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/NeoLabHQ/context-engineering-kit/tree/HEAD/skills/multi-agent-patterns/SKILL.md
- Updated: 2026-08-26
- HTML: https://affpapa.org/en/nevibecode/skills/multi-agent-patterns

## What it does

The skill walks through three multi-agent patterns. Supervisor keeps a central agent that decomposes the request and routes subtasks to specialists. Peer-to-peer drops the centre: agents hand control to each other through shared state files. The hierarchical variant stacks strategy, planning and execution layers.

The core argument inside: subagents exist to isolate context, not to mimic org charts. Each agent runs in a clean context and results aggregate at a coordination layer. For Claude the skill describes an orchestrator command that spawns subagents with the Task tool.

Failure modes get their own attention. A supervisor's own context turns into the bottleneck, and paraphrasing subagent replies loses detail — so the skill suggests letting subagents write to shared files or return output verbatim. Peer-to-peer gets riskier as agent count grows, because nothing holds a single source of truth. Worth deciding early who owns state.

Install runs through `npx skills add`, and the skill file lands at `~/.claude/skills/multi-agent-patterns/SKILL.md`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill multi-agent-patterns -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/multi-agent-patterns/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/multi-agent-patterns/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill multi-agent-patterns -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/multi-agent-patterns/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill multi-agent-patterns -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/multi-agent-patterns/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install NeoLabHQ/context-engineering-kit multi-agent-patterns
```

2. **Manually: put the files in place**
- File: `.github/skills/multi-agent-patterns/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill multi-agent-patterns -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/NeoLabHQ/context-engineering-kit --path skills/multi-agent-patterns
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/multi-agent-patterns/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill multi-agent-patterns -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/NeoLabHQ/context-engineering-kit/tree/HEAD/skills/multi-agent-patterns/SKILL.md

## When to use it
- break a large task into subtasks for several agents
- pick between supervisor, peer-to-peer and hierarchical setups
- move part of the work into a separate context window
- collect subagent results without losing detail in paraphrase
- define a handoff protocol between agents

## Example prompts
- decompose this task using the supervisor pattern and dispatch subtasks to subagents
- my main agent's context is filling up — suggest how to split the work across agents
- compare the peer-to-peer and hierarchical patterns for this project

## Similar
- [multi-agent-orchestration](https://affpapa.org/en/nevibecode/skills/multi-agent-orchestration.md) — skill · 2100 installs
- [open-multi-agent-orchestration](https://affpapa.org/en/nevibecode/skills/open-multi-agent-orchestration.md) — skill · 710 installs
- [context-engineering](https://affpapa.org/en/nevibecode/skills/mrgoonie-context-engineering.md) — skill · 495 installs
- [multi-agent-review](https://affpapa.org/en/nevibecode/skills/multi-agent-review.md) — skill · 18000 installs
- [multi-agent-brainstorming](https://affpapa.org/en/nevibecode/skills/multi-agent-brainstorming.md) — skill · 1400 installs
- [multi-agent-coordinator](https://affpapa.org/en/nevibecode/agents/multi-agent-coordinator.md) — subagent · 632 installs

## Other versions with the same name
- [multi-agent-patterns · guanyang](https://affpapa.org/en/nevibecode/skills/guanyang-multi-agent-patterns.md) — 305 installs

From the same set: [neolabhq/context-engineering-kit](https://affpapa.org/en/nevibecode/by/neolabhq/context-engineering-kit.md) — 64 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
