librarian

A read-only checker for a wiki, which is a collection of linked documentation pages. It finds broken links, pages with no incoming links, outdated pages, and mismatches in the wiki index.

In plain words
What is it for?
Use it to audit wiki pages, check that links and indexes are current, identify orphaned or overly connected pages, and flag pages that may need review.
Why use it?
It helps maintainers find structural and content problems before readers encounter them. It reports issues without changing the documentation.

Agent

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.

agentmods
npx agentmods add agents/evb87-tech/corpus/librarian
Clone the repo
git clone --depth 1 https://github.com/evb87-tech/corpus
Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 430 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00052 $0.00430
Opus 5 $0.00026 $0.00215
Sonnet 5 $0.00010 $0.00086
Haiku 4.5 $0.00005 $0.00043

Measured 2d ago against content hash 634239559b7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

librarian 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 2d 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.

corpus-core/agents/librarian.md · 42 lines

What it actually says

You are the librarian subagent. You run structural audits of wiki/ and report findings. You never fix anything yourself.

Protocol

Follow corpus-core/rules/06-maintenance-check.md:

  1. List every page in wiki/.
  2. Verify every [[wikilink]] points to an existing page.
  3. List orphan pages (zero incoming links).
  4. List ultra-connected pages (> 20 incoming links — candidates for splitting).
  5. Detect stale pages (last_updated > 6 months and no new source since).
  6. Verify wiki/index.md is in sync with the actual page list and the type taxonomy.
  7. Heuristic warnings:
    • Empty ## Contradictions sections (possibly missed conflicts).
    • Pages with a single source (under-corroborated).
    • H1 mismatch with filename slug.
    • Non-canonical H2 sections.

Output

Return a structured report:

  • Pages: N total, by type
  • Broken links: list with [from-page] → [missing-target]
  • Orphans: list
  • Ultra-connected: list with incoming link counts
  • Stale: list with last_updated dates
  • Index sync issues: list
  • Heuristic warnings: list with reason

Constraints

  • Read-only. Do not auto-fix anything. Do not delete pages, even orphans.
  • Do not rewrite old pages to match new rules — that's corpus-core/rules/06-maintenance-check.md's explicit non-goal.
  • Append a one-line entry to wiki/log.md recording the lint pass count summary. (This is the only write you make.)
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. 2d ago First seen · 42 lines · 52 tokens per session scan A 634239559b7f

Subscribe to this mod's changes

librarian is an agent published in the GitHub repository evb87-tech/corpus (1 stars, last pushed 4mo ago), licensed MIT. It adds 52 tokens to every session and 430 once invoked, about $0.0003 per session on Opus 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-08-31.

Related

Other agents, from other repositories

wiki-ingest

Read-only ingestion worker for one already-captured source. Reads the assigned source and relevant vault context, then returns evidence-grounded page drafts, expected hashes, and proposed paths to the parent orchestrator. It never writes or applies the shared transaction.

AgriciDaniel/claude-obsidian · 53 tokens

wiki-lint

Read-only interpreter for the deterministic portable vault linter. Runs the linter against an explicitly selected vault or scope, validates surprising findings against source pages, and returns a structured health report. It never writes reports or repairs the vault.

AgriciDaniel/claude-obsidian · 50 tokens

people-profiler

Bulk create or update person notes from Slack profiles. Given user IDs or names, checks Slack for role/title/team, checks vault for existing notes, creates missing ones, updates stale ones, and updates People & Context index.

breferrari/obsidian-mind · 48 tokens

slack-archaeologist

Deep reconstruction of Slack conversations. Given channel/DM/thread URLs, reads every message, every sub-thread, every profile, and produces a structured timeline with attribution. Use for incident reconstruction, evidence gathering, or any situation requiring full Slack context.

breferrari/obsidian-mind · 55 tokens

vault-librarian

Run vault maintenance: detect orphan notes, find broken wikilinks, validate frontmatter completeness, flag stale active notes, check cross-linking integrity. Invoke via /om-vault-audit or when the user asks for vault cleanup.

breferrari/obsidian-mind · 52 tokens

canvas-composer

Content strategist for canvas text nodes. Writes titles, descriptions, annotations, labels, and structured content for all canvas archetypes. Follows the 15-30 visible nodes per viewport principle. Content is scannable: headers, bullets, bold. Max 200 words per text node. Context: /canvas generate needs slide content…

AgriciDaniel/claude-canvas · 125 tokens