What This Skill Does
Google NotebookLM is brilliant for turning research into podcasts, videos, quizzes, and study materials. But every time you want to create something, you're clicking through a web interface — uploading files, waiting, clicking "generate", waiting more, then downloading the result.
This Claude Code skill gives you full programmatic access to NotebookLM. You stay in Claude Code and tell it what you want. It handles the rest — creating notebooks, adding sources, generating content, and downloading the finished files.
Without the skill
- Open NotebookLM in your browser
- Create a notebook, manually upload each source
- Wait for sources to process
- Click generate, pick options, wait again
- Download the finished file manually
- Repeat for every notebook
With the skill
- Tell Claude "create a podcast about [topic]"
- Claude creates the notebook and adds sources
- Generates your chosen content type
- Downloads the file when it's ready
- All from one conversation
- Batch multiple notebooks if needed
Beyond the web UI
The skill uses an unofficial API that actually exposes more capabilities than the NotebookLM web interface — including features like web research, data tables, mind maps, and infographics that aren't always available in the browser.
What It Can Generate
NotebookLM isn't just for podcasts. Here's everything the skill can create from your sources:
Podcasts
AI-generated audio overviews in deep-dive, brief, critique, or debate formats. Short, default, or long lengths. Downloads as .mp3.
Videos
Animated explainer or brief videos in styles like classic, whiteboard, kawaii, anime, watercolour, and more. Downloads as .mp4.
Slide Decks
Detailed or presenter-format presentations. Download as .pdf or .pptx. You can even revise individual slides.
Reports
Briefing docs, study guides, blog posts, or custom formats. Downloads as markdown.
Quizzes & Flashcards
Auto-generated from your sources with easy, medium, or hard difficulty. Download as .json, .md, or .html.
Mind Maps & Infographics
Visual representations of your content. Mind maps as .json, infographics as .png in landscape, portrait, or square.
Source types it accepts
URLs, YouTube videos, PDFs, audio files, video files, images, and even direct web research queries. You can mix and match — throw in a YouTube video, a PDF whitepaper, and a blog post, then generate a podcast that covers all three.
What You Need
The setup is straightforward — the skill handles most of it automatically on first run.
How authentication works
The skill uses browser-based authentication — it opens a browser window, you sign into your Google account, and it saves the session cookies locally. No API keys, no tokens, no OAuth flows. Your credentials never leave your machine.
Python version check
macOS ships with Python 3.9 by default, but the underlying library (notebooklm-py) needs 3.10+. The skill checks this automatically and walks you through installing a compatible version via Homebrew if needed. Takes about 30 seconds.
Setup Guide
The skill runs setup automatically the first time you use it, but here's what happens behind the scenes so you know what to expect.
Install the CLI
Claude creates a virtual environment, installs notebooklm-py and Playwright's Chromium browser, then symlinks the CLI to your PATH.
Authenticate with Google
A browser window opens. You sign into your Google account and navigate to notebooklm.google.com. Claude saves the session when you confirm you're signed in.
Verify
Claude runs notebooklm auth check and notebooklm list to confirm everything's working. You'll see your existing notebooks if you have any.
Session expiry
Google sessions expire after a while. If commands start failing with auth errors, just tell Claude to re-authenticate and it'll open the browser again. Takes 30 seconds.
Works with Claude Co-work too
The skill includes instructions for generating a Co-work-compatible version. It strips your auth cookies down to the essentials and embeds them in the skill file so it works in Co-work's sandboxed environment. Just say "add this to Co-work" and Claude handles the rest.
The Skill File
Copy the entire block below and save it as SKILL.md in ~/.claude/skills/notebooklm/
How to install
- Open your terminal
- Run:
mkdir -p ~/.claude/skills/notebooklm - Copy the skill file below into
~/.claude/skills/notebooklm/SKILL.md - Restart Claude Code — the skill will be available as
/notebooklm - First run triggers automatic setup (install + auth)
---
name: notebooklm
description: Complete API for Google NotebookLM - full programmatic access including features not in the web UI. Create notebooks, add sources, generate all artifact types, download in multiple formats. Activates on explicit /notebooklm or intent like "create a podcast about X", "install notebooklm", "add notebooklm to cowork"
---
<!-- notebooklm-py v0.3.4 -->
# NotebookLM Automation
Complete programmatic access to Google NotebookLM—including capabilities not exposed in the web UI. Create notebooks, add sources (URLs, YouTube, PDFs, audio, video, images), chat with content, generate all artifact types, and download results in multiple formats.
## Step 0: Setup (Run Automatically on First Use)
When this skill is triggered and `notebooklm` is not yet installed or authenticated, complete setup first.
### Pre-flight: Check Python Version
`notebooklm-py` requires **Python 3.10+**. Check the available version before installing:
```bash
python3 --version
```
If Python is below 3.10 (e.g. 3.9.x which is the macOS default), install a compatible version:
**macOS (Homebrew):**
```bash
brew install python@3.12
```
Then use `/opt/homebrew/bin/python3.12` (Apple Silicon) or `/usr/local/bin/python3.12` (Intel) for the venv below.
**Linux (apt):**
```bash
sudo apt update && sudo apt install -y python3.12 python3.12-venv
```
### Install the CLI
Always use a virtual environment to avoid "externally-managed-environment" errors and PATH issues.
Determine which Python to use — if the system `python3` is 3.10+, use it directly. Otherwise use the one you just installed (e.g. `python3.12`):
```bash
# Set PYTHON to the correct binary (adjust if needed)
PYTHON=$(command -v python3.12 2>/dev/null || command -v python3.11 2>/dev/null || command -v python3.10 2>/dev/null || command -v python3)
# Verify it's 3.10+
$PYTHON -c "import sys; assert sys.version_info >= (3,10), f'Python {sys.version} is too old — need 3.10+'; print(f'Using Python {sys.version}')"
# Create venv and install
$PYTHON -m venv ~/.notebooklm-venv
source ~/.notebooklm-venv/bin/activate
pip install "notebooklm-py[browser]"
playwright install chromium
```
Then symlink so it's always on PATH:
```bash
mkdir -p ~/bin
ln -sf ~/.notebooklm-venv/bin/notebooklm ~/bin/notebooklm
export PATH="$HOME/bin:$PATH"
```
Verify the CLI works:
```bash
notebooklm --help
```
### Authenticate
**IMPORTANT:** The built-in `notebooklm login` command requires interactive terminal input (pressing Enter after sign-in). Claude Code's bash tool does NOT support interactive input, so `notebooklm login` will fail — the browser opens and closes instantly. Instead, use this custom login script.
Tell the user:
> I'm going to open a browser window — just sign into your Google account and navigate to notebooklm.google.com. Take your time, I'll wait for you to confirm before closing it.
Then write and run this login script:
```bash
cat > /tmp/nlm_login.py << 'PYEOF'
import json, os, time
from pathlib import Path
from playwright.sync_api import sync_playwright
STORAGE_PATH = Path.home() / ".notebooklm" / "storage_state.json"
PROFILE_PATH = Path.home() / ".notebooklm" / "browser_profile"
SIGNAL_FILE = Path("/tmp/nlm_save_signal")
SIGNAL_FILE.unlink(missing_ok=True)
STORAGE_PATH.parent.mkdir(parents=True, exist_ok=True)
print("Opening browser for Google login...")
print("Sign in to Google and navigate to notebooklm.google.com")
with sync_playwright() as p:
browser = p.chromium.launch_persistent_context(
user_data_dir=str(PROFILE_PATH),
headless=False,
args=["--disable-blink-features=AutomationControlled"],
)
page = browser.pages[0] if browser.pages else browser.new_page()
page.goto("https://notebooklm.google.com/")
print("Browser is open. Waiting for save signal...")
while not SIGNAL_FILE.exists():
time.sleep(1)
print("Save signal received! Capturing session...")
storage = browser.storage_state()
with open(STORAGE_PATH, "w") as f:
json.dump(storage, f)
cookie_names = [c["name"] for c in storage.get("cookies", [])]
print(f"Saved {len(cookie_names)} cookies: {cookie_names}")
browser.close()
SIGNAL_FILE.unlink(missing_ok=True)
print(f"Authentication saved to: {STORAGE_PATH}")
PYEOF
# Run the login script in the background
source ~/.notebooklm-venv/bin/activate
python3 /tmp/nlm_login.py > /tmp/nlm_login_output.txt 2>&1 &
echo "Login started (PID=$!). Browser should open in a few seconds..."
```
Wait ~10 seconds for the browser to open, then ask the user if they can see the browser and are signed in.
Once the user confirms they are on the NotebookLM homepage, save the session:
```bash
touch /tmp/nlm_save_signal
sleep 8
cat /tmp/nlm_login_output.txt
```
Then verify authentication:
```bash
export PATH="$HOME/bin:$PATH"
notebooklm auth check
notebooklm list
```
If auth passes (SID cookie present), confirm to the user that NotebookLM is set up and ready. Clean up the temp script:
```bash
rm -f /tmp/nlm_login.py /tmp/nlm_login_output.txt /tmp/nlm_save_signal
```
If auth fails (SID cookie missing), the user may not have fully signed in. Delete the browser profile and retry:
```bash
rm -rf ~/.notebooklm/browser_profile ~/.notebooklm/storage_state.json
```
Then run the login script again from the top.
---
## Adding NotebookLM to Co-work
When the user asks to "add this to Co-work", "use this in Co-work", or "make this work in Co-work":
### Step 1: Check auth exists
```bash
cat ~/.notebooklm/storage_state.json > /dev/null 2>&1
```
If it doesn't exist, run the install and authenticate steps above first.
### Step 2: Generate the Co-work skill file
Read the contents of this skill file you are currently using. Then read the contents of `~/.notebooklm/storage_state.json`.
**IMPORTANT — Strip cookies before embedding:** Co-work is sandboxed and can't read local files, so cookies must be inlined. But the full storage_state.json contains duplicate cookies across multiple Google domains (.google.ae, .google.co.uk, .youtube.com, etc.) that are NOT needed. Strip them to save ~55% of tokens.
Run this to generate the minimal auth JSON:
```bash
python3 << 'PYEOF'
import json
with open("$HOME/.notebooklm/storage_state.json") as f:
data = json.load(f)
# Only these domains are needed for NotebookLM auth
essential_domains = {".google.com", "notebooklm.google.com", "accounts.google.com"}
# Skip analytics/tracking cookies
skip_names = {"_gcl_au", "_ga", "_ga_W0LDH41ZCB", "OTZ", "ACCOUNT_CHOOSER"}
stripped = {
"cookies": [c for c in data["cookies"] if c["domain"] in essential_domains and c["name"] not in skip_names],
"origins": [o for o in data.get("origins", []) if "notebooklm" in o.get("origin", "")]
}
print(json.dumps(stripped, separators=(',',':')))
PYEOF
```
Create a MODIFIED copy of this skill file where you replace the entire "Step 0: Setup" section and "Adding NotebookLM to Co-work" section with an Auto-Authentication section that inlines the stripped cookies.
### Step 3: Save and instruct
Save the file to the user's Desktop as `NotebookLMSkill-Cowork.md`.
---
## When This Skill Activates
**Explicit:** User says "/notebooklm", "use notebooklm", "install notebooklm", or mentions the tool by name
**Intent detection:** Recognize requests like:
- "Create a podcast about [topic]"
- "Summarise these URLs/documents"
- "Generate a quiz from my research"
- "Turn this into an audio overview"
- "Create flashcards for studying"
- "Generate a video explainer"
- "Make an infographic"
- "Create a mind map of the concepts"
## Autonomy Rules
**Run automatically (no confirmation):**
- `notebooklm status` - check context
- `notebooklm auth check` - diagnose auth issues
- `notebooklm list` - list notebooks
- `notebooklm source list` - list sources
- `notebooklm artifact list` - list artifacts
- `notebooklm language list` - list supported languages
- `notebooklm use <id>` - set context
- `notebooklm create` - create notebook
- `notebooklm ask "..."` - chat queries
- `notebooklm source add` - add sources
**Ask before running:**
- `notebooklm delete` - destructive
- `notebooklm generate *` - long-running, may fail
- `notebooklm download *` - writes to filesystem
- `notebooklm ask "..." --save-as-note` - writes a note
## Quick Reference
| Task | Command |
|------|---------|
| List notebooks | `notebooklm list` |
| Create notebook | `notebooklm create "Title"` |
| Set context | `notebooklm use <notebook_id>` |
| Add URL source | `notebooklm source add "https://..."` |
| Add file | `notebooklm source add ./file.pdf` |
| Add YouTube | `notebooklm source add "https://youtube.com/..."` |
| Web research | `notebooklm source add-research "query"` |
| Chat | `notebooklm ask "question"` |
| Generate podcast | `notebooklm generate audio "instructions"` |
| Generate video | `notebooklm generate video "instructions"` |
| Generate report | `notebooklm generate report --format briefing-doc` |
| Generate quiz | `notebooklm generate quiz` |
| Generate flashcards | `notebooklm generate flashcards` |
| Generate infographic | `notebooklm generate infographic` |
| Generate mind map | `notebooklm generate mind-map` |
| Generate slide deck | `notebooklm generate slide-deck` |
| Download audio | `notebooklm download audio ./output.mp3` |
| Download video | `notebooklm download video ./output.mp4` |
| Download slides | `notebooklm download slide-deck ./slides.pptx --format pptx` |
## Generation Types
| Type | Command | Formats | Download |
|------|---------|---------|----------|
| Podcast | `generate audio` | deep-dive, brief, critique, debate | .mp3 |
| Video | `generate video` | explainer, brief + 9 visual styles | .mp4 |
| Slide Deck | `generate slide-deck` | detailed, presenter | .pdf / .pptx |
| Report | `generate report` | briefing-doc, study-guide, blog-post, custom | .md |
| Quiz | `generate quiz` | easy, medium, hard | .json / .md / .html |
| Flashcards | `generate flashcards` | easy, medium, hard | .json / .md / .html |
| Infographic | `generate infographic` | landscape, portrait, square | .png |
| Mind Map | `generate mind-map` | (instant) | .json |
| Data Table | `generate data-table` | description required | .csv |
## Error Handling
| Error | Cause | Action |
|-------|-------|--------|
| Auth/cookie error | Session expired | Re-authenticate |
| "No notebook context" | Context not set | Run `notebooklm use <id>` |
| Rate limiting | Google throttle | Wait 5-10 min, retry |
| Download fails | Generation incomplete | Check `artifact list` for status |
## Known Limitations
- Audio, video, quiz, flashcard, infographic, and slide deck generation may fail due to Google rate limits
- Generation times: audio 10-20 min, video 15-45 min, quiz/flashcards 5-15 min
- This is an unofficial API — Google can change things without warning
First run is automatic
You don't need to manually install anything. The first time you say /notebooklm or "create a podcast about X", Claude detects that the CLI isn't installed and runs the full setup for you. Just follow the prompts.
Example Workflows
Here are some practical ways to use this skill. Each one is a single conversation in Claude Code.
Research to Podcast
Turn a collection of sources into a polished AI podcast episode:
1. Add your sources
URLs, PDFs, YouTube videos — mix and match up to 50 sources per notebook
2. Generate the podcast
Choose deep-dive, brief, critique, or debate format. Set length to short, default, or long.
3. Wait for generation
Audio takes 10–20 minutes. Claude checks status automatically and tells you when it's done.
4. Download
Downloads as .mp3 to wherever you specify. Ready to upload or edit.
Document Deep-Dive
notebooklm ask "What are the key findings?"
notebooklm generate report --format briefing-doc
notebooklm generate flashcards
Content repurposing
Feed in a YouTube video or blog post, then generate a podcast, slide deck, and quiz from the same source. One piece of content becomes four — all from one Claude Code conversation.
Quick Reference
Keep this table handy for the commands you'll use most often.
| Task | Command |
|---|---|
| List notebooks | notebooklm list |
| Create notebook | notebooklm create "Title" |
| Add URL source | notebooklm source add "https://..." |
| Add YouTube | notebooklm source add "https://youtube.com/..." |
| Web research | notebooklm source add-research "query" |
| Chat with sources | notebooklm ask "question" |
| Generate podcast | notebooklm generate audio "instructions" |
| Generate video | notebooklm generate video "instructions" |
| Generate slides | notebooklm generate slide-deck |
| Download audio | notebooklm download audio ./podcast.mp3 |
| Download video | notebooklm download video ./video.mp4 |
| Check status | notebooklm artifact list |
Generation times vary
Audio: 10–20 minutes. Video: 15–45 minutes. Quizzes and flashcards: 5–15 minutes. Mind maps are instant. Claude waits and checks automatically — you don't need to babysit it.
Unofficial API disclaimer
This skill uses notebooklm-py, an unofficial Python wrapper around NotebookLM's internal API. Google could change things without warning. If something breaks, check for library updates: pip install --upgrade notebooklm-py
Ready to go deeper?
Take your skills to the next level with these resources.
Wright Mode Membership
Join a community of women entrepreneurs implementing AI and automation in their businesses. Live calls, templates, and ongoing support.
Claude Masterclass
Learn how to use Claude like a pro. From prompting fundamentals to building real workflows that save hours every week.
Claude Code Masterclass
Go beyond the chat interface. Build automations, process data, and create tools with Claude Code — no developer experience needed.