[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F0ZAR19SVR1ZHDRZHB1ZVE":3,"skill-same:01M6F0ZAR19SVR1ZHDRZHB1ZVE":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":30,"linkOnly":31,"markdownContent":32,"markdownBody":33,"frontMatter":34,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":40,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M6F0ZAR19SVR1ZHDRZHB1ZVE","notebooklm",null,"Automate Google NotebookLM - create notebooks, add sources, generate podcasts\u002Fvideos\u002Fquizzes, download artifacts. Activates on explicit \u002Fnotebooklm or intent like \"create a podcast about X\"","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fteng-lin\u002Fnotebooklm\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29],"google","create","generate","artifacts","download","automate","podcast","intent","sources","add","about","2026-11-10 10:12:30",false,"---\nname: notebooklm\ndescription: Automate Google NotebookLM - create notebooks, add sources, generate podcasts\u002Fvideos\u002Fquizzes, download artifacts. Activates on explicit \u002Fnotebooklm or intent like \"create a podcast about X\"\n---\n\n# NotebookLM Automation\n\nAutomate Google NotebookLM: create notebooks, add sources, chat with content, generate artifacts (podcasts, videos, quizzes), and download results.\n\n## Prerequisites\n\n**IMPORTANT:** Before using any command, you MUST authenticate:\n\n```bash\nnotebooklm login          # Opens browser for Google OAuth\nnotebooklm list           # Verify authentication works\n```\n\nIf commands fail with authentication errors, re-run `notebooklm login`.\n\n### CI\u002FCD, Multiple Accounts, and Parallel Agents\n\nFor automated environments, multiple accounts, or parallel agent workflows:\n\n| Variable | Purpose |\n|----------|---------|\n| `NOTEBOOKLM_HOME` | Custom config directory (default: `~\u002F.notebooklm`) |\n| `NOTEBOOKLM_AUTH_JSON` | Inline auth JSON - no file writes needed |\n\n**CI\u002FCD setup:** Set `NOTEBOOKLM_AUTH_JSON` from a secret containing your `storage_state.json` contents.\n\n**Multiple accounts:** Use different `NOTEBOOKLM_HOME` directories per account.\n\n**Parallel agents:** The CLI stores notebook context in a shared file (`~\u002F.notebooklm\u002Fcontext.json`). Multiple concurrent agents using `notebooklm use` can overwrite each other's context.\n\n**Solutions for parallel workflows:**\n1. **Always use explicit notebook ID** (recommended): Pass `-n \u003Cnotebook_id>` (for `wait`\u002F`download` commands) or `--notebook \u003Cnotebook_id>` (for others) instead of relying on `use`\n2. **Per-agent isolation:** Set unique `NOTEBOOKLM_HOME` per agent: `export NOTEBOOKLM_HOME=\u002Ftmp\u002Fagent-$ID`\n3. **Use full UUIDs:** Avoid partial IDs in automation (they can become ambiguous)\n\n## Agent Setup Verification\n\nBefore starting workflows, verify the CLI is ready:\n\n1. `notebooklm status` → Should show \"Authenticated as: email@...\"\n2. `notebooklm list --json` → Should return valid JSON (even if empty notebooks list)\n3. If either fails → Run `notebooklm login`\n\n## When This Skill Activates\n\n**Explicit:** User says \"\u002Fnotebooklm\", \"use notebooklm\", or mentions the tool by name\n\n**Intent detection:** Recognize requests like:\n- \"Create a podcast about [topic]\"\n- \"Summarize these URLs\u002Fdocuments\"\n- \"Generate a quiz from my research\"\n- \"Turn this into an audio overview\"\n- \"Add these sources to NotebookLM\"\n\n## Autonomy Rules\n\n**Run automatically (no confirmation):**\n- `notebooklm status` - check context\n- `notebooklm list` - list notebooks\n- `notebooklm source list` - list sources\n- `notebooklm artifact list` - list artifacts\n- `notebooklm artifact wait` - wait for artifact completion (in subagent context)\n- `notebooklm source wait` - wait for source processing (in subagent context)\n- `notebooklm research status` - check research status\n- `notebooklm research wait` - wait for research (in subagent context)\n- `notebooklm use \u003Cid>` - set context (⚠️ SINGLE-AGENT ONLY - use `-n` flag in parallel workflows)\n- `notebooklm create` - create notebook\n- `notebooklm ask \"...\"` - chat queries\n- `notebooklm source add` - add sources\n\n**Ask before running:**\n- `notebooklm delete` - destructive\n- `notebooklm generate *` - long-running, may fail\n- `notebooklm download *` - writes to filesystem\n- `notebooklm artifact wait` - long-running (when in main conversation)\n- `notebooklm source wait` - long-running (when in main conversation)\n- `notebooklm research wait` - long-running (when in main conversation)\n\n## Quick Reference\n\n| Task | Command |\n|------|---------|\n| Authenticate | `notebooklm login` |\n| List notebooks | `notebooklm list` |\n| Create notebook | `notebooklm create \"Title\"` |\n| Set context | `notebooklm use \u003Cnotebook_id>` |\n| Show context | `notebooklm status` |\n| Add URL source | `notebooklm source add \"https:\u002F\u002F...\"` |\n| Add file | `notebooklm source add .\u002Ffile.pdf` |\n| Add YouTube | `notebooklm source add \"https:\u002F\u002Fyoutube.com\u002F...\"` |\n| List sources | `notebooklm source list` |\n| Wait for source processing | `notebooklm source wait \u003Csource_id>` |\n| Web research (fast) | `notebooklm source add-research \"query\"` |\n| Web research (deep) | `notebooklm source add-research \"query\" --mode deep --no-wait` |\n| Check research status | `notebooklm research status` |\n| Wait for research | `notebooklm research wait --import-all` |\n| Chat | `notebooklm ask \"question\"` |\n| Chat (new conversation) | `notebooklm ask \"question\" --new` |\n| Chat (specific sources) | `notebooklm ask \"question\" -s src_id1 -s src_id2` |\n| Chat (with references) | `notebooklm ask \"question\" --json` |\n| Get source fulltext | `notebooklm source fulltext \u003Csource_id>` |\n| Get source guide | `notebooklm source guide \u003Csource_id>` |\n| Generate podcast | `notebooklm generate audio \"instructions\"` |\n| Generate podcast (JSON) | `notebooklm generate audio --json` |\n| Generate podcast (specific sources) | `notebooklm generate audio -s src_id1 -s src_id2` |\n| Generate video | `notebooklm generate video \"instructions\"` |\n| Generate quiz | `notebooklm generate quiz` |\n| Check artifact status | `notebooklm artifact list` |\n| Wait for completion | `notebooklm artifact wait \u003Cartifact_id>` |\n| Download audio | `notebooklm download audio .\u002Foutput.mp3` |\n| Download video | `notebooklm download video .\u002Foutput.mp4` |\n| Delete notebook | `notebooklm notebook delete \u003Cid>` |\n\n**Parallel safety:** Use explicit notebook IDs in parallel workflows. Commands supporting `-n` shorthand: `artifact wait`, `source wait`, `research wait\u002Fstatus`, `download *`. Download commands also support `-a\u002F--artifact`. Other commands use `--notebook`. For chat, use `--new` to start fresh conversations (avoids conversation ID conflicts).\n\n**Partial IDs:** Use first 6+ characters of UUIDs. Must be unique prefix (fails if ambiguous). Works for: `use`, `delete`, `wait` commands. For automation, prefer full UUIDs to avoid ambiguity.\n\n## Command Output Formats\n\nCommands with `--json` return structured data for parsing:\n\n**Create notebook:**\n```\n$ notebooklm create \"Research\" --json\n{\"id\": \"abc123de-...\", \"title\": \"Research\"}\n```\n\n**Add source:**\n```\n$ notebooklm source add \"https:\u002F\u002Fexample.com\" --json\n{\"source_id\": \"def456...\", \"title\": \"Example\", \"status\": \"processing\"}\n```\n\n**Generate artifact:**\n```\n$ notebooklm generate audio \"Focus on key points\" --json\n{\"task_id\": \"xyz789...\", \"status\": \"pending\"}\n```\n\n**Chat with references:**\n```\n$ notebooklm ask \"What is X?\" --json\n{\"answer\": \"X is... [1] [2]\", \"conversation_id\": \"...\", \"turn_number\": 1, \"is_follow_up\": false, \"references\": [{\"source_id\": \"abc123...\", \"citation_number\": 1, \"cited_text\": \"Relevant passage from source...\"}, {\"source_id\": \"def456...\", \"citation_number\": 2, \"cited_text\": \"Another passage...\"}]}\n```\n\n**Source fulltext (get indexed content):**\n```\n$ notebooklm source fulltext \u003Csource_id> --json\n{\"source_id\": \"...\", \"title\": \"...\", \"char_count\": 12345, \"content\": \"Full indexed text...\"}\n```\n\n**Understanding citations:** The `cited_text` in references is often a snippet or section header, not the full quoted passage. The `start_char`\u002F`end_char` positions reference NotebookLM's internal chunked index, not the raw fulltext. Use `SourceFulltext.find_citation_context()` to locate citations:\n```python\nfulltext = await client.sources.get_fulltext(notebook_id, ref.source_id)\nmatches = fulltext.find_citation_context(ref.cited_text)  # Returns list[(context, position)]\nif matches:\n    context, pos = matches[0]  # First match; check len(matches) > 1 for duplicates\n```\n\n**Extract IDs:** Parse the `id`, `source_id`, or `task_id` field from JSON output.\n\n## Generation Types\n\nAll generate commands support:\n- `-s, --source` to use specific source(s) instead of all sources\n- `--json` for machine-readable output (returns `task_id` and `status`)\n\n| Type | Command | Downloadable |\n|------|---------|--------------|\n| Podcast | `generate audio` | Yes (.mp3) |\n| Video | `generate video` | Yes (.mp4) |\n| Slides | `generate slide-deck` | Yes (.pdf) |\n| Infographic | `generate infographic` | Yes (.png) |\n| Quiz | `generate quiz` | No (view in UI) |\n| Flashcards | `generate flashcards` | No (view in UI) |\n| Mind Map | `generate mind-map` | No (view in UI) |\n| Data Table | `generate data-table` | No (export to Sheets) |\n| Report | `generate report` | No (export to Docs) |\n\n## Common Workflows\n\n### Research to Podcast (Interactive)\n**Time:** 5-10 minutes total\n\n1. `notebooklm create \"Research: [topic]\"` — *if fails: check auth with `notebooklm login`*\n2. `notebooklm source add` for each URL\u002Fdocument — *if one fails: log warning, continue with others*\n3. Wait for sources: `notebooklm source list --json` until all status=READY — *required before generation*\n4. `notebooklm generate audio \"Focus on [specific angle]\"` (confirm when asked) — *if rate limited: wait 5 min, retry once*\n5. Note the artifact ID returned\n6. Check `notebooklm artifact list` later for status\n7. `notebooklm download audio .\u002Fpodcast.mp3` when complete (confirm when asked)\n\n### Research to Podcast (Automated with Subagent)\n**Time:** 5-10 minutes, but continues in background\n\nWhen user wants full automation (generate and download when ready):\n\n1. Create notebook and add sources as usual\n2. Wait for sources to be ready (use `source wait` or check `source list --json`)\n3. Run `notebooklm generate audio \"...\" --json` → parse `artifact_id` from output\n4. **Spawn a background agent** using Task tool:\n   ```\n   Task(\n     prompt=\"Wait for artifact {artifact_id} in notebook {notebook_id} to complete, then download.\n             Use: notebooklm artifact wait {artifact_id} -n {notebook_id} --timeout 600\n             Then: notebooklm download audio .\u002Fpodcast.mp3 -a {artifact_id} -n {notebook_id}\",\n     subagent_type=\"general-purpose\"\n   )\n   ```\n5. Main conversation continues while agent waits\n\n**Error handling in subagent:**\n- If `artifact wait` returns exit code 2 (timeout): Report timeout, suggest checking `artifact list`\n- If download fails: Check if artifact status is COMPLETED first\n\n**Benefits:** Non-blocking, user can do other work, automatic download on completion\n\n### Document Analysis\n**Time:** 1-2 minutes\n\n1. `notebooklm create \"Analysis: [project]\"`\n2. `notebooklm source add .\u002Fdoc.pdf` (or URLs)\n3. `notebooklm ask \"Summarize the key points\"`\n4. `notebooklm ask \"What are the main arguments?\"`\n5. Continue chatting as needed\n\n### Bulk Import\n**Time:** Varies by source count\n\n1. `notebooklm create \"Collection: [name]\"`\n2. Add multiple sources:\n   ```bash\n   notebooklm source add \"https:\u002F\u002Furl1.com\"\n   notebooklm source add \"https:\u002F\u002Furl2.com\"\n   notebooklm source add .\u002Flocal-file.pdf\n   ```\n3. `notebooklm source list` to verify\n\n**Source limits:** Max 50 sources per notebook\n**Supported types:** PDFs, YouTube URLs, web URLs, Google Docs, text files\n\n### Bulk Import with Source Waiting (Subagent Pattern)\n**Time:** Varies by source count\n\nWhen adding multiple sources and needing to wait for processing before chat\u002Fgeneration:\n\n1. Add sources with `--json` to capture IDs:\n   ```bash\n   notebooklm source add \"https:\u002F\u002Furl1.com\" --json  # → {\"source_id\": \"abc...\"}\n   notebooklm source add \"https:\u002F\u002Furl2.com\" --json  # → {\"source_id\": \"def...\"}\n   ```\n2. **Spawn a background agent** to wait for all sources:\n   ```\n   Task(\n     prompt=\"Wait for sources {source_ids} in notebook {notebook_id} to be ready.\n             For each: notebooklm source wait {id} -n {notebook_id} --timeout 120\n             Report when all ready or if any fail.\",\n     subagent_type=\"general-purpose\"\n   )\n   ```\n3. Main conversation continues while agent waits\n4. Once sources are ready, proceed with chat or generation\n\n**Why wait for sources?** Sources must be indexed before chat or generation. Takes 10-60 seconds per source.\n\n### Deep Web Research (Subagent Pattern)\n**Time:** 2-5 minutes, runs in background\n\nDeep research finds and analyzes web sources on a topic:\n\n1. Create notebook: `notebooklm create \"Research: [topic]\"`\n2. Start deep research (non-blocking):\n   ```bash\n   notebooklm source add-research \"topic query\" --mode deep --no-wait\n   ```\n3. **Spawn a background agent** to wait and import:\n   ```\n   Task(\n     prompt=\"Wait for research in notebook {notebook_id} to complete and import sources.\n             Use: notebooklm research wait -n {notebook_id} --import-all --timeout 300\n             Report how many sources were imported.\",\n     subagent_type=\"general-purpose\"\n   )\n   ```\n4. Main conversation continues while agent waits\n5. When agent completes, sources are imported automatically\n\n**Alternative (blocking):** For simple cases, omit `--no-wait`:\n```bash\nnotebooklm source add-research \"topic\" --mode deep --import-all\n# Blocks for up to 5 minutes\n```\n\n**When to use each mode:**\n- `--mode fast`: Specific topic, quick overview needed (5-10 sources, seconds)\n- `--mode deep`: Broad topic, comprehensive analysis needed (20+ sources, 2-5 min)\n\n**Research sources:**\n- `--from web`: Search the web (default)\n- `--from drive`: Search Google Drive\n\n## Output Style\n\n**Progress updates:** Brief status for each step\n- \"Creating notebook 'Research: AI'...\"\n- \"Adding source: https:\u002F\u002Fexample.com...\"\n- \"Starting audio generation... (task ID: abc123)\"\n\n**Fire-and-forget for long operations:**\n- Start generation, return artifact ID immediately\n- Do NOT poll or wait in main conversation - generation takes 5-45 minutes (see timing table)\n- User checks status manually, OR use subagent with `artifact wait`\n\n**JSON output:** Use `--json` flag for machine-readable output:\n```bash\nnotebooklm list --json\nnotebooklm source list --json\nnotebooklm artifact list --json\n```\n\n**JSON schemas (key fields):**\n\n`notebooklm list --json`:\n```json\n{\"notebooks\": [{\"id\": \"...\", \"title\": \"...\", \"created_at\": \"...\"}]}\n```\n\n`notebooklm source list --json`:\n```json\n{\"sources\": [{\"id\": \"...\", \"title\": \"...\", \"status\": \"ready|processing|error\"}]}\n```\n\n`notebooklm artifact list --json`:\n```json\n{\"artifacts\": [{\"id\": \"...\", \"title\": \"...\", \"type\": \"Audio Overview\", \"status\": \"in_progress|pending|completed|unknown\"}]}\n```\n\n**Status values:**\n- Sources: `processing` → `ready` (or `error`)\n- Artifacts: `pending` or `in_progress` → `completed` (or `unknown`)\n\n## Error Handling\n\n**On failure, offer the user a choice:**\n1. Retry the operation\n2. Skip and continue with something else\n3. Investigate the error\n\n**Error decision tree:**\n\n| Error | Cause | Action |\n|-------|-------|--------|\n| Auth\u002Fcookie error | Session expired | Run `notebooklm login` |\n| \"No notebook context\" | Context not set | Use `-n \u003Cid>` or `--notebook \u003Cid>` flag (parallel), or `notebooklm use \u003Cid>` (single-agent) |\n| \"No result found for RPC ID\" | Rate limiting | Wait 5-10 min, retry |\n| `GENERATION_FAILED` | Google rate limit | Wait and retry later |\n| Download fails | Generation incomplete | Check `artifact list` for status |\n| Invalid notebook\u002Fsource ID | Wrong ID | Run `notebooklm list` to verify |\n| RPC protocol error | Google changed APIs | May need CLI update |\n\n## Exit Codes\n\nAll commands use consistent exit codes:\n\n| Code | Meaning | Action |\n|------|---------|--------|\n| 0 | Success | Continue |\n| 1 | Error (not found, processing failed) | Check stderr, see Error Handling |\n| 2 | Timeout (wait commands only) | Extend timeout or check status manually |\n\n**Examples:**\n- `source wait` returns 1 if source not found or processing failed\n- `artifact wait` returns 2 if timeout reached before completion\n- `generate` returns 1 if rate limited (check stderr for details)\n\n## Known Limitations\n\n**Rate limiting:** Audio, video, quiz, flashcards, infographic, and slides generation may fail due to Google's rate limits. This is an API limitation, not a bug.\n\n**Reliable operations:** These always work:\n- Notebooks (list, create, delete, rename)\n- Sources (add, list, delete)\n- Chat\u002Fqueries\n- Mind-map, study-guide, FAQ, data-table generation\n\n**Unreliable operations:** These may fail with rate limiting:\n- Audio (podcast) generation\n- Video generation\n- Quiz and flashcard generation\n- Infographic and slides generation\n\n**Workaround:** If generation fails:\n1. Check status: `notebooklm artifact list`\n2. Retry after 5-10 minutes\n3. Use the NotebookLM web UI as fallback\n\n**Processing times vary significantly.** Use the subagent pattern for long operations:\n\n| Operation | Typical time | Suggested timeout |\n|-----------|--------------|-------------------|\n| Source processing | 30s - 10 min | 600s |\n| Research (fast) | 30s - 2 min | 180s |\n| Research (deep) | 15 - 30+ min | 1800s |\n| Notes | instant | n\u002Fa |\n| Mind-map | instant (sync) | n\u002Fa |\n| Quiz, flashcards | 5 - 15 min | 900s |\n| Report, data-table | 5 - 15 min | 900s |\n| Audio generation | 10 - 20 min | 1200s |\n| Video generation | 15 - 45 min | 2700s |\n\n**Polling intervals:** When checking status manually, poll every 15-30 seconds to avoid excessive API calls.\n\n## Troubleshooting\n\n```bash\nnotebooklm --help              # Main commands\nnotebooklm notebook --help     # Notebook management\nnotebooklm source --help       # Source management\nnotebooklm research --help     # Research status\u002Fwait\nnotebooklm generate --help     # Content generation\nnotebooklm artifact --help     # Artifact management\nnotebooklm download --help     # Download content\n```\n\n**Re-authenticate:** `notebooklm login`\n**Check version:** `notebooklm --version`\n**Update skill:** `notebooklm skill install`\n","# NotebookLM Automation\n\nAutomate Google NotebookLM: create notebooks, add sources, chat with content, generate artifacts (podcasts, videos, quizzes), and download results.\n\n## Prerequisites\n\n**IMPORTANT:** Before using any command, you MUST authenticate:\n\n```bash\nnotebooklm login          # Opens browser for Google OAuth\nnotebooklm list           # Verify authentication works\n```\n\nIf commands fail with authentication errors, re-run `notebooklm login`.\n\n### CI\u002FCD, Multiple Accounts, and Parallel Agents\n\nFor automated environments, multiple accounts, or parallel agent workflows:\n\n| Variable | Purpose |\n|----------|---------|\n| `NOTEBOOKLM_HOME` | Custom config directory (default: `~\u002F.notebooklm`) |\n| `NOTEBOOKLM_AUTH_JSON` | Inline auth JSON - no file writes needed |\n\n**CI\u002FCD setup:** Set `NOTEBOOKLM_AUTH_JSON` from a secret containing your `storage_state.json` contents.\n\n**Multiple accounts:** Use different `NOTEBOOKLM_HOME` directories per account.\n\n**Parallel agents:** The CLI stores notebook context in a shared file (`~\u002F.notebooklm\u002Fcontext.json`). Multiple concurrent agents using `notebooklm use` can overwrite each other's context.\n\n**Solutions for parallel workflows:**\n1. **Always use explicit notebook ID** (recommended): Pass `-n \u003Cnotebook_id>` (for `wait`\u002F`download` commands) or `--notebook \u003Cnotebook_id>` (for others) instead of relying on `use`\n2. **Per-agent isolation:** Set unique `NOTEBOOKLM_HOME` per agent: `export NOTEBOOKLM_HOME=\u002Ftmp\u002Fagent-$ID`\n3. **Use full UUIDs:** Avoid partial IDs in automation (they can become ambiguous)\n\n## Agent Setup Verification\n\nBefore starting workflows, verify the CLI is ready:\n\n1. `notebooklm status` → Should show \"Authenticated as: email@...\"\n2. `notebooklm list --json` → Should return valid JSON (even if empty notebooks list)\n3. If either fails → Run `notebooklm login`\n\n## When This Skill Activates\n\n**Explicit:** User says \"\u002Fnotebooklm\", \"use notebooklm\", or mentions the tool by name\n\n**Intent detection:** Recognize requests like:\n- \"Create a podcast about [topic]\"\n- \"Summarize these URLs\u002Fdocuments\"\n- \"Generate a quiz from my research\"\n- \"Turn this into an audio overview\"\n- \"Add these sources to NotebookLM\"\n\n## Autonomy Rules\n\n**Run automatically (no confirmation):**\n- `notebooklm status` - check context\n- `notebooklm list` - list notebooks\n- `notebooklm source list` - list sources\n- `notebooklm artifact list` - list artifacts\n- `notebooklm artifact wait` - wait for artifact completion (in subagent context)\n- `notebooklm source wait` - wait for source processing (in subagent context)\n- `notebooklm research status` - check research status\n- `notebooklm research wait` - wait for research (in subagent context)\n- `notebooklm use \u003Cid>` - set context (⚠️ SINGLE-AGENT ONLY - use `-n` flag in parallel workflows)\n- `notebooklm create` - create notebook\n- `notebooklm ask \"...\"` - chat queries\n- `notebooklm source add` - add sources\n\n**Ask before running:**\n- `notebooklm delete` - destructive\n- `notebooklm generate *` - long-running, may fail\n- `notebooklm download *` - writes to filesystem\n- `notebooklm artifact wait` - long-running (when in main conversation)\n- `notebooklm source wait` - long-running (when in main conversation)\n- `notebooklm research wait` - long-running (when in main conversation)\n\n## Quick Reference\n\n| Task | Command |\n|------|---------|\n| Authenticate | `notebooklm login` |\n| List notebooks | `notebooklm list` |\n| Create notebook | `notebooklm create \"Title\"` |\n| Set context | `notebooklm use \u003Cnotebook_id>` |\n| Show context | `notebooklm status` |\n| Add URL source | `notebooklm source add \"https:\u002F\u002F...\"` |\n| Add file | `notebooklm source add .\u002Ffile.pdf` |\n| Add YouTube | `notebooklm source add \"https:\u002F\u002Fyoutube.com\u002F...\"` |\n| List sources | `notebooklm source list` |\n| Wait for source processing | `notebooklm source wait \u003Csource_id>` |\n| Web research (fast) | `notebooklm source add-research \"query\"` |\n| Web research (deep) | `notebooklm source add-research \"query\" --mode deep --no-wait` |\n| Check research status | `notebooklm research status` |\n| Wait for research | `notebooklm research wait --import-all` |\n| Chat | `notebooklm ask \"question\"` |\n| Chat (new conversation) | `notebooklm ask \"question\" --new` |\n| Chat (specific sources) | `notebooklm ask \"question\" -s src_id1 -s src_id2` |\n| Chat (with references) | `notebooklm ask \"question\" --json` |\n| Get source fulltext | `notebooklm source fulltext \u003Csource_id>` |\n| Get source guide | `notebooklm source guide \u003Csource_id>` |\n| Generate podcast | `notebooklm generate audio \"instructions\"` |\n| Generate podcast (JSON) | `notebooklm generate audio --json` |\n| Generate podcast (specific sources) | `notebooklm generate audio -s src_id1 -s src_id2` |\n| Generate video | `notebooklm generate video \"instructions\"` |\n| Generate quiz | `notebooklm generate quiz` |\n| Check artifact status | `notebooklm artifact list` |\n| Wait for completion | `notebooklm artifact wait \u003Cartifact_id>` |\n| Download audio | `notebooklm download audio .\u002Foutput.mp3` |\n| Download video | `notebooklm download video .\u002Foutput.mp4` |\n| Delete notebook | `notebooklm notebook delete \u003Cid>` |\n\n**Parallel safety:** Use explicit notebook IDs in parallel workflows. Commands supporting `-n` shorthand: `artifact wait`, `source wait`, `research wait\u002Fstatus`, `download *`. Download commands also support `-a\u002F--artifact`. Other commands use `--notebook`. For chat, use `--new` to start fresh conversations (avoids conversation ID conflicts).\n\n**Partial IDs:** Use first 6+ characters of UUIDs. Must be unique prefix (fails if ambiguous). Works for: `use`, `delete`, `wait` commands. For automation, prefer full UUIDs to avoid ambiguity.\n\n## Command Output Formats\n\nCommands with `--json` return structured data for parsing:\n\n**Create notebook:**\n```\n$ notebooklm create \"Research\" --json\n{\"id\": \"abc123de-...\", \"title\": \"Research\"}\n```\n\n**Add source:**\n```\n$ notebooklm source add \"https:\u002F\u002Fexample.com\" --json\n{\"source_id\": \"def456...\", \"title\": \"Example\", \"status\": \"processing\"}\n```\n\n**Generate artifact:**\n```\n$ notebooklm generate audio \"Focus on key points\" --json\n{\"task_id\": \"xyz789...\", \"status\": \"pending\"}\n```\n\n**Chat with references:**\n```\n$ notebooklm ask \"What is X?\" --json\n{\"answer\": \"X is... [1] [2]\", \"conversation_id\": \"...\", \"turn_number\": 1, \"is_follow_up\": false, \"references\": [{\"source_id\": \"abc123...\", \"citation_number\": 1, \"cited_text\": \"Relevant passage from source...\"}, {\"source_id\": \"def456...\", \"citation_number\": 2, \"cited_text\": \"Another passage...\"}]}\n```\n\n**Source fulltext (get indexed content):**\n```\n$ notebooklm source fulltext \u003Csource_id> --json\n{\"source_id\": \"...\", \"title\": \"...\", \"char_count\": 12345, \"content\": \"Full indexed text...\"}\n```\n\n**Understanding citations:** The `cited_text` in references is often a snippet or section header, not the full quoted passage. The `start_char`\u002F`end_char` positions reference NotebookLM's internal chunked index, not the raw fulltext. Use `SourceFulltext.find_citation_context()` to locate citations:\n```python\nfulltext = await client.sources.get_fulltext(notebook_id, ref.source_id)\nmatches = fulltext.find_citation_context(ref.cited_text)  # Returns list[(context, position)]\nif matches:\n    context, pos = matches[0]  # First match; check len(matches) > 1 for duplicates\n```\n\n**Extract IDs:** Parse the `id`, `source_id`, or `task_id` field from JSON output.\n\n## Generation Types\n\nAll generate commands support:\n- `-s, --source` to use specific source(s) instead of all sources\n- `--json` for machine-readable output (returns `task_id` and `status`)\n\n| Type | Command | Downloadable |\n|------|---------|--------------|\n| Podcast | `generate audio` | Yes (.mp3) |\n| Video | `generate video` | Yes (.mp4) |\n| Slides | `generate slide-deck` | Yes (.pdf) |\n| Infographic | `generate infographic` | Yes (.png) |\n| Quiz | `generate quiz` | No (view in UI) |\n| Flashcards | `generate flashcards` | No (view in UI) |\n| Mind Map | `generate mind-map` | No (view in UI) |\n| Data Table | `generate data-table` | No (export to Sheets) |\n| Report | `generate report` | No (export to Docs) |\n\n## Common Workflows\n\n### Research to Podcast (Interactive)\n**Time:** 5-10 minutes total\n\n1. `notebooklm create \"Research: [topic]\"` — *if fails: check auth with `notebooklm login`*\n2. `notebooklm source add` for each URL\u002Fdocument — *if one fails: log warning, continue with others*\n3. Wait for sources: `notebooklm source list --json` until all status=READY — *required before generation*\n4. `notebooklm generate audio \"Focus on [specific angle]\"` (confirm when asked) — *if rate limited: wait 5 min, retry once*\n5. Note the artifact ID returned\n6. Check `notebooklm artifact list` later for status\n7. `notebooklm download audio .\u002Fpodcast.mp3` when complete (confirm when asked)\n\n### Research to Podcast (Automated with Subagent)\n**Time:** 5-10 minutes, but continues in background\n\nWhen user wants full automation (generate and download when ready):\n\n1. Create notebook and add sources as usual\n2. Wait for sources to be ready (use `source wait` or check `source list --json`)\n3. Run `notebooklm generate audio \"...\" --json` → parse `artifact_id` from output\n4. **Spawn a background agent** using Task tool:\n   ```\n   Task(\n     prompt=\"Wait for artifact {artifact_id} in notebook {notebook_id} to complete, then download.\n             Use: notebooklm artifact wait {artifact_id} -n {notebook_id} --timeout 600\n             Then: notebooklm download audio .\u002Fpodcast.mp3 -a {artifact_id} -n {notebook_id}\",\n     subagent_type=\"general-purpose\"\n   )\n   ```\n5. Main conversation continues while agent waits\n\n**Error handling in subagent:**\n- If `artifact wait` returns exit code 2 (timeout): Report timeout, suggest checking `artifact list`\n- If download fails: Check if artifact status is COMPLETED first\n\n**Benefits:** Non-blocking, user can do other work, automatic download on completion\n\n### Document Analysis\n**Time:** 1-2 minutes\n\n1. `notebooklm create \"Analysis: [project]\"`\n2. `notebooklm source add .\u002Fdoc.pdf` (or URLs)\n3. `notebooklm ask \"Summarize the key points\"`\n4. `notebooklm ask \"What are the main arguments?\"`\n5. Continue chatting as needed\n\n### Bulk Import\n**Time:** Varies by source count\n\n1. `notebooklm create \"Collection: [name]\"`\n2. Add multiple sources:\n   ```bash\n   notebooklm source add \"https:\u002F\u002Furl1.com\"\n   notebooklm source add \"https:\u002F\u002Furl2.com\"\n   notebooklm source add .\u002Flocal-file.pdf\n   ```\n3. `notebooklm source list` to verify\n\n**Source limits:** Max 50 sources per notebook\n**Supported types:** PDFs, YouTube URLs, web URLs, Google Docs, text files\n\n### Bulk Import with Source Waiting (Subagent Pattern)\n**Time:** Varies by source count\n\nWhen adding multiple sources and needing to wait for processing before chat\u002Fgeneration:\n\n1. Add sources with `--json` to capture IDs:\n   ```bash\n   notebooklm source add \"https:\u002F\u002Furl1.com\" --json  # → {\"source_id\": \"abc...\"}\n   notebooklm source add \"https:\u002F\u002Furl2.com\" --json  # → {\"source_id\": \"def...\"}\n   ```\n2. **Spawn a background agent** to wait for all sources:\n   ```\n   Task(\n     prompt=\"Wait for sources {source_ids} in notebook {notebook_id} to be ready.\n             For each: notebooklm source wait {id} -n {notebook_id} --timeout 120\n             Report when all ready or if any fail.\",\n     subagent_type=\"general-purpose\"\n   )\n   ```\n3. Main conversation continues while agent waits\n4. Once sources are ready, proceed with chat or generation\n\n**Why wait for sources?** Sources must be indexed before chat or generation. Takes 10-60 seconds per source.\n\n### Deep Web Research (Subagent Pattern)\n**Time:** 2-5 minutes, runs in background\n\nDeep research finds and analyzes web sources on a topic:\n\n1. Create notebook: `notebooklm create \"Research: [topic]\"`\n2. Start deep research (non-blocking):\n   ```bash\n   notebooklm source add-research \"topic query\" --mode deep --no-wait\n   ```\n3. **Spawn a background agent** to wait and import:\n   ```\n   Task(\n     prompt=\"Wait for research in notebook {notebook_id} to complete and import sources.\n             Use: notebooklm research wait -n {notebook_id} --import-all --timeout 300\n             Report how many sources were imported.\",\n     subagent_type=\"general-purpose\"\n   )\n   ```\n4. Main conversation continues while agent waits\n5. When agent completes, sources are imported automatically\n\n**Alternative (blocking):** For simple cases, omit `--no-wait`:\n```bash\nnotebooklm source add-research \"topic\" --mode deep --import-all\n# Blocks for up to 5 minutes\n```\n\n**When to use each mode:**\n- `--mode fast`: Specific topic, quick overview needed (5-10 sources, seconds)\n- `--mode deep`: Broad topic, comprehensive analysis needed (20+ sources, 2-5 min)\n\n**Research sources:**\n- `--from web`: Search the web (default)\n- `--from drive`: Search Google Drive\n\n## Output Style\n\n**Progress updates:** Brief status for each step\n- \"Creating notebook 'Research: AI'...\"\n- \"Adding source: https:\u002F\u002Fexample.com...\"\n- \"Starting audio generation... (task ID: abc123)\"\n\n**Fire-and-forget for long operations:**\n- Start generation, return artifact ID immediately\n- Do NOT poll or wait in main conversation - generation takes 5-45 minutes (see timing table)\n- User checks status manually, OR use subagent with `artifact wait`\n\n**JSON output:** Use `--json` flag for machine-readable output:\n```bash\nnotebooklm list --json\nnotebooklm source list --json\nnotebooklm artifact list --json\n```\n\n**JSON schemas (key fields):**\n\n`notebooklm list --json`:\n```json\n{\"notebooks\": [{\"id\": \"...\", \"title\": \"...\", \"created_at\": \"...\"}]}\n```\n\n`notebooklm source list --json`:\n```json\n{\"sources\": [{\"id\": \"...\", \"title\": \"...\", \"status\": \"ready|processing|error\"}]}\n```\n\n`notebooklm artifact list --json`:\n```json\n{\"artifacts\": [{\"id\": \"...\", \"title\": \"...\", \"type\": \"Audio Overview\", \"status\": \"in_progress|pending|completed|unknown\"}]}\n```\n\n**Status values:**\n- Sources: `processing` → `ready` (or `error`)\n- Artifacts: `pending` or `in_progress` → `completed` (or `unknown`)\n\n## Error Handling\n\n**On failure, offer the user a choice:**\n1. Retry the operation\n2. Skip and continue with something else\n3. Investigate the error\n\n**Error decision tree:**\n\n| Error | Cause | Action |\n|-------|-------|--------|\n| Auth\u002Fcookie error | Session expired | Run `notebooklm login` |\n| \"No notebook context\" | Context not set | Use `-n \u003Cid>` or `--notebook \u003Cid>` flag (parallel), or `notebooklm use \u003Cid>` (single-agent) |\n| \"No result found for RPC ID\" | Rate limiting | Wait 5-10 min, retry |\n| `GENERATION_FAILED` | Google rate limit | Wait and retry later |\n| Download fails | Generation incomplete | Check `artifact list` for status |\n| Invalid notebook\u002Fsource ID | Wrong ID | Run `notebooklm list` to verify |\n| RPC protocol error | Google changed APIs | May need CLI update |\n\n## Exit Codes\n\nAll commands use consistent exit codes:\n\n| Code | Meaning | Action |\n|------|---------|--------|\n| 0 | Success | Continue |\n| 1 | Error (not found, processing failed) | Check stderr, see Error Handling |\n| 2 | Timeout (wait commands only) | Extend timeout or check status manually |\n\n**Examples:**\n- `source wait` returns 1 if source not found or processing failed\n- `artifact wait` returns 2 if timeout reached before completion\n- `generate` returns 1 if rate limited (check stderr for details)\n\n## Known Limitations\n\n**Rate limiting:** Audio, video, quiz, flashcards, infographic, and slides generation may fail due to Google's rate limits. This is an API limitation, not a bug.\n\n**Reliable operations:** These always work:\n- Notebooks (list, create, delete, rename)\n- Sources (add, list, delete)\n- Chat\u002Fqueries\n- Mind-map, study-guide, FAQ, data-table generation\n\n**Unreliable operations:** These may fail with rate limiting:\n- Audio (podcast) generation\n- Video generation\n- Quiz and flashcard generation\n- Infographic and slides generation\n\n**Workaround:** If generation fails:\n1. Check status: `notebooklm artifact list`\n2. Retry after 5-10 minutes\n3. Use the NotebookLM web UI as fallback\n\n**Processing times vary significantly.** Use the subagent pattern for long operations:\n\n| Operation | Typical time | Suggested timeout |\n|-----------|--------------|-------------------|\n| Source processing | 30s - 10 min | 600s |\n| Research (fast) | 30s - 2 min | 180s |\n| Research (deep) | 15 - 30+ min | 1800s |\n| Notes | instant | n\u002Fa |\n| Mind-map | instant (sync) | n\u002Fa |\n| Quiz, flashcards | 5 - 15 min | 900s |\n| Report, data-table | 5 - 15 min | 900s |\n| Audio generation | 10 - 20 min | 1200s |\n| Video generation | 15 - 45 min | 2700s |\n\n**Polling intervals:** When checking status manually, poll every 15-30 seconds to avoid excessive API calls.\n\n## Troubleshooting\n\n```bash\nnotebooklm --help              # Main commands\nnotebooklm notebook --help     # Notebook management\nnotebooklm source --help       # Source management\nnotebooklm research --help     # Research status\u002Fwait\nnotebooklm generate --help     # Content generation\nnotebooklm artifact --help     # Artifact management\nnotebooklm download --help     # Download content\n```\n\n**Re-authenticate:** `notebooklm login`\n**Check version:** `notebooklm --version`\n**Update skill:** `notebooklm skill install`\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fteng-lin\u002Fnotebooklm",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill notebooklm",{"tool":50,"command":51},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill notebooklm",{"tool":53,"command":54},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill notebooklm","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fteng-lin\u002Fnotebooklm\u002FSKILL.md",true,[58,64],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"EVALUATION.json","REFERENCE","参考文档",11268,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fteng-lin\u002Fnotebooklm\u002FEVALUATION.json",{"path":65,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":66,"sourceHtmlUrl":67},"skill-report.json",34300,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fteng-lin\u002Fnotebooklm\u002Fskill-report.json",[69,78,87,96,102,108],{"skillNo":70,"name":71,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":30},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[75,76,77],"model","model hierarchy","model hierarchy skill",{"skillNo":79,"name":80,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":30},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[84,85,86],"MCP","zoom","zoom mcp",{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":30},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[93,94,95,85],"sdk","zoom apps sdk","apps",{"skillNo":97,"name":98,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":30},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[98],{"skillNo":103,"name":104,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":30},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[104],{"skillNo":109,"name":110,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":30},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[110]]