notebooklm
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNotebookLM Research Assistant Skill
NotebookLM 研究助手技能
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.
与Google NotebookLM交互,查询文档并获得Gemini提供的有来源支撑的答案。每次提问都会打开一个全新的浏览器会话,仅从你上传的文档中检索答案后关闭会话。
When to Use This Skill
何时使用该技能
Trigger when user:
- Mentions NotebookLM explicitly
- Shares NotebookLM URL ()
https://notebooklm.google.com/notebook/... - Asks to query their notebooks/documentation
- Wants to add documentation to NotebookLM library
- Uses phrases like "ask my NotebookLM", "check my docs", "query my notebook"
当用户出现以下行为时触发:
- 明确提到NotebookLM
- 分享NotebookLM链接()
https://notebooklm.google.com/notebook/... - 要求查询自己的笔记本/文档
- 想要将文档添加到NotebookLM库中
- 使用类似“询问我的NotebookLM”、“检查我的文档”、“查询我的笔记本”这类表述
⚠️ CRITICAL: Add Command - Smart Discovery
⚠️ 关键要求:添加命令 - 智能发现
When user wants to add a notebook without providing details:
SMART ADD (Recommended): Query the notebook first to discover its content:
bash
undefined当用户想要添加笔记本但未提供细节时:
智能添加(推荐):先查询笔记本内容,自动识别相关信息:
bash
undefinedStep 1: Query the notebook about its content
步骤1:查询笔记本的内容信息
python scripts/run.py ask_question.py --question "What is the content of this notebook? What topics are covered? Provide a complete overview briefly and concisely" --notebook-url "[URL]"
python scripts/run.py ask_question.py --question "What is the content of this notebook? What topics are covered? Provide a complete overview briefly and concisely" --notebook-url "[URL]"
Step 2: Use the discovered information to add it
步骤2:使用识别到的信息添加笔记本
python scripts/run.py notebook_manager.py add --url "[URL]" --name "[Based on content]" --description "[Based on content]" --topics "[Based on content]"
**MANUAL ADD**: If user provides all details:
- `--url` - The NotebookLM URL
- `--name` - A descriptive name
- `--description` - What the notebook contains (REQUIRED!)
- `--topics` - Comma-separated topics (REQUIRED!)
NEVER guess or use generic descriptions! If details missing, use Smart Add to discover them.python scripts/run.py notebook_manager.py add --url "[URL]" --name "[基于内容生成]" --description "[基于内容生成]" --topics "[基于内容生成]"
**手动添加**:如果用户提供了所有信息:
- `--url` - NotebookLM链接
- `--name` - 描述性名称
- `--description` - 笔记本包含的内容(必填!)
- `--topics` - 英文逗号分隔的主题标签(必填!)
绝对不要猜测或使用通用描述!如果信息缺失,请使用智能添加功能自动识别。Critical: Always Use run.py Wrapper
关键要求:始终使用run.py封装脚本
NEVER call scripts directly. ALWAYS use :
python scripts/run.py [script]bash
undefined绝对不要直接调用脚本,始终使用 :
python scripts/run.py [脚本名称]bash
undefined✅ CORRECT - Always use run.py:
✅ 正确用法 - 始终使用run.py:
python scripts/run.py auth_manager.py status
python scripts/run.py notebook_manager.py list
python scripts/run.py ask_question.py --question "..."
python scripts/run.py auth_manager.py status
python scripts/run.py notebook_manager.py list
python scripts/run.py ask_question.py --question "..."
❌ WRONG - Never call directly:
❌ 错误用法 - 不要直接调用:
python scripts/auth_manager.py status # Fails without venv!
The `run.py` wrapper automatically:
1. Creates `.venv` if needed
2. Installs all dependencies
3. Activates environment
4. Executes script properlypython scripts/auth_manager.py status # 没有虚拟环境会运行失败!
`run.py` 封装脚本会自动完成以下操作:
1. 必要时自动创建 `.venv` 虚拟环境
2. 安装所有依赖
3. 激活虚拟环境
4. 正确执行脚本Core Workflow
核心工作流
Step 1: Check Authentication Status
步骤1:检查认证状态
bash
python scripts/run.py auth_manager.py statusIf not authenticated, proceed to setup.
bash
python scripts/run.py auth_manager.py status如果未认证,继续进行认证设置。
Step 2: Authenticate (One-Time Setup)
步骤2:认证(仅需首次设置)
bash
undefinedbash
undefinedBrowser MUST be visible for manual Google login
浏览器必须可见,用于手动完成Google登录
python scripts/run.py auth_manager.py setup
**Important:**
- Browser is VISIBLE for authentication
- Browser window opens automatically
- User must manually log in to Google
- Tell user: "A browser window will open for Google login"python scripts/run.py auth_manager.py setup
**重要说明:**
- 认证过程中浏览器是可见的
- 浏览器窗口会自动打开
- 用户需要手动完成Google账号登录
- 需要告知用户:"将打开一个浏览器窗口用于Google登录"Step 3: Manage Notebook Library
步骤3:管理笔记本库
bash
undefinedbash
undefinedList all notebooks
列出所有笔记本
python scripts/run.py notebook_manager.py list
python scripts/run.py notebook_manager.py list
BEFORE ADDING: Ask user for metadata if unknown!
添加前注意:如果不知道元数据,需要先询问用户!
"What does this notebook contain?"
"这个笔记本包含什么内容?"
"What topics should I tag it with?"
"我应该给它打上什么主题标签?"
Add notebook to library (ALL parameters are REQUIRED!)
添加笔记本到库中(所有参数均为必填项!)
python scripts/run.py notebook_manager.py add
--url "https://notebooklm.google.com/notebook/..."
--name "Descriptive Name"
--description "What this notebook contains" \ # REQUIRED - ASK USER IF UNKNOWN! --topics "topic1,topic2,topic3" # REQUIRED - ASK USER IF UNKNOWN!
--url "https://notebooklm.google.com/notebook/..."
--name "Descriptive Name"
--description "What this notebook contains" \ # REQUIRED - ASK USER IF UNKNOWN! --topics "topic1,topic2,topic3" # REQUIRED - ASK USER IF UNKNOWN!
python scripts/run.py notebook_manager.py add
--url "https://notebooklm.google.com/notebook/..."
--name "描述性名称"
--description "笔记本包含的内容" \ # 必填 - 未知时请询问用户! --topics "主题1,主题2,主题3" # 必填 - 未知时请询问用户!
--url "https://notebooklm.google.com/notebook/..."
--name "描述性名称"
--description "笔记本包含的内容" \ # 必填 - 未知时请询问用户! --topics "主题1,主题2,主题3" # 必填 - 未知时请询问用户!
Search notebooks by topic
按主题搜索笔记本
python scripts/run.py notebook_manager.py search --query "keyword"
python scripts/run.py notebook_manager.py search --query "关键词"
Set active notebook
设置当前活跃笔记本
python scripts/run.py notebook_manager.py activate --id notebook-id
python scripts/run.py notebook_manager.py activate --id 笔记本ID
Remove notebook
删除笔记本
python scripts/run.py notebook_manager.py remove --id notebook-id
undefinedpython scripts/run.py notebook_manager.py remove --id 笔记本ID
undefinedQuick Workflow
快速工作流
- Check library:
python scripts/run.py notebook_manager.py list - Ask question:
python scripts/run.py ask_question.py --question "..." --notebook-id ID
- 查看笔记本库:
python scripts/run.py notebook_manager.py list - 提问:
python scripts/run.py ask_question.py --question "..." --notebook-id 笔记本ID
Step 4: Ask Questions
步骤4:提问查询
bash
undefinedbash
undefinedBasic query (uses active notebook if set)
基础查询(如果设置了活跃笔记本则默认使用)
python scripts/run.py ask_question.py --question "Your question here"
python scripts/run.py ask_question.py --question "你的问题在这里"
Query specific notebook
查询指定笔记本
python scripts/run.py ask_question.py --question "..." --notebook-id notebook-id
python scripts/run.py ask_question.py --question "..." --notebook-id 笔记本ID
Query with notebook URL directly
直接通过笔记本链接查询
python scripts/run.py ask_question.py --question "..." --notebook-url "https://..."
python scripts/run.py ask_question.py --question "..." --notebook-url "https://..."
Show browser for debugging
显示浏览器用于调试
python scripts/run.py ask_question.py --question "..." --show-browser
undefinedpython scripts/run.py ask_question.py --question "..." --show-browser
undefinedFollow-Up Mechanism (CRITICAL)
追问机制(关键要求)
Every NotebookLM answer ends with: "EXTREMELY IMPORTANT: Is that ALL you need to know?"
Required Claude Behavior:
- STOP - Do not immediately respond to user
- ANALYZE - Compare answer to user's original request
- IDENTIFY GAPS - Determine if more information needed
- ASK FOLLOW-UP - If gaps exist, immediately ask:
bash
python scripts/run.py ask_question.py --question "Follow-up with context..." - REPEAT - Continue until information is complete
- SYNTHESIZE - Combine all answers before responding to user
每个NotebookLM的回答都会以:"EXTREMELY IMPORTANT: Is that ALL you need to know?" 结尾
Claude必须遵循的行为规范:
- 停止 - 不要立即回复用户
- 分析 - 将返回的答案和用户的原始请求进行对比
- 识别差距 - 判断是否需要更多信息
- 发起追问 - 如果存在信息缺口,立即执行:
bash
python scripts/run.py ask_question.py --question "带上下文的追问内容..." - 重复 - 持续追问直到获取完整信息
- 整合 - 回复用户前整合所有答案内容
Script Reference
脚本参考
Authentication Management (auth_manager.py
)
auth_manager.py认证管理(auth_manager.py
)
auth_manager.pybash
python scripts/run.py auth_manager.py setup # Initial setup (browser visible)
python scripts/run.py auth_manager.py status # Check authentication
python scripts/run.py auth_manager.py reauth # Re-authenticate (browser visible)
python scripts/run.py auth_manager.py clear # Clear authenticationbash
python scripts/run.py auth_manager.py setup # 初始设置(浏览器可见)
python scripts/run.py auth_manager.py status # 检查认证状态
python scripts/run.py auth_manager.py reauth # 重新认证(浏览器可见)
python scripts/run.py auth_manager.py clear # 清除认证信息Notebook Management (notebook_manager.py
)
notebook_manager.py笔记本管理(notebook_manager.py
)
notebook_manager.pybash
python scripts/run.py notebook_manager.py add --url URL --name NAME --description DESC --topics TOPICS
python scripts/run.py notebook_manager.py list
python scripts/run.py notebook_manager.py search --query QUERY
python scripts/run.py notebook_manager.py activate --id ID
python scripts/run.py notebook_manager.py remove --id ID
python scripts/run.py notebook_manager.py statsbash
python scripts/run.py notebook_manager.py add --url URL --name NAME --description DESC --topics TOPICS
python scripts/run.py notebook_manager.py list
python scripts/run.py notebook_manager.py search --query QUERY
python scripts/run.py notebook_manager.py activate --id ID
python scripts/run.py notebook_manager.py remove --id ID
python scripts/run.py notebook_manager.py statsQuestion Interface (ask_question.py
)
ask_question.py提问接口(ask_question.py
)
ask_question.pybash
python scripts/run.py ask_question.py --question "..." [--notebook-id ID] [--notebook-url URL] [--show-browser]bash
python scripts/run.py ask_question.py --question "..." [--notebook-id ID] [--notebook-url URL] [--show-browser]Data Cleanup (cleanup_manager.py
)
cleanup_manager.py数据清理(cleanup_manager.py
)
cleanup_manager.pybash
python scripts/run.py cleanup_manager.py # Preview cleanup
python scripts/run.py cleanup_manager.py --confirm # Execute cleanup
python scripts/run.py cleanup_manager.py --preserve-library # Keep notebooksbash
python scripts/run.py cleanup_manager.py # 预览清理内容
python scripts/run.py cleanup_manager.py --confirm # 执行清理
python scripts/run.py cleanup_manager.py --preserve-library # 保留笔记本库Environment Management
环境管理
The virtual environment is automatically managed:
- First run creates automatically
.venv - Dependencies install automatically
- Chromium browser installs automatically
- Everything isolated in skill directory
Manual setup (only if automatic fails):
bash
python -m venv .venv
source .venv/bin/activate # Linux/Mac
pip install -r requirements.txt
python -m patchright install chromium虚拟环境会自动管理:
- 首次运行会自动创建
.venv - 自动安装所有依赖
- 自动安装Chromium浏览器
- 所有内容都隔离在技能目录下
手动设置(仅自动安装失败时使用):
bash
python -m venv .venv
source .venv/bin/activate # Linux/Mac系统
pip install -r requirements.txt
python -m patchright install chromiumData Storage
数据存储
All data stored in :
~/.claude/skills/notebooklm/data/- - Notebook metadata
library.json - - Authentication status
auth_info.json - - Browser cookies and session
browser_state/
Security: Protected by , never commit to git.
.gitignore所有数据存储在 路径下:
~/.claude/skills/notebooklm/data/- - 笔记本元数据
library.json - - 认证状态
auth_info.json - - 浏览器Cookie和会话信息
browser_state/
安全说明: 已通过 保护,永远不会提交到git。
.gitignoreConfiguration
配置
Optional file in skill directory:
.envenv
HEADLESS=false # Browser visibility
SHOW_BROWSER=false # Default browser display
STEALTH_ENABLED=true # Human-like behavior
TYPING_WPM_MIN=160 # Typing speed
TYPING_WPM_MAX=240
DEFAULT_NOTEBOOK_ID= # Default notebook可在技能目录下添加可选的 文件:
.envenv
HEADLESS=false # 浏览器可见性设置
SHOW_BROWSER=false # 默认浏览器显示设置
STEALTH_ENABLED=true # 模拟人类行为
TYPING_WPM_MIN=160 # 打字速度下限
TYPING_WPM_MAX=240
DEFAULT_NOTEBOOK_ID= # 默认笔记本IDDecision Flow
决策流程
User mentions NotebookLM
↓
Check auth → python scripts/run.py auth_manager.py status
↓
If not authenticated → python scripts/run.py auth_manager.py setup
↓
Check/Add notebook → python scripts/run.py notebook_manager.py list/add (with --description)
↓
Activate notebook → python scripts/run.py notebook_manager.py activate --id ID
↓
Ask question → python scripts/run.py ask_question.py --question "..."
↓
See "Is that ALL you need?" → Ask follow-ups until complete
↓
Synthesize and respond to user用户提到NotebookLM
↓
检查认证 → python scripts/run.py auth_manager.py status
↓
未认证 → python scripts/run.py auth_manager.py setup
↓
检查/添加笔记本 → python scripts/run.py notebook_manager.py list/add(带--description参数)
↓
激活笔记本 → python scripts/run.py notebook_manager.py activate --id ID
↓
提问 → python scripts/run.py ask_question.py --question "..."
↓
看到"Is that ALL you need?"提示 → 持续追问直到信息完整
↓
整合答案后回复用户Troubleshooting
故障排查
| Problem | Solution |
|---|---|
| ModuleNotFoundError | Use |
| Authentication fails | Browser must be visible for setup! --show-browser |
| Rate limit (50/day) | Wait or switch Google account |
| Browser crashes | |
| Notebook not found | Check with |
| 问题 | 解决方案 |
|---|---|
| ModuleNotFoundError | 使用 |
| 认证失败 | 认证设置过程中浏览器必须可见!添加--show-browser参数 |
| 速率限制(每天50次) | 等待后重试或切换Google账号 |
| 浏览器崩溃 | 执行 |
| 找不到笔记本 | 使用 |
Best Practices
最佳实践
- Always use run.py - Handles environment automatically
- Check auth first - Before any operations
- Follow-up questions - Don't stop at first answer
- Browser visible for auth - Required for manual login
- Include context - Each question is independent
- Synthesize answers - Combine multiple responses
- 始终使用run.py - 自动处理环境配置
- 优先检查认证状态 - 执行任何操作前先确认认证
- 及时追问 - 不要停留在第一个答案
- 认证时保持浏览器可见 - 手动登录需要可见窗口
- 携带上下文 - 每个提问都是独立会话
- 整合答案 - 合并多轮返回结果再回复用户
Limitations
限制说明
- No session persistence (each question = new browser)
- Rate limits on free Google accounts (50 queries/day)
- Manual upload required (user must add docs to NotebookLM)
- Browser overhead (few seconds per question)
- 无会话持久化(每次提问都是全新浏览器会话)
- 免费Google账号有速率限制(每天最多50次查询)
- 需要用户手动上传文档到NotebookLM
- 浏览器有启动开销(每次提问需要几秒加载时间)
Resources (Skill Structure)
资源(技能结构)
Important directories and files:
- - All automation scripts (ask_question.py, notebook_manager.py, etc.)
scripts/ - - Local storage for authentication and notebook library
data/ - - Extended documentation:
references/- - Detailed API documentation for all scripts
api_reference.md - - Common issues and solutions
troubleshooting.md - - Best practices and workflow examples
usage_patterns.md
- - Isolated Python environment (auto-created on first run)
.venv/ - - Protects sensitive data from being committed
.gitignore
重要目录和文件:
- - 所有自动化脚本(ask_question.py、notebook_manager.py等)
scripts/ - - 认证信息和笔记本库的本地存储
data/ - - 扩展文档:
references/- - 所有脚本的详细API文档
api_reference.md - - 常见问题和解决方案
troubleshooting.md - - 最佳实践和工作流示例
usage_patterns.md
- - 隔离Python虚拟环境(首次运行自动创建)
.venv/ - - 防止敏感数据被提交到git
.gitignore