notebooklm

notebooklm is a command for Claude Code from eugeniughelbur/obsidian-second-brain. It costs 35 tokens per session (1,120 once invoked), scanned A, original, MIT.

A command for source-grounded research using notes from an Obsidian vault and Gemini File Search.

In plain words
What is it for?
Use it to research a topic from up to 12 relevant vault notes, save the synthesis as a dated Markdown note, and pass it to the vault's note-saving workflow.
Why use it?
It creates a research summary based on relevant files in the vault without using a web browser, then saves and propagates the result.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents; positional $N argument.

Part of the obsidian-second-brain plugin — 1 skill, 47 commands, 3 hooks shipped together

Good fit Use it to research a topic from up to 12 relevant vault notes, save the synthesis as a dated Markdown note, and pass it to the vault's note-saving workflow.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/eugeniughelbur/obsidian-second-brain/notebooklm
About the project

obsidian-second-brain turns an Obsidian vault into persistent, searchable memory for Claude Code and other command-line coding agents, storing knowledge as linked Markdown notes. It is for developers, founders, writers, and researchers who want agents to retain project context across sessions. Its catalogue entries provide commands, hooks, a plugin, a skill, and instructions for capturing, finding, and maintaining that memory.

eugeniughelbur/obsidian-second-brain · 4,364 stars · on GitHub · eugeniughelbur.github.io

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.

Clone the repo
git clone --depth 1 https://github.com/eugeniughelbur/obsidian-second-brain

Made for: Claude Code.

Or install obsidian-second-brain, the plugin that ships this one along with the rest of its 1 skill, 47 commands, 3 hooks.

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 notebooklm

README.md
[![agentmods](https://agentmods.dev/badge/commands/eugeniughelbur/obsidian-second-brain/notebooklm.svg)](https://agentmods.dev/commands/eugeniughelbur/obsidian-second-brain/notebooklm)
Your own site
<a href="https://agentmods.dev/commands/eugeniughelbur/obsidian-second-brain/notebooklm"><img src="https://agentmods.dev/badge/commands/eugeniughelbur/obsidian-second-brain/notebooklm.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 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,120 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00035 $0.01120
Opus 5 $0.00017 $0.00560
Sonnet 5 $0.00007 $0.00224
Haiku 4.5 $0.00003 $0.00112

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

Security

Grade A, and why

notebooklm 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 9d 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.

commands/notebooklm.md · 54 lines

What it actually says

Use the obsidian-second-brain skill. Execute /notebooklm [topic]:

  1. Resolve the topic from the user's argument. If no topic, ask: "What topic for source-grounded research?"

  2. Run the script from the skill root (its absolute path was given at session start as Skill root; substitute it for SKILL_ROOT):

    uv run --directory "SKILL_ROOT" -m scripts.research.notebooklm --topic "<topic>"
    
  3. The script does the whole flow end-to-end:

    • Scans the vault for the top 12 relevant notes (same shape as /research-deep Phase 1).
    • Uploads them to a fresh Gemini File Search store.
    • Asks Gemini (default gemini-2.5-flash, override via NOTEBOOKLM_MODEL env) for a synthesis grounded against those sources.
    • Writes the AI-first synthesis to Research/NotebookLM/YYYY-MM-DD - <slug>.md.
    • Deletes the File Search store so nothing is left behind.
    • Emits a <<<NOTEBOOKLM_PROPAGATION_PAYLOAD>>> JSON block.
  4. After save, do the propagation step. Same flow as /research-deep:

    • Parse the propagation payload.
    • Read the saved synthesis at saved_note.
    • Treat the synthesis as the "conversation context" input to /obsidian-save.
    • Run the standard /obsidian-save flow: spawn parallel subagents (People, Projects, Tasks, Decisions, Ideas) and update vault notes per any "Recommended next reads or angles" bullets if they map to entities or projects.
    • Link the new synthesis note from today's daily note.
  5. Report back to the user: "Saved [[YYYY-MM-DD - ]] to Research/NotebookLM/. Linked from today's daily note. Updated [[X]], created [[Y]]."

  6. Plain English triggers: "notebooklm this", "ground research on X using my vault", "source-grounded research on X", "ask my own notes about X".

  7. When to choose /notebooklm over /research-deep:

    • /research-deep (Perplexity + Grok): when you want OPEN-WEB + X-discourse coverage. Cost: $0.20-0.80.
    • /notebooklm (Gemini File Search): when you want answers GROUNDED IN your own vault. Cost: ~$0.01-0.05.
    • Run both for high-value topics. The web view and the grounded view rarely contradict, and the contradictions are where the insight is.
  8. Configuration: requires GEMINI_API_KEY in ~/.config/obsidian-second-brain/.env. Get one free at https://aistudio.google.com/apikey. Optional NOTEBOOKLM_MODEL override (default gemini-2.5-flash).


AI-first rule: Every note created or updated by this command MUST follow references/ai-first-rules.md. If that path does not resolve from your working directory, search upward for it; if you still cannot read it, say so before writing rather than producing a note that silently skips the rule. The saved synthesis at Research/NotebookLM/YYYY-MM-DD - <slug>.md follows the template baked into the script (preamble, frontmatter, vault-baseline links, response verbatim). Do not strip those.

Anti-fabrication: Search exhaustively before claiming any note, person, or file is absent - false absence is the most common failure mode - and never invent facts, entities, or dates (mark unknowns as TBD). See the anti-fabrication and search-completeness hard rules in references/ai-first-rules.md.

Why Gemini File Search and not the browser: NotebookLM has no public API for personal Google accounts. Gemini File Search (generally available, plain API key, same Gemini model family) gives the same architectural shape: source-grounded retrieval, multi-document context, citation-style synthesis. One HTTP call, no manual paste step.

Cost: $0.15 per million tokens indexed, storage free, generation at standard Gemini token rates. For a 12-note vault bundle (~30K tokens), expect $0.01-0.05 per run.

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. 9d ago First seen · 54 lines · 35 tokens per session scan A 2e21c85a80ad

Subscribe to this mod's changes

notebooklm is a command published in the GitHub repository eugeniughelbur/obsidian-second-brain (4,364 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 1,120 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-30.