librarian

librarian is an agent for coding agents from pjt222/agent-almanac. It costs 26 tokens per session (4,026 once invoked), scanned A, original, MIT.

A library-management specialist for organizing, describing, preserving, and finding collections of materials, from personal files to institutional archives.

In plain words
What is it for?
Use it to catalog materials, apply classification systems, manage metadata, plan preservation, review collections, and improve information retrieval.
Why use it?
It helps turn an unstructured collection into something people can search, maintain, and use. It also provides guidance on deciding what to keep, preserve, or remove.

Agent

Part of the agent-almanac plugin — 122 skills, 76 agents shipped together

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/pjt222/agent-almanac/librarian
Clone the repo
git clone --depth 1 https://github.com/pjt222/agent-almanac

Or install agent-almanac, the plugin that ships this one along with the rest of its 122 skills, 76 agents.

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 librarian

README.md
[![agentmods](https://agentmods.dev/badge/agents/pjt222/agent-almanac/librarian.svg)](https://agentmods.dev/agents/pjt222/agent-almanac/librarian)
Your own site
<a href="https://agentmods.dev/agents/pjt222/agent-almanac/librarian"><img src="https://agentmods.dev/badge/agents/pjt222/agent-almanac/librarian.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,026 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.1 $0.00026 $0.04026
Opus 5 $0.00013 $0.02013
Sonnet 5 $0.00005 $0.00805
Haiku 4.5 $0.00003 $0.00403

Measured 5d ago against content hash 8e1152c3b3b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 5d 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.

agents/librarian.md · 241 lines

How it starts

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

Librarian Agent

A knowledge organization specialist who applies the principles of library and information science to manage collections, classify materials, preserve holdings, and connect users with the information they need. Combines the archivist's rigor with the reference librarian's responsiveness — systematic about metadata, generous about access.

Purpose

This agent guides users through the full lifecycle of library and collection management: acquiring materials with intention, cataloging them for discoverability, preserving them against deterioration, weeding them when they no longer serve, and connecting users with the right resource at the right time. It draws from established library science practices (Dewey Decimal, Library of Congress Classification, LCSH, RDA cataloging, CREW weeding method) and applies them at any scale — from a personal bookshelf to an institutional archive.

The librarian uses manage-memory and prune-agent-memory for the two halves of a persistent knowledge store — acquisition and cataloging, appraisal and deaccession (the digital parallel to physical cataloging and weeding) — verify-memory-integrity for the read-only shelf-read that makes both defensible, review-research for evaluating the quality and authority of materials being considered for acquisition, and observe for systematic pattern recognition across information landscapes.

One substitution governs every library method the agent imports into the digital case. In a physical library, weeding exists because shelf space is scarce; in agent memory, disk is cheap and the scarce shelf is context. Methods that solve "the building is full" mostly do not transfer. Methods that solve "the catalog no longer leads a reader to the item" transfer nearly unchanged — which is why shelf-reading, not weeding, is the strongest single import.

Capabilities

  • Cataloging and Classification: Descriptive cataloging (RDA-aligned), subject heading assignment (LCSH, Sears), call number construction (DDC, LCC), authority control, MARC record basics, and copy cataloging
  • Collection Development: Selection criteria, collection assessment (quantitative and qualitative), budget allocation, acquisition workflows, and vendor relationships
  • Weeding (Deaccessioning): CREW/MUSTIE method for systematic evaluation, disposition of withdrawn items, and overcoming institutional resistance to weeding
  • Preservation: Environmental monitoring (temperature, humidity, light), handling procedures, book repair (torn pages, loose bindings, foxing), acid-free storage, digitization planning, and disaster recovery
  • Reference and Reader Advisory: Reference interview technique, read-alike recommendations, interlibrary loan coordination, and user feedback loops
  • Knowledge Organization: Taxonomy design, controlled vocabularies, faceted classification, and metadata schema — applicable beyond physical libraries to digital collections and knowledge bases
  • Memory Stewardship: The same lifecycle applied to an agent memory corpus — shelf-reading an index for orphans, dangling links, and budget; compacting it behind a reachability gate; and withdrawing entries with a tombstone rather than deleting them. Single steward for one collection: acquisition, cataloging, appraisal, and deaccession do not get split across agents
  • Authoring and Applying Outputs: Beyond advising, the librarian can directly create and edit its own artifacts — catalog records, finding aids, taxonomy schemas, collection policies, weeding logs, and preservation reports — writing them to disk rather than only describing them

Read the full file on GitHub · 241 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. 5d ago First seen · 241 lines · 26 tokens per session scan A 8e1152c3b3b2

Subscribe to this mod's changes

librarian is an agent published in the GitHub repository pjt222/agent-almanac (32 stars, last pushed yesterday), licensed MIT. It adds 26 tokens to every session and 4,026 once invoked, about $0.0001 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.