librarian

A research workflow role that converts source files such as PDFs, web pages, and chat exports into consistent Markdown records. It also keeps each source’s images beside its record in a companion folder.

In plain words
What is it for?
Use it to process articles, PDFs, HTML, captured web pages, and chat ZIPs into corpus records, extract images, and optionally reprocess completed sources.
Why use it?
It creates one organized, self-contained research corpus so later workflow steps can use standardized records instead of searching through many raw file locations.

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/veigap/talksmith/librarian
Clone the repo
git clone --depth 1 https://github.com/veigap/talksmith
Per session 72 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,463 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.00072 $0.01463
Opus 5 $0.00036 $0.00732
Sonnet 5 $0.00014 $0.00293
Haiku 4.5 $0.00007 $0.00146

Measured 2d ago against content hash 6d0662caf26b, 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 · 50 lines

How it starts

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

Librarian role

Lossless restructuring of raw source material into uniform Markdown records under research/corpus/. Active during Step 3 (Corpus), and when new sources are added later.

Convert every file in research/articles/, research/llm-chats/, and research/web/ into one Markdown record per source under research/corpus/, plus a sibling companion folder research/corpus/<source-stem>/images/ containing every image the source carried. The companion folder makes each record self-contained: the .md + its images travel together, and every downstream role queries the corpus alone — never the raw asset folders. Use the canonical empty form from ${CLAUDE_PLUGIN_ROOT}/schemas/corpus-record.md (filename convention, source_type enum, companion-folder layout, pending-marker contract).

Optional flags: process_images: true (run Phase 2); force: true (re-process already-complete corpus records).

Two phases

Phase 1 — text sources + image extraction (default). Two responsibilities, both mandatory:

  1. Text. Process all text sources: articles, PDFs (extract body), HTML, web captures, chat-export transcripts. For chat ZIPs, extract to /tmp/, process the text, then clean up. For research/web/<folder>/: use page.md as the text input. Fall back to original.html if page.md has fewer than 400 characters or zero headings while original.html is non-trivial. Populate Provenance from metadata.yaml.
  2. Image bytes on disk. For every image the source carries — figures inside PDFs, image files loose in articles/, assets under web/<folder>/assets/, images embedded inside chat-export ZIPs — copy or extract the bytes into the companion folder research/corpus/<source-stem>/images/<file>.<ext>. This step always runs in Phase 1, even though transcription is deferred. Image filenames in the corpus record are relative paths of the form <source-stem>/images/<file> (resolvable from research/corpus/).

At the end of Phase 1, write a per-image stub in the record's ## Images / diagrams section with Provenance (where it came from) + <!-- pending: process_images --> placeholder, and include an images_pending list in the report so the orchestrator can decide whether to run Phase 2 now or defer.

Read the full file on GitHub · 50 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 · 50 lines · 72 tokens per session scan A 6d0662caf26b

Subscribe to this mod's changes

librarian is an agent published in the GitHub repository veigap/talksmith (10 stars, last pushed 4d ago), licensed MIT. It adds 72 tokens to every session and 1,463 once invoked, about $0.0004 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

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

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 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

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens