librarian

An agent for organizing and maintaining an Obsidian vault, a folder of linked notes. It reviews folder structure, note metadata, naming, tags, and links before suggesting changes.

In plain words
What is it for?
Use it to audit folders, clean up frontmatter, find orphan notes, review tags, and propose safer note moves or reorganizations.
Why use it?
It helps reveal misplaced notes, inconsistent information, and isolated pages while keeping reorganizations deliberate and reversible.

Agent

Part of the obsidian-rag plugin — 13 skills, 2 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/thoreinstein/obsidian-rag/librarian
Clone the repo
git clone --depth 1 https://github.com/thoreinstein/obsidian-rag

Or install obsidian-rag, the plugin that ships this one along with the rest of its 13 skills, 2 agents.

Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 426 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.00031 $0.00426
Opus 5 $0.00015 $0.00213
Sonnet 5 $0.00006 $0.00085
Haiku 4.5 $0.00003 $0.00043

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

agents/librarian.md · 42 lines

What it actually says

Vault librarian specializing in organization, maintenance, and knowledge structure.

Capabilities

  • Audit folder structure — List notes, identify inconsistent naming or misplaced files
  • Frontmatter cleanup — Find notes with missing or inconsistent frontmatter fields
  • Orphan detection — Find notes with no incoming or outgoing links
  • Tag analysis — Survey tags in use, find inconsistencies
  • Reorganization — Move notes to better locations, update frontmatter

Guidelines

  • Always explain proposed changes before making them
  • Present a plan and get approval before moving or modifying notes
  • When moving notes, warn that wikilinks from other notes may break
  • Prefer small, reversible changes over large reorganizations
  • Report findings clearly with specific file paths
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 · 31 tokens per session scan A b2a922b3ee04

Subscribe to this mod's changes

librarian is an agent published in the GitHub repository thoreinstein/obsidian-rag (2 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session and 426 once invoked, about $0.0002 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

issue-tracker

Issues for this repo live in Linear, on the The 13th Letter team (identifier prefix THE-). Pull requests live on GitHub (The-40-Thieves/obsidian-tc) and are not the issue tracker — see Pull requests below for how the two relate.

The-40-Thieves/obsidian-tc · 0 tokens

premise-verifier

Read-only verifier for a claim about this codebase — a Linear ticket's premise, a cited file:line, a quoted count, or a code comment vouching for an invariant. Returns CONFIRMED / PARTLY STALE / REFUTED with file:line evidence. Never edits.

The-40-Thieves/obsidian-tc · 65 tokens

domain

How the engineering skills should consume this repo's domain documentation when exploring the codebase.

The-40-Thieves/obsidian-tc · 0 tokens

triage-labels

The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker (Linear, team The 13th Letter — see issue-tracker.md).

The-40-Thieves/obsidian-tc · 0 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

security-reviewer

Use proactively when attacker-controlled input, trust boundaries, authorization decisions, sensitive sinks, secrets, or security-impacting changes require exploitability analysis. Do not use for generic correctness review without a meaningful security boundary.

zebbern/claude-code-guide · 45 tokens