$npx -y skills add walidboulanouar/Ay-Skills --skill notebooklmUse this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.
| 1 | # NotebookLM Research Assistant Skill |
| 2 | |
| 3 | Interact with Google NotebookLM to query documentation with Gemini's source-grounded answers. Each question opens a fresh browser session, retrieves the answer exclusively from your uploaded documents, and closes. |
| 4 | |
| 5 | **Source:** https://github.com/PleasePrompto/notebooklm-skill |
| 6 | |
| 7 | ## Install |
| 8 | |
| 9 | ```bash |
| 10 | git clone https://github.com/PleasePrompto/notebooklm-skill ~/.claude/skills/notebooklm |
| 11 | ``` |
| 12 | |
| 13 | The `run.py` wrapper auto-creates `.venv`, installs dependencies, and sets up Chromium on first run. |
| 14 | |
| 15 | ## When to Use This Skill |
| 16 | |
| 17 | Trigger when user: |
| 18 | - Mentions NotebookLM explicitly |
| 19 | - Shares NotebookLM URL (`https://notebooklm.google.com/notebook/...`) |
| 20 | - Asks to query their notebooks/documentation |
| 21 | - Wants to add documentation to NotebookLM library |
| 22 | - Uses phrases like "ask my NotebookLM", "check my docs", "query my notebook" |
| 23 | |
| 24 | ## CRITICAL: Always Use run.py Wrapper |
| 25 | |
| 26 | **NEVER call scripts directly. ALWAYS use `python scripts/run.py [script]`:** |
| 27 | |
| 28 | ```bash |
| 29 | # CORRECT |
| 30 | python scripts/run.py auth_manager.py status |
| 31 | python scripts/run.py notebook_manager.py list |
| 32 | python scripts/run.py ask_question.py --question "..." |
| 33 | |
| 34 | # WRONG — fails without venv |
| 35 | python scripts/auth_manager.py status |
| 36 | ``` |
| 37 | |
| 38 | ## Core Workflow |
| 39 | |
| 40 | ### Step 1: Check Authentication |
| 41 | ```bash |
| 42 | python scripts/run.py auth_manager.py status |
| 43 | ``` |
| 44 | |
| 45 | ### Step 2: Authenticate (One-Time Setup) |
| 46 | ```bash |
| 47 | # Browser MUST be visible for manual Google login |
| 48 | python scripts/run.py auth_manager.py setup |
| 49 | ``` |
| 50 | Tell user: "A browser window will open for Google login." |
| 51 | |
| 52 | ### Step 3: Manage Notebook Library |
| 53 | |
| 54 | ```bash |
| 55 | # List all notebooks |
| 56 | python scripts/run.py notebook_manager.py list |
| 57 | |
| 58 | # Add notebook — ALL parameters required |
| 59 | python scripts/run.py notebook_manager.py add \ |
| 60 | --url "https://notebooklm.google.com/notebook/..." \ |
| 61 | --name "Descriptive Name" \ |
| 62 | --description "What this notebook contains" \ |
| 63 | --topics "topic1,topic2,topic3" |
| 64 | |
| 65 | # Smart Add (discover content first, then add) |
| 66 | python scripts/run.py ask_question.py --question "What topics are covered in this notebook?" --notebook-url "[URL]" |
| 67 | |
| 68 | # Search, activate, remove |
| 69 | python scripts/run.py notebook_manager.py search --query "keyword" |
| 70 | python scripts/run.py notebook_manager.py activate --id notebook-id |
| 71 | python scripts/run.py notebook_manager.py remove --id notebook-id |
| 72 | ``` |
| 73 | |
| 74 | ### Step 4: Ask Questions |
| 75 | |
| 76 | ```bash |
| 77 | # Basic query (uses active notebook) |
| 78 | python scripts/run.py ask_question.py --question "Your question here" |
| 79 | |
| 80 | # Query specific notebook by ID |
| 81 | python scripts/run.py ask_question.py --question "..." --notebook-id notebook-id |
| 82 | |
| 83 | # Query by URL directly |
| 84 | python scripts/run.py ask_question.py --question "..." --notebook-url "https://..." |
| 85 | |
| 86 | # Debug mode |
| 87 | python scripts/run.py ask_question.py --question "..." --show-browser |
| 88 | ``` |
| 89 | |
| 90 | ## Follow-Up Mechanism (CRITICAL) |
| 91 | |
| 92 | Every NotebookLM answer ends with: **"Is that ALL you need to know?"** |
| 93 | |
| 94 | Required behavior: |
| 95 | 1. STOP — do not immediately respond to user |
| 96 | 2. ANALYZE — compare answer to original request |
| 97 | 3. IDENTIFY GAPS — determine if more info needed |
| 98 | 4. ASK FOLLOW-UP — if gaps exist, query again with context |
| 99 | 5. SYNTHESIZE — combine all answers before responding |
| 100 | |
| 101 | ## Script Reference |
| 102 | |
| 103 | ```bash |
| 104 | # Auth |
| 105 | python scripts/run.py auth_manager.py setup|status|reauth|clear |
| 106 | |
| 107 | # Notebooks |
| 108 | python scripts/run.py notebook_manager.py add|list|search|activate|remove|stats |
| 109 | |
| 110 | # Questions |
| 111 | python scripts/run.py ask_question.py --question "..." [--notebook-id ID] [--notebook-url URL] |
| 112 | |
| 113 | # Cleanup |
| 114 | python scripts/run.py cleanup_manager.py [--confirm] [--preserve-library] |
| 115 | ``` |
| 116 | |
| 117 | ## Data Storage |
| 118 | |
| 119 | All data in `~/.claude/skills/notebooklm/data/`: |
| 120 | - `library.json` — notebook metadata |
| 121 | - `auth_info.json` — auth status |
| 122 | - `browser_state/` — browser cookies/session |
| 123 | |
| 124 | Protected by `.gitignore`. Never commit. |
| 125 | |
| 126 | ## Limitations |
| 127 | |
| 128 | - No session persistence (each question = new browser session) |
| 129 | - Rate limit: ~50 queries/day on free Google accounts |
| 130 | - Manual upload required (user adds docs to NotebookLM) |
| 131 | - Requires Python 3.8+ |
| 132 | |
| 133 | ## Troubleshooting |
| 134 | |
| 135 | | Problem | Solution | |
| 136 | |---------|----------| |
| 137 | | ModuleNotFoundError | Use `run.py` wrapper, never call scripts directly | |
| 138 | | Auth fails | Browser must be visible: `--show-browser` | |
| 139 | | Rate limit hit | Wait or switch Google account | |
| 140 | | Browser crashes | `python scripts/run.py cleanup_manager.py --preserve-library` | |