home / skills / sanjay3290 / ai-skills / notebooklm

notebooklm skill

/skills/notebooklm

This skill helps you query and manage NotebookLM notebooks with persistent profiles, batch questions, and structured exports.

npx playbooks add skill sanjay3290/ai-skills --skill notebooklm

Review the files below or copy the command above to add this skill to your agents.

Files (13)
SKILL.md
2.6 KB
---
name: notebooklm
description: "Query and manage Google NotebookLM notebooks with persistent profile auth, source sync, batch/multi queries, and structured exports. Use when user asks to query NotebookLM, 'ask my notebook', shares NotebookLM notebook URLs, wants to list/create notebooks, manage sources, do bulk folder sync, dedupe, or audit exports."
license: Apache-2.0
metadata:
  author: sanjay3290
  version: "1.0"
---

# NotebookLM Skill

Query NotebookLM notebooks and manage notebooks/sources via Playwright browser automation.

All commands run from the skill directory. All scripts output JSON to stdout and exit 1 on error. Use `--help` on any script for full flag reference.

## Workflow

1. **Authenticate**: `python scripts/auth_manager.py setup --profile <name>`
2. **Register notebook**: `python scripts/notebook_manager.py add --url <url> --name <name> --description <desc> --topics <topics>`
3. **Ask questions**: `python scripts/ask_question.py --question "..." --notebook-id <id>`
4. **Manage sources**: `python scripts/remote_manager.py add-source|sync-sources ...`

## Key Behaviors

- Runs headless by default; use `--show-browser` for debugging only.
- Persistent Chrome profiles stored at `~/.config/claude/notebooklm-skill/` (override with `NOTEBOOKLM_DATA_DIR`).
- Hash-based dedupe: file uploads skip unchanged sources automatically.
- `--dry-run` available on all destructive/bulk operations (create, add-source, delete-source, sync-sources).
- `--retries N` retries transient browser failures with screenshot/HTML artifact capture.
- Batch mode (`--questions "q1||q2||q3"`) and multi-notebook comparison (`--compare-notebook-ids`) supported.
- Exports to JSON or Markdown via `--export-format markdown --save-notes`.
- Answers include a follow-up reminder prompting Claude to ask clarifying questions before replying.

## Quick Reference

```bash
# Auth
python scripts/auth_manager.py setup --profile work
python scripts/auth_manager.py status --profile work

# Library
python scripts/notebook_manager.py add --url "..." --name "..." --description "..." --topics "..."
python scripts/notebook_manager.py list

# Ask
python scripts/ask_question.py --question "..." --notebook-id <id>
python scripts/ask_question.py --questions "q1||q2" --notebook-id <id>

# Sources
python scripts/remote_manager.py add-source --notebook-id <id> --dir ./docs --recursive
python scripts/remote_manager.py sync-sources --notebook-id <id> --dir ./docs --recursive --delete-missing --dry-run
```

For full command reference with all flags and examples, see [references/commands.md](references/commands.md).

Overview

This skill lets you query and manage Google NotebookLM notebooks through automated browser interactions with persistent profile authentication. It supports registering notebooks, syncing and deduplicating sources, running single or batch queries, multi-notebook comparisons, and structured exports to JSON or Markdown. Designed for reproducible workflows, it writes machine-friendly JSON to stdout and exits nonzero on error.

How this skill works

The skill uses Playwright-driven headless Chrome with persistent profiles to authenticate and interact with NotebookLM web UI. Scripts run from the skill directory, accept command-line flags for all operations, and emit JSON output. Key features include hash-based dedupe for source uploads, dry-run and retry controls, batch/multi-query modes, and export options (JSON/Markdown) with artifact capture on failures.

When to use it

  • You want to ask questions of a specific NotebookLM notebook or run multiple questions in batch.
  • You need to register, list, or describe NotebookLM notebooks programmatically.
  • You need to add, sync, or dedupe local folders and files into a NotebookLM notebook.
  • You want to compare answers across multiple notebooks or run bulk audits/exports.
  • You require reproducible, scriptable exports of notes and answers for downstream processing.

Best practices

  • Create a named persistent profile with auth_manager.py setup and reuse it for all scripts.
  • Run destructive or bulk operations with --dry-run first to preview changes before applying them.
  • Use --retries N to handle transient browser flakiness and capture screenshots/HTML on failures.
  • Store large or frequently-updated sources in a consistent directory layout to maximize hash-based dedupe.
  • Use batch questions (q1||q2||q3) and compare-notebook-ids for efficient multi-query workflows.

Example use cases

  • Onboard a new NotebookLM notebook with notebook_manager.py add, then bulk-add a docs folder via remote_manager.py add-source.
  • Run nightly sync with remote_manager.py sync-sources --recursive --delete-missing --dry-run to validate changes before commit.
  • Ask a notebook a series of research questions in batch and export answers to Markdown for inclusion in a report.
  • Compare responses from two notebooks on the same question set using --compare-notebook-ids to audit knowledge drift.
  • Perform large export of notes and metadata to JSON for archival or downstream analysis.

FAQ

How do I authenticate and persist credentials?

Run python scripts/auth_manager.py setup --profile <name>. Profiles are stored by default under ~/.config/claude/notebooklm-skill/ or override with NOTEBOOKLM_DATA_DIR.

Can I preview destructive operations?

Yes. All destructive and bulk commands include --dry-run to show intended changes without applying them.

How does deduplication work for sources?

Files are hashed and uploads skip unchanged content to avoid duplicate ingestion.