Blog Notebooklm

agricidaniel/claude-blog/brain/.raw/sources/claude-blog-skill/skills/blog-notebooklm

作者 agricidaniel2500d4c76503MIT2.3K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫昨天更新

Query Google NotebookLM notebooks for source-grounded, citation-backed answers from user-uploaded documents. Manages notebook library, handles Google authentication, and supports smart discovery. Works standalone via /blog notebooklm or internally from blog-write and blog-researcher for source-grounded research context. Falls back gracefully when not configured. Use when user says "notebooklm", "notebook", "query notebook", "ask notebook", "notebook research", "source grounded research", "document query", "notebook library".

AI 產生的概覽

查詢 Google NotebookLM 筆記本,從使用者上傳的文件取得附引用的答案,並管理筆記本庫與驗證。

功能
此技能讓代理查詢 Google NotebookLM 筆記本,並回傳以使用者上傳文件為依據、附有引用來源的答案。它管理本機筆記本庫(新增、列出、搜尋、啟用、移除、統計),透過可見的瀏覽器完成一次性 Google 驗證,並提供先查詢筆記本內容再進行編目的探索流程。它也可被部落格寫作或部落格研究流程內部呼叫以提供研究脈絡,在驗證或查詢不可用時靜默回傳。
適用情境
當使用者想針對自己的 NotebookLM 筆記本提問、管理筆記本庫,或從上傳文件中取得有來源依據的研究脈絡時使用。它也適合由 blog-write 或 blog-researcher 內部呼叫,以提供附引用的研究素材。
執行需求
需要可存取 NotebookLM 的 Google 帳號、Python 3.11+(run.py 包裝器會自動建立虛擬環境),以及 Google Chrome(首次執行時透過 Patchright 自動安裝)。需要一次性互動式 Google 登入,且此技能附帶指令碼,必須透過 python3 scripts/run.py 呼叫。需要網路存取;免費 Google 帳號每日上限 50 次查詢,且僅能在本機 Claude Code 中執行。

Blog NotebookLM: Source-Grounded Research from Your Documents

Query Google NotebookLM notebooks directly from Claude Code for citation-backed answers from Gemini. Each question opens a headless browser session, retrieves the answer from your uploaded documents, and closes. Responses are source-grounded model answers, not proof of truth: uploaded documents may be primary or secondary, and the answer can still omit context.

Answers satisfy the FLOW evidence triple only when the returned citation includes a verifiable underlying source URL plus a publication or retrieval date. Use the underlying source title as the inline citation. Do not cite the private NotebookLM URL as the bibliography entry for public content.

Quick Reference

CommandWhat it does
/blog notebooklm ask <question>Query a notebook for source-grounded answers
/blog notebooklm discover <url>Smart-discover notebook content before cataloging
/blog notebooklm library listList all notebooks in library
/blog notebooklm library add <url>Add a notebook to library
/blog notebooklm library search <query>Search notebooks by keyword
/blog notebooklm library remove <id>Remove a notebook from library
/blog notebooklm setupOne-time Google authentication (browser visible)
/blog notebooklm statusCheck authentication status
/blog notebooklm cleanupClean browser state (preserves library)

Prerequisites

  • Google account with NotebookLM access
  • Python 3.11+ (venv managed automatically by run.py)
  • Google Chrome (installed automatically on first run via Patchright)
  • One-time authentication setup (interactive Google login in visible browser)

Always Use run.py Wrapper

NEVER call scripts directly. ALWAYS use python3 scripts/run.py [script]:

bash
# CORRECT:python3 scripts/run.py auth_manager.py statuspython3 scripts/run.py ask_question.py --question "..."
# Do not call files under scripts/ directly. The wrapper owns venv setup.

The run.py wrapper automatically creates .venv, installs dependencies, sets up Chrome, and executes the target script.

Auth Check (Gate Pattern)

Before any query operation, check authentication:

bash
python3 scripts/run.py auth_manager.py status
  • If authenticated: proceed with the query
  • If not authenticated: inform user and guide to setup: "NotebookLM requires Google login. Run /blog notebooklm setup to authenticate."
  • When called internally (from blog-write or blog-researcher): return silently with no error if not authenticated. Never block the writing workflow.

