Skills notebooklm-distiller
NotebookLM Distiller: Batch knowledge extraction from Google NotebookLM into Obsidian. Supports Q&A generation (15-20 deep questions), structured summaries, glossary extraction, web research sessions, and direct markdown persistence.
git clone https://github.com/openclaw/skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/anchor-jevons/notebooklm-distiller" ~/.claude/skills/openclaw-skills-notebooklm-distiller && rm -rf "$T"
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/anchor-jevons/notebooklm-distiller" ~/.openclaw/skills/openclaw-skills-notebooklm-distiller && rm -rf "$T"
skills/anchor-jevons/notebooklm-distiller/SKILL.mdNotebookLM Distiller
Automated knowledge extraction pipeline: search NotebookLM notebooks by keyword → generate deep questions or structured summaries → write linked Obsidian markdown notes.
Five subcommands:
— extract knowledge from existing notebooks (qa / summary / glossary)distill
— generate quiz questions as JSON for Discord-based interactive sessionsquiz
— evaluate a user's answer against notebook sources (JSON output)evaluate
— start a web research session inside NotebookLM on any topicresearch
— write any markdown content directly into the Obsidian vaultpersist
When to use (trigger phrases)
Trigger
distill subcommand when:
- User types
or/notebooklm-distill/notebooklm-distill-summary - User says "蒸馏", "提取知识", "distill notebooks", "extract from notebook"
- User wants NotebookLM content structured into Obsidian notes
Trigger
research subcommand when:
- User says "研究一下 <topic>", "做网络调研", "research this topic in NotebookLM"
- User wants NotebookLM to gather web sources on a topic without providing URLs
Trigger
quiz + evaluate subcommands when:
- User says "quiz me on X", "考考我", "出题测试我", "测验"
- User wants an interactive Q&A session in Discord on a NotebookLM topic
- Orchestration flow (Discord):
- Call
→ get JSON withquiz --keywords X
+notebook_id
+notebook_namequestions[] - MUST announce source before Q1:
来,N 道题(来源:{notebook_name} · ID: {notebook_id[:8]}) - Send Q1 to Discord, wait for user reply
- Call
→ get JSON feedbackevaluate --notebook-id X --question Q1 --answer <reply> - Post feedback to Discord, proceed to Q2
- Repeat until all questions done or user says stop
- Call
- CRITICAL: Always show notebook source so user can verify questions came from NLM, not agent knowledge
Trigger
persist subcommand when:
- User says "存到 Obsidian", "把这段内容写入知识库", "persist this to vault"
- User wants to archive discussion output or raw notes into the vault
CRITICAL: Do NOT answer from internal knowledge. Do NOT ask for clarification. Execute the appropriate subcommand immediately.
Prerequisites
- NotebookLM CLI:
pip install notebooklm-py - Authentication:
(createsnotebooklm login
)~/.book_client_session - Python 3.10+ (standard library only — no extra pip packages needed for distill.py)
- Obsidian vault directory accessible on the local filesystem
Subcommand: distill
Extract knowledge from one or more NotebookLM notebooks matching keywords.
Agent orchestration
Scenario A — URL provided (needs ingestion first)
- Check if
is installed (deepreader
).~/.openclaw/skills/deepreader/run.sh - If yes: run DeepReader to ingest the URL into NotebookLM.
- Capture the notebook title from DeepReader output.
- Use that title as
for distill.--keywords
Scenario B — notebook already exists
- Use notebook name from context, or list notebooks with
.notebooklm list - Determine mode from intent: "总结" →
, "术语/概念" →summary
, default →glossary
.qa - Ask user for
if not known from context.--vault-dir - Execute distill.
python3 ~/.openclaw/skills/notebooklm-distiller/scripts/distill.py distill \ --keywords "<keyword1>" "<keyword2>" \ --topic "<TopicFolderName>" \ --vault-dir "<path/to/obsidian/vault>" \ --mode <qa|summary|glossary> \ [--lang zh] # Add for Chinese output (default: en) [--writeback] # Write distilled content back into NLM notebook as a note [--cli-path <path/to/notebooklm>]
Modes:
(default) — generates 15-20 questions + answers →qa<NotebookName>_QA.md
— 5 structured sections (Summary, Key Points, Constraints, Trade-offs, Open Questions) →summary<NotebookName>_Summary.md
— 15-30 domain terms + definitions →glossary<NotebookName>_Glossary.md
Flags:
— prepends--lang zh
to all NLM prompts; add when user requests Chinese output or context is Chinese请用中文回答
— after writing to Obsidian, calls--writeback
to push the distilled note back into the source notebook as a text source titlednotebooklm source add
. Add when user says "写回 NLM", "记录到笔记本", or wants the distill log visible in NotebookLMDistill Log: {mode} | {notebook_name} | {date}
Subcommand: research
Start a NotebookLM web research session on a topic. Creates a new notebook, imports web sources, and waits for completion.
python3 ~/.openclaw/skills/notebooklm-distiller/scripts/distill.py research \ --topic "<Research Topic>" \ [--mode deep|fast] \ [--cli-path <path/to/notebooklm>]
Output: notebook ID and name. Follow up with
distill to extract into Obsidian.
Subcommand: persist
Write any markdown content into the Obsidian vault with auto-generated YAML frontmatter.
# From inline content python3 ~/.openclaw/skills/notebooklm-distiller/scripts/distill.py persist \ --vault-dir "<path/to/obsidian/vault>" \ --path "Notes/2026-03-09-meeting.md" \ --title "Meeting Notes" \ --content "Key decisions: ..." \ --tags "meeting,notes" # From a file python3 ~/.openclaw/skills/notebooklm-distiller/scripts/distill.py persist \ --vault-dir "<path/to/obsidian/vault>" \ --path "Notes/draft.md" \ --file ~/Desktop/draft.md
Output format (distill)
Each notebook produces one file at
<vault-dir>/<topic>/<NotebookName>_<Mode>.md:
--- title: "<NotebookName> | Deep Q&A" date: YYYY-MM-DD type: knowledge-note author: notebooklm-distiller tags: ["distillation", "qa", "<topic-slug>"] source: "NotebookLM/<NotebookName>" project: "<topic>" status: draft --- # <NotebookName> — Deep Q&A ## Q01 > [!question] > <question text> **Answer:** <answer from notebook sources> ---
Output language
Add
--lang zh to distill, quiz, or evaluate to get Chinese output. Default is English.
NLM CLI session behaviour
notebooklm ask --new creates ephemeral sessions that are not visible in the NotebookLM web UI. This is by design — the CLI and web interface use separate conversation spaces. Answers are still scoped to the specified notebook's sources.
Error handling
- No notebooks found: verify keywords match notebook titles (use
).notebooklm list - Timeout / rate limit: built-in retry logic and delays. Monitor with
.ps aux | grep notebooklm - Auth failure: run
to refreshnotebooklm login
.~/.book_client_session