notebooklm
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNotebookLM Research Assistant Skill
NotebookLM 研究助手Skill
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
何时使用该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
Step 1: Query the notebook about its content
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
Step 2: Use the discovered information to add it
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 "[Based on content]" --description "[Based on content]" --topics "[Based on content]"
**手动添加**:如果用户提供了所有详细信息:
- `--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 [script]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 notebook-id
Remove notebook
删除笔记本
python scripts/run.py notebook_manager.py remove --id notebook-id
undefinedpython scripts/run.py notebook_manager.py remove --id notebook-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 notebook-id
Query with notebook URL directly
直接通过NotebookLM链接查询
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的答案结尾都要加上:“非常重要:这就是你需要的全部信息吗?”
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浏览器
- 所有内容都隔离在Skill目录中
手动设置(仅当自动设置失败时使用):
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可在Skill目录中创建可选的文件:
.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 "..."
↓
显示“这就是你需要的全部信息吗?” → 持续跟进直到信息完整
↓
整合答案并回复用户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 | 使用run.py包装器 |
| 认证失败 | 设置时浏览器必须可见!使用--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)
资源(Skill结构)
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/ - - 保护敏感数据不被提交到仓库
.gitignore