跳到正文
Skillpedia
调研20k · #10389

notebooklm

它能做什么

这项技能指导 AI 安装并使用 Gemini Notebook 的 notebooklm-py 工具。它涵盖笔记本、来源、有依据的对话、研究和下载。适合希望自动化管理笔记本的人。

适用场景

  • ✓你想在 Gemini Notebook 中添加来源,并从命令行对其提问的时候。
  • ✓你想从笔记本生成或下载成果物,用于报告或摘要的时候。
  • ✓你需要帮助安装 notebooklm 工具或登录它的时候。

技能链接

https://github.com/teng-lin/notebooklm-py/blob/main/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/teng-lin/notebooklm-py/blob/main/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请把这三个 PDF 添加到我的 Gemini Notebook 中,并请它总结主要风险。”

每周 5 个新技能,1 分钟读完。

工作原理

AI 会安装 notebooklm-py 包,登录你的账户,然后运行使用明确笔记本 ID 的命令。对于应用代码,它改用 Python API。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Gemini Notebook Automation

Use the notebooklm CLI for agent workflows. Prefer --json and explicit IDs so every operation is inspectable and safe under concurrency. Use the typed async Python API only when the user requests application code or the CLI cannot express the workflow. The readiness, identity, authorization, and credential-handling rules below apply to both interfaces.

Setup and Authentication

Requires Python 3.10+. Install the package in the user's existing environment; do not create a separate environment unless requested:

pip install "notebooklm-py[browser]"
pip install "notebooklm-py[cookies]"  # optional browser-cookie extraction

If system pip reports externally-managed-environment, do not use --break-system-packages. For CLI-only use, offer uv tool install "notebooklm-py[browser]" or the equivalent pipx command; for application code, use the user's active project environment.

For unattended or headless work, prefer durable profile-backed master-token auth over a copied cookie snapshot. Install pip install "notebooklm-py[headless]"; the one-time automatic OAuth capture also needs [browser]. On a trusted workstation run notebooklm login --master-token --account <email>, then deploy master_token.json, not storage_state.json, to the selected profile. NOTEBOOKLM_HOME selects the private base directory and NOTEBOOKLM_PROFILE selects its profile; defaults resolve to ~/.notebooklm/profiles/default/master_token.json.

In CI, NOTEBOOKLM_MASTER_TOKEN_JSON is a secret-transport convention, not an environment variable the package reads directly. Write its exact value to the selected profile's master_token.json with mode 0600, unset it, then run notebooklm auth refresh to mint storage_state.json. A sibling master token can automatically re-mint expired file-backed cookies. Inline NOTEBOOKLM_AUTH_JSON is only a short-lived fallback; it bypasses this recovery path.

Use PyPI or a release tag, not an unreleased main checkout. When available, consult the installation guide.

Before a workflow, verify real authentication rather than merely parsing the cookie file:

notebooklm auth check --test --json

Require .status == "ok" and .checks.token_fetch == true. If validation fails:

  • With a display, run notebooklm login and validate again.
  • In a headless environment, install [cookies] and use notebooklm login --browser-cookies <browser>. Use notebooklm auth inspect --browser <browser> first when account selection is unclear.
  • If previously valid cookies became stale, try notebooklm auth refresh; use notebooklm auth refresh --browser-cookies <browser> after signing back into the browser.

The normal --test preflight may heal and persist refreshed cookies. Add --passive when the check must be strictly read-only, including the failure-diagnosis workflow below.

notebooklm status reports selected-notebook context, not authentication.

Treat both auth files as bearer credentials: never print, log, or commit them. A master token is a durable full-account credential that survives password changes; use a dedicated account, protect it in a secret store and as 0600 on disk, and explicitly revoke it if exposed.

Operating Invariants

  1. Use --json for discovery and mutations, then retain the returned full UUIDs. Important envelopes are .notebook.id from create, .source.id from source add, and .task_id from asynchronous generators. generate mind-map instead returns mind_map, note_id, and kind; both kinds return a finished result with no task ID or separate artifact wait step.
  2. Pass -n/--notebook <id> on every notebook-scoped command in automation or concurrent work. Do not rely on notebooklm use. For every concurrent run, also set a unique NOTEBOOKLM_PROFILE=agent-<id> so context and profile writes are isolated. A new profile has no credentials: put a master_token.json copy in that profile and mint its storage before use. Never share one writable storage_state.json across agents.
  3. After adding sources, retain every .source.id, then run source wait for each before chat or generation. The add envelope has no status. Require wait exit 0 and status == "ready"; let the waiter handle media-specific transient error rows.
  4. After an asynchronous generator returns a task/artifact ID, pa
常见问题

这和 Gemini API 是一回事吗?

不是。这项技能针对的是 Gemini Notebook,不涵盖通用的 Gemini API。

我需要安装什么?

Python 3.10 或更高版本,以及 notebooklm-py 包,并附带用于登录的浏览器附加组件。

它如何处理我的登录?

对于无人值守的工作,技能更倾向使用基于配置文件的令牌,而不是复制的 Cookie。

详情

作者的原始描述

Install, authenticate, troubleshoot, and operate Gemini Notebook through the notebooklm-py CLI or typed async Python API. Use for notebook and source management, grounded chat and research, and artifact generation or download when the user mentions Gemini Notebook, notebooklm-py, the notebooklm CLI, or its Python API. Do not use for the generic Gemini API or unrelated content creation.

repo: teng-lin/notebooklm-py

热度

GitHub 星标
20k
排名
#10389
许可证
MIT
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

相似技能