Setup Workflow

For /blog notebooklm setup:

bash
# Opens a visible browser for manual Google login (one-time)python3 scripts/run.py auth_manager.py setup

Tell the user: "A browser window will open. Please log in to your Google account." Authentication persists via browser profile + cookie injection (hybrid approach).

Other auth commands:

bash
python3 scripts/run.py auth_manager.py status   # Check authpython3 scripts/run.py auth_manager.py reauth   # Re-authenticatepython3 scripts/run.py auth_manager.py clear     # Clear all auth data

Query Workflow

For /blog notebooklm ask <question>:

Step 1: Check Auth

Run auth check (see gate pattern above). If not authenticated, guide to setup.

Step 2: Resolve Notebook

Determine which notebook to query:

  • If --notebook-url provided: validate it is a NotebookLM notebook URL, then use it
  • If --notebook-id provided: look up in library
  • If neither: use active notebook from library
  • If no active notebook: show library and ask user to select

Step 3: Ask the Question

bash
# Basic query (uses active notebook)python3 scripts/run.py ask_question.py --question "Your question here"
# Query specific notebook by IDpython3 scripts/run.py ask_question.py --question "..." --notebook-id notebook-id
# Query by URL directlypython3 scripts/run.py ask_question.py --question "..." --notebook-url "https://..."
# JSON output (for internal/programmatic use)python3 scripts/run.py ask_question.py --question "..." --json
# Show browser for debuggingpython3 scripts/run.py ask_question.py --question "..." --show-browser

Step 4: Analyze and Follow Up

Every response ends with a follow-up prompt. Required behavior:

  1. STOP: do not immediately respond to the user
  2. ANALYZE: compare the answer to the user's original request
  3. IDENTIFY GAPS: determine if more information is needed
  4. ASK FOLLOW-UP: if gaps exist, immediately ask a follow-up question
  5. REPEAT: continue until information is complete
  6. SYNTHESIZE: combine all answers before responding to the user

Smart Discovery Workflow

For /blog notebooklm discover <url>:

When adding a notebook without knowing its content, query it first:

bash
# Step 1: Discover contentpython3 scripts/run.py ask_question.py \  --question "What is the content of this notebook? What topics are covered? Provide a complete overview briefly and concisely" \  --notebook-url "<URL>"
# Step 2: Add with discovered metadatapython3 scripts/run.py notebook_manager.py add \  --url "<URL>" \  --name "<Based on content>" \  --description "<Based on content>" \  --topics "<Extracted topics>"

NEVER guess or use generic descriptions. Always discover or ask the user.

Library Management

bash
# List all notebookspython3 scripts/run.py notebook_manager.py list
# Add notebook (all params required -- discover or ask user!)python3 scripts/run.py notebook_manager.py add \  --url "https://notebooklm.google.com/notebook/..." \  --name "Descriptive Name" \  --description "What this notebook contains" \  --topics "topic1,topic2,topic3"
# Search by keywordpython3 scripts/run.py notebook_manager.py search --query "keyword"
# Set active notebookpython3 scripts/run.py notebook_manager.py activate --id notebook-id
# Remove notebookpython3 scripts/run.py notebook_manager.py remove --id notebook-id
# Library statisticspython3 scripts/run.py notebook_manager.py stats

Internal API (for blog-write / blog-researcher)

When invoked as a Task subagent from blog-write or blog-researcher:

Input (provided by calling skill):

  • question: Research question relevant to the blog topic
  • notebook_id or notebook_url: Which notebook to query
  • context: "internal" (signals graceful fallback mode)

Process:

  1. Check auth status: if not authenticated, return empty result silently
  2. Query the notebook with the research question
  3. Parse and return structured response

Output (returned to calling skill):

markdown
### NotebookLM Research- **Source:** [Notebook name]- **Question:** [What was asked]- **Answer:** [Source-grounded response from user's documents]- **Underlying Source:** [Public source URL or document identifier]- **Underlying Source Date:** [Publication date or retrieval date]- **Source Quality:** [Tier 1-3 after classifying the underlying document]

