multi-agent-coordination

multi-agent-coordination is a skill for Claude Code from andr-ca/agentharness. It costs 48 tokens per session (2,246 once invoked), scanned C, original, MIT.

A set of rules for coordinating multiple coding agents working in the same repository. It covers feature locks, stale-lock checks, separate worktrees, and Git branch discipline.

In plain words
What is it for?
Use it when starting feature or fix work while another agent may be active, checking whether a feature is locked, or isolating concurrent changes in separate worktrees.
Why use it?
It reduces the risk that two agents edit the same work or overwrite each other’s changes. It also provides a fallback when the project does not include the expected lock script.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: mentions CLAUDE.md; mentions Claude Code.

Good fit Use it when starting feature or fix work while another agent may be active, checking whether a feature is locked, or isolating concurrent changes in separate worktrees.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/andr-ca/agentharness/multi-agent-coordination
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.

Any agent
npx skills add andr-ca/agentharness --skill multi-agent-coordination
Clone the repo
git clone --depth 1 https://github.com/andr-ca/agentharness

Made for: Claude Code.

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-coordination

README.md
[![agentmods](https://agentmods.dev/badge/skills/andr-ca/agentharness/multi-agent-coordination/github.svg)](https://agentmods.dev/skills/andr-ca/agentharness/multi-agent-coordination)
Your own site
<a href="https://agentmods.dev/skills/andr-ca/agentharness/multi-agent-coordination"><img src="https://agentmods.dev/badge/skills/andr-ca/agentharness/multi-agent-coordination/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for multi-agent-coordination

Your own site · 80×15
<a href="https://agentmods.dev/skills/andr-ca/agentharness/multi-agent-coordination"><img src="https://agentmods.dev/badge/skills/andr-ca/agentharness/multi-agent-coordination.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,246 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00048 $0.02246
Opus 5.5 $0.00019 $0.00898
Sonnet 5.5 $0.00010 $0.00449
Haiku 4.5 $0.00005 $0.00225

Measured 1mo ago against content hash 3a279f809582, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

multi-agent-coordination scanned grade C with 1 finding 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 1mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **Remove with git:** `git worktree remove <dir>` (not `rm -rf`).
.claude/skills/multi-agent-coordination/SKILL.md · 230 lines

How it starts

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

Multi-Agent Coordination

Use this skill when you start work on a feature and another agent session might be working on the same repository, or when you detect that a lock exists for the feature you want to work on.

tools/agent-lock.sh is agentharness's own dogfooding tool — it is not currently installed into consumer projects by harness-link.sh. If this skill file is symlinked/copied into a consumer repo (the normal case for every install mode) and tools/agent-lock.sh doesn't exist there, every command below will fail with "No such file or directory". Check [ -x tools/agent-lock.sh ] before relying on this skill's commands; if it's missing, this protocol doesn't apply to this repo yet — fall back to plain git branch discipline (check git branch -a / git log for other in-progress work before starting) rather than assuming the lock file exists.

This fallback covers coordination with other agents only — it does not weaken the branching skill's worktree-isolation rule. Whether or not tools/agent-lock.sh exists, starting new feature/fix work on a dirty tree or an unrelated branch still requires a worktree first; a missing lock script is not license to git checkout -b on top of in-progress changes, yours or anyone else's.

Deeper reference: patterns/multi-agent-coordination/COORDINATION.md (full protocol, lock format, stale detection, worktree rules).


Before starting work: check for a lock

tools/agent-lock.sh check "add-user-auth"
  • FREE — no lock exists. Proceed normally.
  • LOCKED — another agent is working on this feature.

Acquiring a lock

AGENT_LOCK_PID=<stable-session-pid> tools/agent-lock.sh acquire "add-user-auth" "feat/user-auth"
# ACQUIRED: locked 'add-user-auth' (agent_id=3f2a1c8d-..., owner_pid=12345)
# 3f2a1c8d-...
export AGENTHARNESS_AGENT_ID=3f2a1c8d-...   # the id from the last line

Check owner_pid in that output. It is the process whose liveness and ancestry the lock is anchored to. If it isn't the session process you meant, acquire still succeeds — and the mistake surfaces much later, as a push blocked by your own lock. acquire prints a NOTE when the recorded pid isn't an ancestor of the acquiring process, which is the usual signature of a wrong AGENT_LOCK_PID.

Read the full file on GitHub · 230 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. 1mo ago First seen · 230 lines · 48 tokens per session scan C 3a279f809582

Subscribe to this mod's changes

multi-agent-coordination is a skill published in the GitHub repository andr-ca/agentharness (1 stars, last pushed 2d ago), licensed MIT. It adds 48 tokens to every session and 2,246 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.