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 ↓
About the project

CORAL is infrastructure for autonomous coding agents that run experiments on a codebase, have their work graded, share knowledge, and evolve solutions across repeated attempts. It is used for autoresearch workflows with agents such as Claude Code, OpenCode, Codex, Cursor Agent, and Kiro. The catalogue entries provide skills, agents, instructions, a plugin, and a hook for operating these workflows.

Human-Agent-Society/CORAL · 1,155 stars · on GitHub · coral.compounding-intelligence.ai

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/github.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/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 librarian

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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.5 $0.00017 $0.00290
Sonnet 5.5 $0.00008 $0.00145
Haiku 4.5 $0.00004 $0.00072

Measured 3mo ago against content hash 488e1b3a474f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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. 3mo 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 (1,155 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 42 tokens to every session and 724 once invoked, about $0.0002 per session on Opus 5.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

librarian compared with agents from other repositories

librarian next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
librarianHuman-Agent-Society/CORALAgent1.2k1mo agoApache-2.0B42Claude Code
learning-dreamerapp-vitals/shipwrightAgent16todayMITA78Claude Code
contextSummaryrojim666/SztuCodeAgent11018d agoMITA14Claude Code
memorySelectorrojim666/SztuCodeAgent11018d agoMITA11Claude Code
summaryGeneratorrojim666/SztuCodeAgent11018d agoMITA10Claude Code
wiki-ingestkarlorz/llm-wikiAgent5todaynoneA64Claude Code
playwright-test-generatormicrosoft/playwrightAgent101ktodayApache-2.0A151Claude Code