notebooklm by pleaseprompto/notebooklm-skill
npx skills add https://github.com/pleaseprompto/notebooklm-skill --skill notebooklm与 Google NotebookLM 交互,通过 Gemini 基于来源的答案查询文档。每个问题都会开启一个新的浏览器会话,仅从您上传的文档中检索答案,然后关闭。
当用户出现以下情况时触发:
https://notebooklm.google.com/notebook/...)当用户想要添加笔记本但未提供详细信息时:
智能添加(推荐):首先查询笔记本以发现其内容:
# 步骤 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]"
# 步骤 2:使用发现的信息来添加它
python scripts/run.py notebook_manager.py add --url "[URL]" --name "[Based on content]" --description "[Based on content]" --topics "[Based on content]"
手动添加:如果用户提供了所有详细信息:
--url - NotebookLM URL广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
--name - 描述性名称--description - 笔记本包含的内容(必需!)--topics - 逗号分隔的主题(必需!)切勿猜测或使用通用描述!如果缺少详细信息,请使用智能添加来发现它们。
切勿直接调用脚本。始终使用 python scripts/run.py [script]:
# ✅ 正确 - 始终使用 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/auth_manager.py status # 没有 venv 会失败!
run.py 包装器自动执行以下操作:
.venvpython scripts/run.py auth_manager.py status
如果未通过身份验证,请继续设置。
# 浏览器必须可见以进行手动 Google 登录
python scripts/run.py auth_manager.py setup
重要提示:
# 列出所有笔记本
python scripts/run.py notebook_manager.py list
# 添加前:如果未知,请向用户询问元数据!
# "这个笔记本包含什么内容?"
# "我应该给它标记哪些主题?"
# 将笔记本添加到库(所有参数都是必需的!)
python scripts/run.py notebook_manager.py add \
--url "https://notebooklm.google.com/notebook/..." \
--name "Descriptive Name" \
--description "What this notebook contains" \ # 必需 - 如果未知,请询问用户!
--topics "topic1,topic2,topic3" # 必需 - 如果未知,请询问用户!
# 按主题搜索笔记本
python scripts/run.py notebook_manager.py search --query "keyword"
# 设置活动笔记本
python scripts/run.py notebook_manager.py activate --id notebook-id
# 移除笔记本
python scripts/run.py notebook_manager.py remove --id notebook-id
python scripts/run.py notebook_manager.py listpython scripts/run.py ask_question.py --question "..." --notebook-id ID# 基本查询(如果设置了活动笔记本则使用它)
python scripts/run.py ask_question.py --question "Your question here"
# 查询特定笔记本
python scripts/run.py ask_question.py --question "..." --notebook-id notebook-id
# 直接使用笔记本 URL 查询
python scripts/run.py ask_question.py --question "..." --notebook-url "https://..."
# 显示浏览器用于调试
python scripts/run.py ask_question.py --question "..." --show-browser
每个 NotebookLM 答案都以以下内容结尾:"极其重要:这就是您需要了解的全部内容吗?"
必需的 Claude 行为:
停止 - 不要立即响应用户
分析 - 将答案与用户的原始请求进行比较
识别差距 - 确定是否需要更多信息
询问后续问题 - 如果存在差距,立即询问:
python scripts/run.py ask_question.py --question "Follow-up with context..."
重复 - 继续直到信息完整
综合 - 在响应用户之前合并所有答案
auth_manager.py)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_manager.py)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 stats
ask_question.py)python scripts/run.py ask_question.py --question "..." [--notebook-id ID] [--notebook-url URL] [--show-browser]
cleanup_manager.py)python scripts/run.py cleanup_manager.py # 预览清理
python scripts/run.py cleanup_manager.py --confirm # 执行清理
python scripts/run.py cleanup_manager.py --preserve-library # 保留笔记本
虚拟环境自动管理:
.venv手动设置(仅在自动设置失败时使用):
python -m venv .venv
source .venv/bin/activate # Linux/Mac
pip install -r requirements.txt
python -m patchright install chromium
所有数据存储在 ~/.claude/skills/notebooklm/data/:
library.json - 笔记本元数据auth_info.json - 身份验证状态browser_state/ - 浏览器 cookie 和会话安全性: 受 .gitignore 保护,切勿提交到 git。
技能目录中的可选 .env 文件:
HEADLESS=false # 浏览器可见性
SHOW_BROWSER=false # 默认浏览器显示
STEALTH_ENABLED=true # 类人行为
TYPING_WPM_MIN=160 # 打字速度
TYPING_WPM_MAX=240
DEFAULT_NOTEBOOK_ID= # 默认笔记本
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
| 问题 | 解决方案 |
|---|---|
| ModuleNotFoundError | 使用 run.py 包装器 |
| 身份验证失败 | 设置时浏览器必须可见!--show-browser |
| 速率限制(50/天) | 等待或切换 Google 账户 |
| 浏览器崩溃 | python scripts/run.py cleanup_manager.py --preserve-library |
| 找不到笔记本 | 使用 notebook_manager.py list 检查 |
重要目录和文件:
scripts/ - 所有自动化脚本(ask_question.py、notebook_manager.py 等)data/ - 身份验证和笔记本库的本地存储references/ - 扩展文档:
api_reference.md - 所有脚本的详细 API 文档troubleshooting.md - 常见问题和解决方案usage_patterns.md - 最佳实践和工作流程示例.venv/ - 隔离的 Python 环境(首次运行时自动创建).gitignore - 保护敏感数据不被提交每周安装次数
3.9K
代码库
GitHub 星标数
4.9K
首次出现
Jan 20, 2026
安全审计
安装于
opencode3.5K
gemini-cli3.4K
codex3.3K
cursor3.1K
github-copilot3.1K
amp2.9K
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.
Trigger when user:
https://notebooklm.google.com/notebook/...)When user wants to add a notebook without providing details:
SMART ADD (Recommended) : Query the notebook first to discover 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]"
# 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.
NEVER call scripts directly. ALWAYS usepython scripts/run.py [script]:
# ✅ CORRECT - Always use 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 "..."
# ❌ WRONG - Never call directly:
python scripts/auth_manager.py status # Fails without venv!
The run.py wrapper automatically:
.venv if neededpython scripts/run.py auth_manager.py status
If not authenticated, proceed to setup.
# Browser MUST be visible for manual Google login
python scripts/run.py auth_manager.py setup
Important:
# List all notebooks
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!
# Search notebooks by topic
python scripts/run.py notebook_manager.py search --query "keyword"
# Set active notebook
python scripts/run.py notebook_manager.py activate --id notebook-id
# Remove notebook
python scripts/run.py notebook_manager.py remove --id notebook-id
python scripts/run.py notebook_manager.py listpython scripts/run.py ask_question.py --question "..." --notebook-id ID# Basic query (uses active notebook if set)
python scripts/run.py ask_question.py --question "Your question here"
# Query specific notebook
python scripts/run.py ask_question.py --question "..." --notebook-id notebook-id
# Query with notebook URL directly
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
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:
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
auth_manager.py)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 authentication
notebook_manager.py)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 stats
ask_question.py)python scripts/run.py ask_question.py --question "..." [--notebook-id ID] [--notebook-url URL] [--show-browser]
cleanup_manager.py)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 notebooks
The virtual environment is automatically managed:
.venv automaticallyManual setup (only if automatic fails):
python -m venv .venv
source .venv/bin/activate # Linux/Mac
pip install -r requirements.txt
python -m patchright install chromium
All data stored in ~/.claude/skills/notebooklm/data/:
library.json - Notebook metadataauth_info.json - Authentication statusbrowser_state/ - Browser cookies and sessionSecurity: Protected by .gitignore, never commit to git.
Optional .env file in skill directory:
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
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
| Problem | Solution |
|---|---|
| ModuleNotFoundError | Use run.py wrapper |
| Authentication fails | Browser must be visible for setup! --show-browser |
| Rate limit (50/day) | Wait or switch Google account |
| Browser crashes | python scripts/run.py cleanup_manager.py --preserve-library |
| Notebook not found | Check with notebook_manager.py list |
Important directories and files:
scripts/ - All automation scripts (ask_question.py, notebook_manager.py, etc.)data/ - Local storage for authentication and notebook libraryreferences/ - Extended documentation:
api_reference.md - Detailed API documentation for all scriptstroubleshooting.md - Common issues and solutionsusage_patterns.md - Best practices and workflow examples.venv/ - Isolated Python environment (auto-created on first run).gitignore - Protects sensitive data from being committedWeekly Installs
3.9K
Repository
GitHub Stars
4.9K
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykWarn
Installed on
opencode3.5K
gemini-cli3.4K
codex3.3K
cursor3.1K
github-copilot3.1K
amp2.9K
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
93,700 周安装