multi-agent

multi-agent is a skill for Claude Code from juan294/cc-rpi. It costs 25 tokens per session (1,120 once invoked), scanned A, original, MIT.

A guide to coordinating multiple coding agents, including shared worktrees, local commits, permissions, and centrally managed pushes. A worktree is a separate working directory connected to the same Git repository.

In plain words
What is it for?
Use it when delegating coding tasks to sub-agents, coordinating branches and worktrees, or combining and pushing their commits.
Why use it?
It reduces conflicts, failed write attempts, accidental branch pushes, and duplicated CI runs when several agents work on related changes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the cc-rpi plugin — 14 skills, 19 commands, 2 hooks shipped together

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 skills/juan294/cc-rpi/multi-agent
Any agent
npx skills add juan294/cc-rpi --skill multi-agent
Clone the repo
git clone --depth 1 https://github.com/juan294/cc-rpi

Made for: Claude Code.

Or install cc-rpi, the plugin that ships this one along with the rest of its 14 skills, 19 commands, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for multi-agent

README.md
[![agentmods](https://agentmods.dev/badge/skills/juan294/cc-rpi/multi-agent.svg)](https://agentmods.dev/skills/juan294/cc-rpi/multi-agent)
Your own site
<a href="https://agentmods.dev/skills/juan294/cc-rpi/multi-agent"><img src="https://agentmods.dev/badge/skills/juan294/cc-rpi/multi-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,120 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.1 $0.00025 $0.01120
Opus 5 $0.00013 $0.00560
Sonnet 5 $0.00005 $0.00224
Haiku 4.5 $0.00003 $0.00112

Measured 5d ago against content hash 7e8adff86bec, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

multi-agent 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 5d 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.

templates/skills/multi-agent/SKILL.md · 165 lines

How it starts

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

Multi-Agent Coordination

Central Commit Pattern

Wrong -- sub-agent pushes directly, causes wrong-branch push:

# In sub-agent worktree:
git add . && git commit -m "fix" && git push origin feature-branch

Right -- sub-agent commits locally, main agent pushes:

# Sub-agent (worktree): commit only
git add . && git commit -m "fix"

# Main agent: review, then batch-push all branches
git push origin branch-1 branch-2 branch-3

Central Push Pattern

Wrong -- N agents push independently, triggering N x M CI runs:

# Agent 1 pushes -> 9 CI workflows
# Agent 2 pushes -> 9 CI workflows
# Agent 3 pushes -> 9 CI workflows
# Total: 27 workflow runs

Right -- main agent batch-pushes, monitors CI centrally:

# All agents commit locally in their worktrees
# Main agent pushes all at once:
git push origin branch-1 branch-2 branch-3
# One background agent monitors all CI runs

Sub-Agent Permissions

Wrong -- spawn sub-agent for write operation, it fails silently:

# Sub-agent: "I don't have permission to edit files"

Right -- verify permissions before spawning, take over if blocked:

1. Check tool permissions before spawning sub-agents for write ops
2. If a sub-agent fails due to permissions, take over manually immediately
3. Don't retry the sub-agent -- do the work yourself

Agent Team Spawn Context

Wrong -- teammate has no context, makes wrong assumptions:

"Fix the login bug"

Right -- include full context since teammates don't inherit history:

"Fix the login bug in /absolute/path/src/auth/login.ts:42.
The session token is not being refreshed on 401 responses.
The fix: add a retry with token refresh in the catch block.
Run 'cd /absolute/path && pnpm test src/auth/' to verify."

File Ownership

Wrong -- two teammates edit the same file, merge conflict:

Teammate A: edit src/api/routes.ts
Teammate B: edit src/api/routes.ts

Right -- break work so each teammate owns different files:

Read the full file on GitHub · 165 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. 5d ago First seen · 165 lines · 25 tokens per session scan A 7e8adff86bec

Subscribe to this mod's changes

multi-agent is a skill published in the GitHub repository juan294/cc-rpi (5 stars, last pushed 4d ago), licensed MIT. It adds 25 tokens to every session and 1,120 once invoked, about $0.0001 per session on Opus 5. 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-31.