Graceful fallback: If auth is missing or query fails, return immediately with no error. The calling workflow continues with WebSearch-based research. Never block blog-write or blog-rewrite because NotebookLM is unavailable.

Data Storage

All data stored inside the skill directory:

  • data/library.json: Notebook metadata and library
  • data/auth_info.json: Authentication status
  • data/browser_state/: Chrome profile with cookies

Security: All data directories are gitignored. Never commit auth or browser state.

Error Handling

ErrorResolution
Not authenticatedRun /blog notebooklm setup
ModuleNotFoundErrorAlways use run.py wrapper
Browser crashcleanup_manager.py --confirm --preserve-library, then re-auth
Rate limit (50/day)Wait until midnight PST or switch Google account
Notebook not foundCheck with notebook_manager.py list
Query timeout (120s)Retry with simpler question or --show-browser to debug
MCP unavailable (internal)Return silently: writing workflow uses WebSearch

Limitations

  • No session persistence (each question = new browser session)
  • Rate limits on free Google accounts (50 queries/day)
  • Manual upload required (user must add docs to NotebookLM web UI)
  • Browser overhead (few seconds per question for launch + teardown)
  • Local Claude Code only (not available in web UI)

Reference Documentation

Load on-demand: do NOT load all at startup:

  • references/commands.md: Full CLI commands, parameters, and workflow patterns
  • references/troubleshooting.md: Error solutions, recovery procedures, debugging

來源與署名

來源:agricidaniel/claude-blog位於brain/.raw/sources/claude-blog-skill/skills/blog-notebooklm提交2500d4c

授權條款: MIT

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架

更多來自 agricidaniel/claude-blog 的技能

Blog Taxonomy

agricidaniel

為 WordPress、Shopify、Ghost、Strapi 與 Sanity 等 CMS 平台擷取、建議、稽核並同步部落格標籤與分類。

Marketing & Sales2.3K昨天更新

Blog Cannibalization

agricidaniel

Detect keyword cannibalization across blog posts by extracting primary keywords from titles and headings, clustering semantically similar targets, and flagging posts competing for the same search intent. Supports local-only mode (grep-based) and DataForSEO API mode (Page Intersection endpoint at ~$0.01/call). Outputs severity-scored report with merge or differentiate recommendations. Use when user says "cannibalization", "keyword overlap", "competing pages", "duplicate keywords", "cannibalize".

待分類2.3K昨天更新

Blog Rewrite

agricidaniel

改寫既有部落格文章,以提升 Google SEO 與 AI 引用能見度,替換無來源數據並補強結構化元素。

Marketing & Sales2.3K昨天更新

Blog Translate

agricidaniel

Translate existing blog posts into one or more target languages with SEO-optimized localization. Produces native-quality translations that preserve markdown structure, frontmatter, schema JSON-LD, image and chart embeds, and citation capsules. Localizes keywords, meta tags, numbers, dates, currencies, and quote styles per locale. Flags machine-translation artifacts for review. Run BEFORE blog-localize: this handles language conversion; localize handles cultural adaptation after translation completes. Use when user says "translate blog", "blog translate", "uebersetzen", "traduire", "traducir", "translate post", "blog auf Deutsch", "blog en espanol".

待分類2.3K昨天更新

Blog Write

agricidaniel

Write new blog articles from scratch optimized for Google rankings and AI citations. Generates full articles with template selection, answer-first formatting, Key Takeaways summary box, information gain markers, citation capsules, sourced statistics, Pixabay/Unsplash images, built-in SVG chart generation, optional FAQ sections, internal linking zones, and proper heading hierarchy. Supports MDX, markdown, and HTML output. Use when user says "write blog", "new blog post", "create article", "write about", "draft blog", "generate blog post".

待分類2.3K昨天更新

Blog Schema

agricidaniel

Generate complete JSON-LD schema markup for blog posts with Article/BlogPosting, Person, Organization, BreadcrumbList, ImageObject, and optional FAQPage. Validates against Google requirements and warns about deprecated types. Use when user says "schema", "blog schema", "json-ld", "structured data", "schema markup", "generate schema".

待分類2.3K昨天更新