lain-coordination

lain-coordination is a skill for Claude Code, Codex from spuentesp/lain. It costs 57 tokens per session (632 once invoked), scanned A, original, MIT.

A guide for coordinating multiple coding agents working in the same project.

In plain words
What is it for?
Use it to register an agent, claim and release files, check overlaps, see other agents, and leave handoff notes.
Why use it?
It reduces collisions by showing who is active, which files are claimed, and what information should be handed to the next agent.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to register an agent, claim and release files, check overlaps, see other agents, and leave handoff notes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/spuentesp/lain/lain-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 spuentesp/lain --skill lain-coordination
Clone the repo
git clone --depth 1 https://github.com/spuentesp/lain

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/spuentesp/lain/lain-coordination/github.svg)](https://agentmods.dev/skills/spuentesp/lain/lain-coordination)
Your own site
<a href="https://agentmods.dev/skills/spuentesp/lain/lain-coordination"><img src="https://agentmods.dev/badge/skills/spuentesp/lain/lain-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 lain-coordination

Your own site · 80×15
<a href="https://agentmods.dev/skills/spuentesp/lain/lain-coordination"><img src="https://agentmods.dev/badge/skills/spuentesp/lain/lain-coordination.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 632 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00057 $0.00632
Opus 5.5 $0.00023 $0.00253
Sonnet 5.5 $0.00011 $0.00126
Haiku 4.5 $0.00006 $0.00063

Measured 19d ago against content hash c30f6f5eeb63, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

lain-coordination 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 19d 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.

skills/lain-coordination/SKILL.md · 62 lines

How it starts

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

Lain coordination — work beside other agents

Multiplayer plumbing is hidden from the default surface because hooks usually drive it — hooks/<agent>/ scripts call claim_files / heartbeat / release_files directly. Tools are callable by name even when hidden, but load_package makes them appear in tools/list; many MCP clients only permit tools their cached list contains. Load these packages only when you are managing the coordination yourself.

Load them

load_package("session") for claiming, load_package("social") for the roster, load_package("notes") for handoffs — or set LAIN_TOOL_PROFILE=session,social,notes at config time for a coordinator agent. Reconnect the client if the tools do not appear.

Claim discipline (session)

  1. register_agent once (name yourself meaningfully).
  2. Before editing: detect_overlap on the files/symbols you will touch — if a peer holds them, coordinate first.
  3. claim_files with an intent and a TTL you can honour; refresh with heartbeat; release_files the moment you are done. my_claims / list_occupancy / get_world_state answer "who holds what" at any moment.

Awareness (social)

list_active_agents (who is here), who_am_i (what the server thinks you are), list_subagents, get_audit_log (recent coordination events in this workspace), unregister_agent on exit.

Handoffs (notes)

leave_handoff_note when your work continues elsewhere — say what you changed and what you did NOT do. get_pending_handoffs when you start. lain_intent / list_active_intents for the plan board; add_annotation / list_annotations / resolve_annotation for notes pinned to code.

Example payloads (copy verbatim, fill in values):

add_annotation  →  target={"kind":"symbol","symbol":"MyFn","repo_id":"..."},
                   kind="note", body="..."
leave_handoff_note  →  body="[scope:auth] did X; Y still open", scope="auth"

Rules of thumb

  • Claims are advisory coordination, not locks — still re-check before you write.
  • Keep TTLs short and heartbeats honest; an expired claim drops (by design) and a stale one is worse than none.
  • Never claim files "just in case" — claim when you are about to edit.

Read the full file on GitHub · 62 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. 19d ago First seen · 62 lines · 57 tokens per session scan A c30f6f5eeb63

Subscribe to this mod's changes

lain-coordination is a skill published in the GitHub repository spuentesp/lain (9 stars, last pushed 2d ago), licensed MIT. It adds 57 tokens to every session and 632 once invoked, about $0.0002 per session on Opus 5.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-09-28.