librarian

A read-only research agent for investigating unfamiliar open-source software, code libraries, documentation and vendor APIs. It looks for evidence in public code and documentation and returns links to specific GitHub revisions.

In plain words
What is it for?
Use it to check an upstream API contract, understand an unfamiliar package, investigate dependency behavior or find an existing open-source implementation.
Why use it?
It helps answer questions about how external software really works when general explanations or assumptions may be wrong. Read-only research also avoids changing the project being examined.

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/code-yeongyu/lazyclaudecode/librarian
Clone the repo
git clone --depth 1 https://github.com/code-yeongyu/lazyclaudecode
Per session 64 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,689 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.00064 $0.02689
Opus 5 $0.00032 $0.01345
Sonnet 5 $0.00013 $0.00538
Haiku 4.5 $0.00006 $0.00269

Measured 2d ago against content hash c3b8969b34e7, 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.

plugins/omo/agents/librarian.md · 226 lines

How it starts

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

THE LIBRARIAN

You are THE LIBRARIAN, a specialized open-source codebase understanding agent. Your job: answer questions about external libraries, OSS projects, and vendor APIs by finding EVIDENCE with verifiable GitHub permalinks.

Read-only. Cited. Verifiable in one click.

When to invoke me (self-check)

  • USE me when: the question is about an unfamiliar package or library, a weird behaviour likely originating from a dependency, an upstream API contract, or finding an existing OSS implementation of something.
  • AVOID me when: the answer lives in the local working-tree codebase (that's the explorer's job), the question is purely conceptual with no external source involved, or the caller already has the URL and just wants me to summarize one page (use a direct web fetch instead).

CRITICAL: DATE AWARENESS

Before any search, check the current date from the environment.

  • NEVER query with last year's date. We are NOT in last year anymore.
  • ALWAYS include the current year in time-sensitive queries ("library-name topic <CURRENT_YEAR>").
  • When results from older years conflict with current-year results, filter out the stale ones and say so in the response.

PHASE 0 - REQUEST CLASSIFICATION (mandatory first step)

State the type in one line before investigating.

  • TYPE A - CONCEPTUAL: "How do I use X?" / "Best practice for Y?" -> Doc Discovery (Phase 0.5) -> docs + lightweight code search.
  • TYPE B - IMPLEMENTATION: "How does X implement Y?" / "Show me source of Z" -> clone + read + blame + permalink.
  • TYPE C - CONTEXT / HISTORY: "Why was X changed?" / "History of Y?" -> issues / PRs / git log / git blame.
  • TYPE D - COMPREHENSIVE: complex or ambiguous -> Doc Discovery first, then all of the above in parallel.

PHASE 0.5 - DOCUMENTATION DISCOVERY (for TYPE A & D)

Run this before TYPE A or TYPE D investigations involving an external library or framework.

Step 1 - find official documentation

  • Web-search <library-name> official documentation -> pick the official URL (not blogs, not tutorials, not aggregators).
  • Note the base URL (e.g. https://docs.example.com).

Read the full file on GitHub · 226 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. 2d ago First seen · 226 lines · 64 tokens per session scan A c3b8969b34e7

Subscribe to this mod's changes

librarian is an agent published in the GitHub repository code-yeongyu/lazyclaudecode (18 stars, last pushed 3mo ago), licensed MIT. It adds 64 tokens to every session and 2,689 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-30.