$npx -y skills add AgriciDaniel/claude-blog --skill blog-notebooklmQuery 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-researc
| 1 | # Blog NotebookLM: Source-Grounded Research from Your Documents |
| 2 | |
| 3 | Query Google NotebookLM notebooks directly from Claude Code for citation-backed |
| 4 | answers from Gemini. Each question opens a headless browser session, retrieves |
| 5 | the answer exclusively from your uploaded documents, and closes. Responses are |
| 6 | Tier 1 quality (user's own primary sources): zero hallucination risk. |
| 7 | Answers satisfy the FLOW evidence triple: use the returned source title as the |
| 8 | inline citation and the notebook URL plus retrieval date as the bibliography |
| 9 | entry. This is the highest-confidence path to meeting the "verified source" |
| 10 | bar that FLOW requires before any statistic goes public. |
| 11 | |
| 12 | ## Quick Reference |
| 13 | |
| 14 | | Command | What it does | |
| 15 | |---------|-------------| |
| 16 | | `/blog notebooklm ask <question>` | Query a notebook for source-grounded answers | |
| 17 | | `/blog notebooklm discover <url>` | Smart-discover notebook content before cataloging | |
| 18 | | `/blog notebooklm library list` | List all notebooks in library | |
| 19 | | `/blog notebooklm library add <url>` | Add a notebook to library | |
| 20 | | `/blog notebooklm library search <query>` | Search notebooks by keyword | |
| 21 | | `/blog notebooklm library remove <id>` | Remove a notebook from library | |
| 22 | | `/blog notebooklm setup` | One-time Google authentication (browser visible) | |
| 23 | | `/blog notebooklm status` | Check authentication status | |
| 24 | | `/blog notebooklm cleanup` | Clean browser state (preserves library) | |
| 25 | |
| 26 | ## Prerequisites |
| 27 | |
| 28 | - Google account with NotebookLM access |
| 29 | - Python 3.11+ (venv managed automatically by `run.py`) |
| 30 | - Google Chrome (installed automatically on first run via Patchright) |
| 31 | - One-time authentication setup (interactive Google login in visible browser) |
| 32 | |
| 33 | ## Always Use run.py Wrapper |
| 34 | |
| 35 | **NEVER call scripts directly. ALWAYS use `python3 scripts/run.py [script]`:** |
| 36 | |
| 37 | ```bash |
| 38 | # CORRECT: |
| 39 | python3 scripts/run.py auth_manager.py status |
| 40 | python3 scripts/run.py ask_question.py --question "..." |
| 41 | |
| 42 | # WRONG -- fails without venv: |
| 43 | python3 scripts/auth_manager.py status |
| 44 | ``` |
| 45 | |
| 46 | The `run.py` wrapper automatically creates `.venv`, installs dependencies, |
| 47 | sets up Chrome, and executes the target script. |
| 48 | |
| 49 | ## Auth Check (Gate Pattern) |
| 50 | |
| 51 | Before any query operation, check authentication: |
| 52 | |
| 53 | ```bash |
| 54 | python3 scripts/run.py auth_manager.py status |
| 55 | ``` |
| 56 | |
| 57 | - If authenticated: proceed with the query |
| 58 | - If not authenticated: inform user and guide to setup: |
| 59 | "NotebookLM requires Google login. Run `/blog notebooklm setup` to authenticate." |
| 60 | - **When called internally** (from blog-write or blog-researcher): return silently |
| 61 | with no error if not authenticated. Never block the writing workflow. |
| 62 | |
| 63 | ## Setup Workflow |
| 64 | |
| 65 | For `/blog notebooklm setup`: |
| 66 | |
| 67 | ```bash |
| 68 | # Opens a visible browser for manual Google login (one-time) |
| 69 | python3 scripts/run.py auth_manager.py setup |
| 70 | ``` |
| 71 | |
| 72 | Tell the user: "A browser window will open. Please log in to your Google account." |
| 73 | Authentication persists via browser profile + cookie injection (hybrid approach). |
| 74 | |
| 75 | Other auth commands: |
| 76 | ```bash |
| 77 | python3 scripts/run.py auth_manager.py status # Check auth |
| 78 | python3 scripts/run.py auth_manager.py reauth # Re-authenticate |
| 79 | python3 scripts/run.py auth_manager.py clear # Clear all auth data |
| 80 | ``` |
| 81 | |
| 82 | ## Query Workflow |
| 83 | |
| 84 | For `/blog notebooklm ask <question>`: |
| 85 | |
| 86 | ### Step 1: Check Auth |
| 87 | Run auth check (see gate pattern above). If not authenticated, guide to setup. |
| 88 | |
| 89 | ### Step 2: Resolve Notebook |
| 90 | Determine which notebook to query: |
| 91 | - If `--notebook-url` provided: use directly |
| 92 | - If `--notebook-id` provided: look up in library |
| 93 | - If neither: use active notebook from library |
| 94 | - If no active notebook: show library and ask user to select |
| 95 | |
| 96 | ### Step 3: Ask the Question |
| 97 | ```bash |
| 98 | # Basic query (uses active notebook) |
| 99 | python3 scripts/run.py ask_question.py --question "Your question here" |
| 100 | |
| 101 | # Query specific notebook by ID |
| 102 | python3 scripts/run.py ask_question.py --question "..." --notebook-id notebook-id |
| 103 | |
| 104 | # Query by URL directly |
| 105 | python3 scripts/run.py ask_question.py --question "..." --notebook-url "https://..." |
| 106 | |
| 107 | # JSON output (for internal/programmatic use) |
| 108 | python3 scripts/run.py ask_question.py --question "..." --json |
| 109 | |
| 110 | # Show browser for debugging |
| 111 | python3 scripts/run.py ask_question.py --question "..." --show-browser |
| 112 | ``` |
| 113 | |
| 114 | ### Step 4: Analyze an |