lain-federation

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

A guide for asking Lain questions across multiple code repositories, including repositories grouped into a workspace.

In plain words
What is it for?
Use it to search an organization, inspect available repositories and workspaces, and estimate cross-repository breakage.
Why use it?
It prevents treating a single-repository answer as complete when a change may affect related repositories elsewhere.

Skill for Claude CodeCodex

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

Good fit Use it to search an organization, inspect available repositories and workspaces, and estimate cross-repository breakage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/spuentesp/lain/lain-federation
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-federation
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-federation

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/spuentesp/lain/lain-federation"><img src="https://agentmods.dev/badge/skills/spuentesp/lain/lain-federation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 452 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.00047 $0.00452
Opus 5.5 $0.00019 $0.00181
Sonnet 5.5 $0.00009 $0.00090
Haiku 4.5 $0.00005 $0.00045

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

Security

Grade A, and why

lain-federation 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-federation/SKILL.md · 41 lines

What it actually says

Lain federation — org-wide questions

Federation tools appear automatically when the server runs multiple repositories; workspace tools when a workspaces.yaml is configured. This skill covers how to use them well.

The tools

  • search_org — symbol/path search across every indexed repo. The answer to "which repos know about X" and the first call before anything cross-repo.
  • get_cross_repo_blast_radius — what breaks across repos if a symbol changes, grouped by repo. Pin repo_id when the name exists in more than one repo (the error tells you the candidates). depth takes a number or range.
  • list_repos / get_repo_info / get_federation_health — what is indexed, where it came from, and whether anything failed to load (unreachable repos are listed, not fatal).
  • get_workspace_graph / list_workspaces / get_active_workspace — workspace-group views when repos are managed as named sets.

Rules of thumb

  • Call chains (get_call_chain) stay within one repository — by design. For the cross-repo question use get_cross_repo_blast_radius.
  • A cold federation answers warming_up first; cross-repo edges appear once both sides are projected. Retry, do not conclude "no connections".
  • Ids are five segments (repo:Kind:path:name:line_start); the line segment distinguishes same-named methods at different lines in one file. Ids returned by one tool work as handles in the next.
  • If a graph refuses to load after a Lain upgrade, that is the schema gate doing its job: run lain reindex (backs up the old graph first). See FEDERATION.md.
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 · 41 lines · 47 tokens per session scan A c570815fda3d

Subscribe to this mod's changes

lain-federation is a skill published in the GitHub repository spuentesp/lain (9 stars, last pushed 2d ago), licensed MIT. It adds 47 tokens to every session and 452 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.