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.
npx skills add spuentesp/lain --skill lain-architecturegit clone --depth 1 https://github.com/spuentesp/lainWrote 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.
[](https://agentmods.dev/skills/spuentesp/lain/lain-architecture)<a href="https://agentmods.dev/skills/spuentesp/lain/lain-architecture"><img src="https://agentmods.dev/badge/skills/spuentesp/lain/lain-architecture/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.
<a href="https://agentmods.dev/skills/spuentesp/lain/lain-architecture"><img src="https://agentmods.dev/badge/skills/spuentesp/lain/lain-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00060 | $0.00571 |
| Opus 5.5 | $0.00024 | $0.00228 |
| Sonnet 5.5 | $0.00012 | $0.00114 |
| Haiku 4.5 | $0.00006 | $0.00057 |
Grade A, and why
lain-architecture 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Lain architecture — map the system
The arch package answers shape questions the core deliberately
does not. Load it when the question is about structure rather than
one symbol.
Load it
Call load_package("arch") (or set LAIN_TOOL_PROFILE=arch at
config time). If the tools do not appear in your list, reconnect
the client and refetch. The raw package (load_package("raw"))
adds the low-level layer.
The tools
explore_architecture— file/module tree to a chosen depth. Start here for "what does this subsystem look like".compare_modules— stability and coupling of two modules side by side. Use for "which of these do we refactor first".architectural_observations— patterns, boundary violations, high-fan-out hot spots. Use for architecture review, not for one change.trace_dependency— everything a symbol depends on, recursively. The upstream question; the downstream one isget_blast_radius.get_layered_map/get_context_depth— slices of the stack from an entry point; how deep a symbol sits.navigate_to_anchor/get_anchor_score— climb from a leaf to its controlling anchor; how load-bearing one symbol is.get_master_map— staleness: when each module last synced. Read this before trusting a stale-looking answer.suggest_refactor_targets— complexity + stability hot spots.
raw package, when the high-level tools are not enough:
query_graph (JSON ops-array against the graph — read
describe_schema first), get_code_snippet, get_call_sites
(every call with its line), explain_symbol,
get_context_for_prompt, get_cross_runtime_callers,
semantic_search (needs a model).
Rules of thumb
- Depth fields take a number (
3) or a range ("1..3"). - A layered map is for shape; do not use it to answer "who calls
this" — that is
get_call_chain. query_graphis the escape hatch, not the first tool. Its schema is indescribe_schema; prefer the named tools unless you need a traversal nobody anticipated.
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.
- 2mo ago First seen · 53 lines · 60 tokens per session scan A 920799c0ea49
lain-architecture is a skill published in the GitHub repository spuentesp/lain (9 stars, last pushed yesterday), licensed MIT. It adds 60 tokens to every session and 571 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.
lain-architecture compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| lain-architecturespuentesp/lain | Skill | 9 | yesterday | MIT | A | 60 | Claude Code, Codex |
| lsp-mcp-serverProfessioneIT/lsp-mcp-server | Skill | 23 | 6d ago | MIT | A | 108 | Claude Code, Codex |
| exploreTheWinci/mimirs | Skill | 30 | 1mo ago | Apache-2.0 | A | 79 | Claude Code |
| debugTheWinci/mimirs | Skill | 30 | 1mo ago | Apache-2.0 | A | 35 | Claude Code |
| speclite-review-adversarial-generalflanliulf/SpecLite | Skill | 6 | 8d ago | MIT | A | 76 | Claude Code |
| speclite-review-edge-case-hunterflanliulf/SpecLite | Skill | 6 | 8d ago | MIT | A | 71 | Claude Code |
| Live Deploy Debuggingniels-emmer/myace | Skill | 1 | yesterday | MIT | A | 46 | Claude Code, Codex |