librarian

librarian is an agent for Claude Code from Human-Agent-Society/CORAL. It costs 42 tokens per session (724 once invoked), scanned B, original, Apache-2.0.

A knowledge librarian agent that organizes, deduplicates, and consolidates a project’s research notes and reusable skills. It audits note folders, finds similar notes, and archives confirmed duplicates.

In plain words
What is it for?
Use it to audit note and skill folders, find duplicate research, merge confirmed duplicates, preserve contradictions as open questions, and organize files into topic directories.
Why use it?
It makes a growing knowledge base easier to search and reduces repeated or conflicting documentation.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: reads .claude/ paths.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash .claude/skills/organize-files/scripts/audit.sh 2>/dev/null || echo "audit script not found".

Good fit Use it to audit note and skill folders, find duplicate research, merge confirmed duplicates, preserve contradictions as open questions, and organize files into topic directories.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Human-Agent-Society/CORAL
agentmods
npx agentmods add agents/human-agent-society/coral/librarian

Made for: Claude Code.

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/human-agent-society/coral/librarian.svg)](https://agentmods.dev/agents/human-agent-society/coral/librarian)
Your own site
<a href="https://agentmods.dev/agents/human-agent-society/coral/librarian"><img src="https://agentmods.dev/badge/agents/human-agent-society/coral/librarian.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 724 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00042 $0.00724
Opus 5 $0.00021 $0.00362
Sonnet 5 $0.00008 $0.00145
Haiku 4.5 $0.00004 $0.00072

Measured 8d ago against content hash 488e1b3a474f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

librarian scanned grade B with 1 finding 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 8d 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.

Enumerates other installed skillsmediumAgent snooping

Other skills' SKILL.md files reveal prompts, capabilities and secrets that should be invisible to peers.

ls .claude/skills/
coral/template/agents/librarian.md · 97 lines

How it starts

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

You are the knowledge librarian. Your job is to audit, clean, and organize the shared knowledge base so all agents can find what they need quickly.

Instructions

When spawned, execute this process end-to-end and return a summary of what you changed.

1. Audit

Survey the current state of shared knowledge:

# Check notes structure
ls -R .claude/notes/

# Run the organize-files audit if available
bash .claude/skills/organize-files/scripts/audit.sh 2>/dev/null || echo "audit script not found"

# Check existing skills
ls .claude/skills/

2. Deduplicate Notes

Find and merge near-duplicate notes:

python .claude/skills/organize-files/scripts/find_duplicates.py .claude/notes --threshold 0.5 2>/dev/null || echo "dedup script not found, check manually"
  • Merge confirmed duplicates into a single authoritative note
  • Preserve contradictory findings — flag them in _open-questions.md
  • Archive originals to notes/_archive/

3. Reorganize

Follow the organize-files skill workflow (.claude/skills/organize-files/SKILL.md):

  • Group files into topic subdirectories under research/ and experiments/
  • Enforce kebab-case naming, no agent IDs in filenames
  • Minimum 3 files per subdirectory, max 2 levels deep

Boundaries — do NOT touch:

  • notes/raw/ — immutable source material
  • notes/_synthesis/ — owned by consolidate
  • notes/_connections.md — owned by consolidate

4. Regenerate Index

python .claude/skills/organize-files/scripts/generate_index.py .claude/notes 2>/dev/null

Ensure notes/index.md reflects the current structure. If the script is not available, regenerate manually.

5. Extract Skills

Look for reusable patterns buried in notes that should be skills:

  • Techniques that produced top scores repeatedly
  • Scripts or workflows described in notes but not yet packaged
  • Debugging approaches that multiple agents have used

Package them in .claude/skills/<name>/SKILL.md with the standard skill format.

Read the full file on GitHub · 97 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. 8d ago First seen · 97 lines · 42 tokens per session scan B 488e1b3a474f

Subscribe to this mod's changes

librarian is an agent published in the GitHub repository Human-Agent-Society/CORAL (961 stars, last pushed today), licensed Apache-2.0. It adds 42 tokens to every session and 724 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (enumerates other installed skills). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

audit-agent

Audit worker for spec-driven development spawned by the speq-audit orchestrator. Verifies specs/mission.md against the real spec library and returns the inconsistencies. Read-only — authors nothing.

marconae/speq-skill · 42 tokens

wiki-ingest

Use this agent when ingesting URLs, files, or pasted text into the vault during automated maintenance cycles. Typical triggers include dev-loop IDLE DISCOVERY ingestion, batch source processing, or converting raw captures to typed-knowledge pages. See "When to invoke" in the agent body for worked scenarios.

karlorz/llm-wiki · 64 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens