notebooklm
できること
このスキルは、Gemini Notebook 向けの notebooklm-py ツールをインストールして使う流れを AI に案内します。ノートブック、ソース、根拠のあるチャット、リサーチ、ダウンロードを扱います。ノートブックを自動化したい人向けです。
使う場面
- ✓Gemini Notebook にソースを追加し、コマンドラインからそれについて質問したいとき。
- ✓レポートや要約のために、ノートブックから成果物を生成またはダウンロードしたいとき。
- ✓notebooklm ツールのインストールやサインインの手助けが必要なとき。
スキルのリンク
https://github.com/teng-lin/notebooklm-py/blob/main/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私の Gemini Notebook に 3 つの PDF を追加して、主なリスクの要約を作成してください。”
毎週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 loginand validate again. - In a headless environment, install
[cookies]and usenotebooklm login --browser-cookies <browser>. Usenotebooklm auth inspect --browser <browser>first when account selection is unclear. - If previously valid cookies became stale, try
notebooklm auth refresh; usenotebooklm 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
- Use
--jsonfor discovery and mutations, then retain the returned full UUIDs. Important envelopes are.notebook.idfromcreate,.source.idfromsource add, and.task_idfrom asynchronous generators.generate mind-mapinstead returnsmind_map,note_id, andkind; both kinds return a finished result with no task ID or separateartifact waitstep. - Pass
-n/--notebook <id>on every notebook-scoped command in automation or concurrent work. Do not rely onnotebooklm use. For every concurrent run, also set a uniqueNOTEBOOKLM_PROFILE=agent-<id>so context and profile writes are isolated. A new profile has no credentials: put amaster_token.jsoncopy in that profile and mint its storage before use. Never share one writablestorage_state.jsonacross agents. - After adding sources, retain every
.source.id, then runsource waitfor each before chat or generation. The add envelope has no status. Require wait exit 0 andstatus == "ready"; let the waiter handle media-specific transienterrorrows. - After an asynchronous generator returns a task/artifact ID, pa
よくある質問
Gemini API と同じものですか?
いいえ。このスキルは Gemini Notebook 向けで、一般的な Gemini API は扱いません。
何をインストールする必要がありますか?
Python 3.10 以降と、サインイン用のブラウザーの追加機能を含む notebooklm-py パッケージです。
ログイン情報はどう扱いますか?
無人の作業では、コピーしたクッキーよりもプロファイルベースのトークンを優先します。
詳細
作者による元の説明
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
コメント
- …