lain-comprehension

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

A guide for understanding an existing codebase with Lain's code-search and dependency tools.

In plain words
What is it for?
Use it to find symbols or concepts, inspect callers and callees, trace changes, identify entry points, and find dead code.
Why use it?
It helps an agent locate relevant code, understand how parts connect, and judge what might break before editing.

Skill for Claude CodeCodex

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

Good fit Use it to find symbols or concepts, inspect callers and callees, trace changes, identify entry points, and find dead code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/spuentesp/lain/lain-comprehension"><img src="https://agentmods.dev/badge/skills/spuentesp/lain/lain-comprehension.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 576 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.00063 $0.00576
Opus 5.5 $0.00025 $0.00230
Sonnet 5.5 $0.00013 $0.00115
Haiku 4.5 $0.00006 $0.00058

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

Security

Grade A, and why

lain-comprehension 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.

skills/lain-comprehension/SKILL.md · 48 lines

How it starts

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

Lain comprehension — orient, understand, assess

The default Lain surface is small on purpose: these tools answer almost every reading question. Reach for them in this order.

The flow

  1. First contact — understand_repository once. It returns identity, top anchors, entry points, and capability states in one payload. Do not scatter exploratory calls before it.
  2. Locate — find_symbol when you know the name (it returns every match with ids and paths); search_code when you know the idea ("where is auth handled").
  3. Understand — get_context on one symbol: definition, callers, callees, source excerpt. This is the "quote it back" payload.
  4. Before editing — assess_change (dependents + untested dependents + a low/medium/high risk verdict). Use get_blast_radius only when you want the raw dependent list instead of the verdict, and get_call_chain from=A to=B when you need one exact path.
  5. Read strategically — find_anchors ("what is load-bearing"), list_entry_points ("where does execution start"), get_coupling_radar ("what changes together") before refactors, find_dead_code before cleanup. find_related bundles graph + co-change + semantic neighbours for "what is connected to X".

The honesty contract

explain_dispatch exists for the trap case: an impact query that returns surprisingly little. When get_blast_radius looks wrong, call explain_dispatch — its verdict distinguishes "nothing calls this" from "static analysis cannot see the dispatcher" (insufficient_evidence). Treat insufficient_evidence as do not assume safe, and say so in your answer. Likewise "still indexing" (warming_up, retry_after_ms) means retry later, not empty.

When you need more

Testing, git state, raw graph queries, architecture deep-dives, and multiplayer plumbing live in packages beyond the default: call list_packages, then load_package("<package>"), then refetch tools (or reconnect the client) — see lain-verify, lain-architecture, lain-coordination, lain-federation.

Read the full file on GitHub · 48 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. 2mo ago First seen · 48 lines · 63 tokens per session scan A 37b38941f63e

Subscribe to this mod's changes

lain-comprehension is a skill published in the GitHub repository spuentesp/lain (9 stars, last pushed yesterday), licensed MIT. It adds 63 tokens to every session and 576 once invoked, about $0.0003 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.

Related

lain-comprehension compared with skills from other repositories

lain-comprehension next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
lain-comprehensionspuentesp/lainSkill9yesterdayMITA63Claude Code, Codex
lsp-mcp-serverProfessioneIT/lsp-mcp-serverSkill236d agoMITA108Claude Code, Codex
exploreTheWinci/mimirsSkill301mo agoApache-2.0A79Claude Code
debugTheWinci/mimirsSkill301mo agoApache-2.0A35Claude Code
speclite-review-adversarial-generalflanliulf/SpecLiteSkill68d agoMITA76Claude Code
speclite-review-edge-case-hunterflanliulf/SpecLiteSkill68d agoMITA71Claude Code
Live Deploy Debuggingniels-emmer/myaceSkill1yesterdayMITA46Claude Code, Codex