i18n/skills/productivity/notebooklm-integration/SKILL.md
使用此技能直接从 Claude 中查询您的 Google NotebookLM 笔记本,以获取来自 Gemini 的基于来源、有引用支持的答案。支持浏览器自动化、库管理和持久身份验证。通过仅基于文档的响应大幅减少幻觉问题。
npx skillsauth add Jst-Well-Dan/Skill-Box notebooklmInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
与 Google NotebookLM 交互,利用 Gemini 的基于来源的回答来查询文档。每个问题都会开启一个全新的浏览器会话,排他性地从您上传的文档中检索答案,然后关闭。
当用户出现以下情况时触发:
https://notebooklm.google.com/notebook/...)当用户想要添加笔记本但未提供详细信息时:
智能添加(推荐):首先查询笔记本以发现其内容:
# 第 1 步:查询笔记本关于其内容的信息
python scripts/run.py ask_question.py --question "这本笔记本的内容是什么?涵盖了哪些主题?简明扼要地提供完整概览" --notebook-url "[URL]"
# 第 2 步:使用发现的信息将其添加
python scripts/run.py notebook_manager.py add --url "[URL]" --name "[基于内容]" --description "[基于内容]" --topics "[基于内容]"
手动添加:如果用户提供了所有详细信息:
--url - NotebookLM 的 URL--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 # 在没有虚拟环境的情况下会失败!
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 "描述性名称" \
--description "本笔记本包含的内容" \ # 必填 - 如果未知,请询问用户!
--topics "主题1,主题2,主题3" # 必填 - 如果未知,请询问用户!
# 按主题搜索笔记本
python scripts/run.py notebook_manager.py search --query "关键词"
# 设置活动笔记本
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 "在此输入您的问题"
# 查询特定笔记本
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 "结合上下文进行追问..."
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= # 默认笔记本
用户提到 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 "..."
↓
看到 "这就是您需要的全部吗?" → 继续追问直到完整
↓
综合并回复用户
| 问题 | 解决方案 |
|---------|----------|
| 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 - 防止敏感数据被提交tools
Extract frames or short clips from videos using ffmpeg.
tools
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
tools
Toolkit for creating animated GIFs optimized for Slack, with validators for size constraints and composable animation primitives. This skill applies when users request animated GIFs or emoji animations for Slack from descriptions like "make me a GIF for Slack of X doing Y".
development
Best practices for Remotion - Video creation in React