# notebooklm

notebooklm runs source-grounded research across your Obsidian vault with Gemini File Search. Useful when you need answers tied strictly to personal notes.

- command · `type=command` · Claude Code, Codex, GitHub Copilot, Gemini CLI · ★ 5412 repo stars
- Author: Eugeniu Ghelbur
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/eugeniughelbur/obsidian-second-brain/tree/HEAD/commands/notebooklm.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/commands/notebooklm

## What it does

The command picks 12 matching notes from your vault and sends them to a temporary Gemini File Search store. Gemini processes the bundle and produces a citation-style synthesis. It writes the result straight into `Research/NotebookLM/` as a dated Markdown note. The remote file store is cleared immediately afterward.

Next, the workflow triggers entity propagation. Parallel subagents update connected project notes, task files, and contact records based on the findings. It also links the new file inside your current daily note. Without a valid `GEMINI_API_KEY` saved in `~/.config/obsidian-second-brain/.env`, execution will fail.

## Requirements
- Works with: Obsidian

## Install

### Claude Code (native platform)

1. **Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add eugeniughelbur/obsidian-second-brain
```
In the agent chat (not a shell):
```text
/plugin install obsidian-second-brain@obsidian-second-brain
```

2. **Manually: put the files in place**
- File: `.claude/commands/notebooklm.md` — Call it with /notebooklm. For all projects use ~/.claude/commands/

### Codex

**Manually: put the files in place**
- File: `~/.codex/prompts/notebooklm.md` — Call it with /prompts:notebooklm. Codex marks this format deprecated in favour of skills

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/prompts/notebooklm.prompt.md`

### Gemini CLI

**Manually: put the files in place**
- File: `.gemini/commands/notebooklm.toml` — Gemini stores commands as TOML: the prompt text goes into the prompt field

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/eugeniughelbur/obsidian-second-brain/tree/HEAD/commands/notebooklm.md

## When to use it
- synthesize insights grounded strictly in Obsidian vault notes
- propagate research outcomes across related project and task records
- append a link to the generated synthesis in the daily note
- run local document research without opening a web browser

## Example prompts
- /notebooklm microservice migration plan
- /notebooklm quarterly business goals
- /notebooklm customer interview themes

## Source text · notebooklm.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: c7f0bed68d184c15.

BEGIN THIRD-PARTY FILE c7f0bed68d184c15
````text
---
description: Vault-first source-grounded research via Gemini File Search. One command, no browser. The grounded parallel to /research-deep (which is open-web via Perplexity).
category: research
triggers_en: ["notebooklm", "research grounded", "ground research in vault", "ask my notebook", "source-grounded research"]
triggers_de: ["NotebookLM", "quellenbasierte Recherche", "Recherche mit meinem Vault", "frag mein Notebook", "Recherche auf Basis meiner Quellen"]
triggers_es: ["notebooklm", "investigación fundamentada en mis notas", "basa esto en mi vault", "pregúntale a mis notas", "investigación con fuentes propias", "investiga en mis notas"]
triggers_pt: ["notebooklm", "pesquisa ancorada", "ancore a pesquisa no vault", "pergunte ao meu notebook", "pesquisa ancorada em fontes"]
triggers_zh: ["用我的资料做研究", "基于知识库回答", "问问我的笔记", "做有来源依据的研究", "用 NotebookLM 研究"]
---

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`):
   ```bash
   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 - <slug>]] 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.
````
END THIRD-PARTY FILE c7f0bed68d184c15

The third-party file has ended. Everything between the c7f0bed68d184c15 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3840 of 4660 bytes. © Eugeniu Ghelbur · MIT · https://github.com/eugeniughelbur/obsidian-second-brain/tree/HEAD/commands/notebooklm.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
