Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问clear审计异常

nblmnblm 命令行

Agent Skill

nblm 用于处理浏览器自动化、网页检查和页面信息提取,适合在 Codex、Claude、Cursor、Gemini CLI 中需要让 Agent 打开页面、读取网页或验证前端流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

155,736

周安装

6,269

GitHub Stars

29

下载量

48,888
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:nblm(nblm 命令行)
来源仓库:https://github.com/magicseek/nblm
仓库路径:skills/nblm
安装命令:
npx skills add https://github.com/magicseek/nblm --skill nblm
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/magicseek/nblm --skill nblm

简介

直接从 Claude 查询 Google NotebookLM 笔记本,获取基于来源、有引文支持的答案。

  • 通过自动浏览器登录和持久会话处理来管理多帐户 Google 身份验证
  • 支持 20 多个跨笔记本管理、源上传(文件、URL、YouTube、Z-Library、文本)和查询以及自动后续检测的命令
  • 生成媒体工件,包括播客、简报、辩论、幻灯片和具有可定制长度、格式和说明的信息图表
  • 自动环境设置,包括虚拟环境创建、依赖项安装和空闲守护进程管理;所有数据本地存储在 ~/.claude/skills/notebooklm/data/ 中

SKILL.md

NotebookLM Quick Commands

Query Google NotebookLM for source-grounded, citation-backed answers.

Environment

All dependencies and authentication are handled automatically by run.py:

  • First run creates .venv and installs Python/Node.js dependencies
  • If Google auth is missing or expired, a browser window opens automatically
  • No manual pre-flight steps required

Usage

/nblm <command> [args]

Commands

Notebook Management

CommandDescription
loginAuthenticate with Google
statusShow auth and library status
accountsList all Google accounts
accounts addAdd a new Google account
accounts switch <id>Switch active account (by index or email)
accounts remove <id>Remove a Google account
accounts use <id>Set agent-specific active account (OpenClaw isolation)
accounts clearClear agent-specific account override
localList notebooks in local library
remoteList all notebooks from NotebookLM API
create <name>Create a new notebook
delete [--id ID]Delete a notebook
rename <name> [--id ID]Rename a notebook
summary [--id ID]Get AI-generated summary
describe [--id ID]Get description and suggested topics
add <url-or-id>Add notebook to local library (auto-detects URL vs notebook ID)
activate <id>Set active notebook

Source Management

CommandDescription
sources [--id ID]List sources in notebook
upload <file>Upload a single file
upload <folder>Sync a folder of files to NotebookLM
upload-zlib <url>Download from Z-Library and upload
upload-url <url>Add URL as source
upload-youtube <url>Add YouTube video as source
upload-text <title> [--content TEXT]Add text as source
source-text <source-id>Get full indexed text
source-guide <source-id>Get AI summary and keywords
source-rename <source-id> <name>Rename a source
source-refresh <source-id>Re-fetch URL content
source-delete <source-id>Delete a source

Upload options:

  • --use-active - Upload to the currently active notebook
  • --create-new - Create a new notebook named after the file/folder
  • --notebook-id <id> - Upload to a specific notebook
  • --dry-run - Show sync plan without executing (folder sync)
  • --rebuild - Force rebuild tracking file (folder sync)

Important: When user runs upload without specifying a target, ASK them first:

"Would you like to upload to the active notebook, or create a new notebook?" Then pass the appropriate flag (--use-active or --create-new).

Chat & Audio/Media

CommandDescription
ask <question>Query NotebookLM
podcast [--instructions TEXT]Generate audio podcast
podcast-status <task-id>Check podcast generation status
podcast-download [output-path]Download latest podcast
briefing [--instructions TEXT]Generate brief audio summary
debate [--instructions TEXT]Generate debate-style audio
slides [--instructions TEXT]Generate slide deck
slides-download [output-path]Download slide deck as PDF
infographic [--instructions TEXT]Generate infographic
infographic-download [output-path]Download infographic
media-list [--type TYPE]List generated media (audio/video/slides/infographic)
media-delete <id>Delete a generated media item

Command Routing

Based on $ARGUMENTS, execute the appropriate command:

$IF($ARGUMENTS, Parse the command from: "$ARGUMENTS"

loginpython scripts/run.py auth_manager.py setup --service google

accountspython scripts/run.py auth_manager.py accounts list

accounts addpython scripts/run.py auth_manager.py accounts add

accounts switchpython scripts/run.py auth_manager.py accounts switch "<id>"

accounts removepython scripts/run.py auth_manager.py accounts remove "<id>"

accounts usepython scripts/run.py auth_manager.py accounts use "<id>"

accounts clearpython scripts/run.py auth_manager.py accounts clear

status → Run both:

  • python scripts/run.py auth_manager.py status
  • python scripts/run.py notebook_manager.py list

localpython scripts/run.py notebook_manager.py list

remotepython scripts/run.py nblm_cli.py notebooks

createpython scripts/run.py nblm_cli.py create "<name>"

delete [--id ID]python scripts/run.py nblm_cli.py delete <args>

rename [--id ID]python scripts/run.py nblm_cli.py rename "<name>" <args>

summary [--id ID]python scripts/run.py nblm_cli.py summary <args>

describe [--id ID]python scripts/run.py nblm_cli.py describe <args>

add → Smart add workflow (auto-detects URL vs notebook ID)

activatepython scripts/run.py notebook_manager.py activate --id "<id>"

sources [--id ID]python scripts/run.py nblm_cli.py sources <args>

upload → First ASK user: "Upload to active notebook or create new?" Then: - Active: python scripts/run.py source_manager.py add --file "<file>" --use-active - New: python scripts/run.py source_manager.py add --file "<file>" --create-new

upload → Sync a folder: - First ASK user: "Sync to active notebook, create new, or specify notebook?" - Active: python scripts/run.py source_manager.py sync "<folder>" --use-active - New: python scripts/run.py source_manager.py sync "<folder>" --create-new - Specific: python scripts/run.py source_manager.py sync "<folder>" --notebook-id ID - Dry-run: python scripts/run.py source_manager.py sync "<folder>" --dry-run - Rebuild: python scripts/run.py source_manager.py sync "<folder>" --rebuild

upload-zlib → First ASK user: "Upload to active notebook or create new?" Then: - Active: python scripts/run.py source_manager.py add --url "<url>" --use-active - New: python scripts/run.py source_manager.py add --url "<url>" --create-new

upload-urlpython scripts/run.py nblm_cli.py upload-url "<url>"

upload-youtubepython scripts/run.py nblm_cli.py upload-youtube "<url>"

upload-textpython scripts/run.py nblm_cli.py upload-text "<title>" <args>

source-textpython scripts/run.py nblm_cli.py source-text "<id>"

source-guidepython scripts/run.py nblm_cli.py source-guide "<id>"

source-renamepython scripts/run.py nblm_cli.py source-rename "<id>" "<name>"

source-refreshpython scripts/run.py nblm_cli.py source-refresh "<id>"

source-deletepython scripts/run.py nblm_cli.py source-delete "<id>"

askpython scripts/run.py nblm_cli.py ask "<question>"

podcastpython scripts/run.py artifact_manager.py generate --format DEEP_DIVE <args>

podcast-statuspython scripts/run.py artifact_manager.py status --task-id "<task-id>"

podcast-download [output-path]python scripts/run.py artifact_manager.py download "<output-path>"

briefingpython scripts/run.py artifact_manager.py generate --format BRIEF <args>

debatepython scripts/run.py artifact_manager.py generate --format DEBATE <args>

slidespython scripts/run.py artifact_manager.py generate-slides <args>

slides-download [output-path]python scripts/run.py artifact_manager.py download "<output-path>" --type slide-deck

infographicpython scripts/run.py artifact_manager.py generate-infographic <args>

infographic-download [output-path]python scripts/run.py artifact_manager.py download "<output-path>" --type infographic

media-list [--type TYPE]python scripts/run.py artifact_manager.py list <args>

media-deletepython scripts/run.py artifact_manager.py delete "<id>"

If command not recognized, show usage help.,

Show available commands with /nblm (no arguments))

Podcast Options

/nblm podcast --length DEFAULT --wait --output ./podcast.mp3
/nblm podcast --instructions "Focus on the key findings"
/nblm briefing --wait --output ./summary.mp3
/nblm debate --instructions "Compare the two approaches"
OptionValues
--lengthSHORT, DEFAULT, LONG
--instructionsCustom instructions for the content
--waitWait for generation to complete
--outputDownload path (requires --wait)

Slide Deck Options

/nblm slides --format DETAILED_DECK --wait --output ./presentation.pdf
/nblm slides --instructions "Focus on key diagrams" --format PRESENTER_SLIDES
OptionValues
--formatDETAILED_DECK, PRESENTER_SLIDES
--lengthSHORT, DEFAULT
--instructionsCustom instructions for the content
--waitWait for generation to complete
--outputDownload path (requires --wait)

Infographic Options

/nblm infographic --orientation LANDSCAPE --wait --output ./visual.png
/nblm infographic --instructions "Highlight comparison" --detail-level DETAILED
OptionValues
--orientationLANDSCAPE, PORTRAIT, SQUARE
--detail-levelCONCISE, STANDARD, DETAILED
--instructionsCustom instructions for the content
--waitWait for generation to complete
--outputDownload path (requires --wait)

Media Generation

CommandDescriptionOutput
/nblm podcastDeep-dive audio discussionMP3
/nblm briefingBrief audio summaryMP3
/nblm debateDebate-style audioMP3
/nblm slidesSlide deck presentationPDF
/nblm infographicVisual infographicPNG

Examples

/nblm podcast --wait --output ./deep-dive.mp3
/nblm briefing --instructions "Focus on chapter 3" --wait
/nblm debate --length LONG --wait --output ./debate.mp3
/nblm slides --instructions "Include key diagrams" --format DETAILED_DECK --wait --output ./presentation.pdf
/nblm infographic --orientation LANDSCAPE --detail-level DETAILED --wait --output ./summary.png

Download & Manage

/nblm podcast-download ./my-podcast.mp3
/nblm slides-download ./presentation.pdf
/nblm infographic-download ./visual.png
/nblm media-list                     # List all generated media
/nblm media-list --type audio        # List only audio
/nblm media-delete <id>              # Delete a media item

Extended Documentation

When to Use This 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"

⚠️ CRITICAL: Add Command - Smart Discovery

The add command now automatically discovers metadata from the notebook:

# Smart Add (auto-discovers name, description, topics)
python scripts/run.py notebook_manager.py add <notebook-id-or-url>

# With optional overrides
python scripts/run.py notebook_manager.py add <id> --name "Custom Name" --topics "custom,topics"

What Smart Add does:

  1. Fetches notebook title from NotebookLM API
  2. Queries the notebook content to generate description and topics
  3. Adds to local library with discovered metadata

Supported input formats:

  • Notebook ID: 5fd9f36b-8000-401d-a7a0-7aa3f7832644
  • Full URL: https://notebooklm.google.com/notebook/5fd9f36b-8000-401d-a7a0-7aa3f7832644

NEVER manually specify --name, --description, or --topics unless the user explicitly provides them.

Critical: Always Use run.py Wrapper

NEVER call scripts directly. ALWAYS use python 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:

  1. Creates .venv if needed
  2. Installs all dependencies
  3. Activates environment
  4. Executes script properly

Core Workflow

Step 1: Check Authentication Status

python scripts/run.py auth_manager.py status

If not authenticated, proceed to setup.

Step 2: Authenticate (One-Time Setup)

# Browser MUST be visible for manual Google login
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"

Step 3: Manage Notebook Library

# 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

Quick Workflow

  1. Check library: python scripts/run.py notebook_manager.py list
  2. Ask question: python scripts/run.py ask_question.py --question "..." --notebook-id ID

Step 4: Ask Questions

# 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

Follow-Up Mechanism (CRITICAL)

Every NotebookLM answer ends with: "EXTREMELY IMPORTANT: Is that ALL you need to know?"

Required Claude Behavior:

  1. STOP - Do not immediately respond to user
  2. ANALYZE - Compare answer to user's original request
  3. IDENTIFY GAPS - Determine if more information needed
  4. ASK FOLLOW-UP - If gaps exist, immediately ask: python scripts/run.py ask_question.py --question "Follow-up with context..."
  5. REPEAT - Continue until information is complete
  6. SYNTHESIZE - Combine all answers before responding to user

Z-Library Integration

Triggers

  • User provides Z-Library URL (zlib.li, z-lib.org, zh.zlib.li)
  • User says "download this book to NotebookLM"
  • User says "add this book from Z-Library"

Setup (One-Time)

# Authenticate with Z-Library
python scripts/run.py auth_manager.py setup --service zlibrary

Commands

# Add book from Z-Library
python scripts/run.py source_manager.py add --url "https://zh.zlib.li/book/..."

# Check Z-Library auth status
python scripts/run.py auth_manager.py status --service zlibrary

Script Reference

Authentication Management (auth_manager.py)

python scripts/run.py auth_manager.py setup                    # Default: Google
python scripts/run.py auth_manager.py setup --service google
python scripts/run.py auth_manager.py setup --service zlibrary
python scripts/run.py auth_manager.py status                   # Show all services
python scripts/run.py auth_manager.py status --service zlibrary
python scripts/run.py auth_manager.py clear --service zlibrary # Clear auth

# Multi-Account Management (Google)
python scripts/run.py auth_manager.py accounts list             # List all accounts
python scripts/run.py auth_manager.py accounts add              # Add new account
python scripts/run.py auth_manager.py accounts switch 1         # Switch by index
python scripts/run.py auth_manager.py accounts switch user@gmail.com  # Switch by email
python scripts/run.py auth_manager.py accounts remove 2         # Remove account

Notebook Management (notebook_manager.py)

python scripts/run.py notebook_manager.py add --url URL --name NAME --description DESC --topics TOPICS
# OR use notebook ID directly:
python scripts/run.py notebook_manager.py add --notebook-id ID --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

Question Interface (ask_question.py)

python scripts/run.py ask_question.py --question "..." [--notebook-id ID] [--notebook-url URL] [--show-browser]

Source Manager (source_manager.py)

# Upload to active notebook
python scripts/run.py source_manager.py add --file "/path/to/book.pdf" --use-active

# Create new notebook for upload
python scripts/run.py source_manager.py add --file "/path/to/book.pdf" --create-new

# Upload to specific notebook
python scripts/run.py source_manager.py add --file "/path/to/book.pdf" --notebook-id NOTEBOOK_ID

# Z-Library download and upload
python scripts/run.py source_manager.py add --url "https://zh.zlib.li/book/..." --use-active
python scripts/run.py source_manager.py add --url "https://zh.zlib.li/book/..." --create-new

# Sync a folder (new!)
python scripts/run.py source_manager.py sync "/path/to/docs" --use-active
python scripts/run.py source_manager.py sync "/path/to/docs" --create-new
python scripts/run.py source_manager.py sync "/path/to/docs" --notebook-id NOTEBOOK_ID

# Sync options (new!)
python scripts/run.py source_manager.py sync "/path/to/docs" --dry-run    # Preview only
python scripts/run.py source_manager.py sync "/path/to/docs" --rebuild   # Force re-hash all files

Folder Sync:

  • Scans folder for supported types: PDF, TXT, MD, DOCX, HTML, EPUB
  • Tracks sync state internally (no per-folder tracking file to manage)
  • Sync strategy: add new, update modified (delete + re-upload), skip unchanged
  • Multi-account aware (tracks which Google account was used) Note: One of --use-active, --create-new, or --notebook-id is REQUIRED. Uploads wait for NotebookLM processing and print progress as Ready: N/T. Press Ctrl+C to stop waiting. Local file uploads use browser automation and require Google authentication. If browser automation is unavailable, set NOTEBOOKLM_UPLOAD_MODE=text to upload extracted text instead (PDFs require pypdf).

Data Cleanup (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

Watchdog Status (auth_manager.py)

python scripts/run.py auth_manager.py watchdog-status

Environment Management

The virtual environment is automatically managed:

  • First run creates .venv automatically
  • Dependencies install automatically
  • Node.js dependencies install automatically
  • agent-browser daemon starts on demand and keeps browser state in memory
  • daemon stops after 10 minutes of inactivity (any agent-browser command resets the timer)
  • set AGENT_BROWSER_OWNER_PID to auto-stop when the agent process exits
  • scripts/run.py sets AGENT_BROWSER_OWNER_PID to its parent PID by default
  • Everything isolated in skill directory

Manual setup (only if automatic fails):

python -m venv .venv
source .venv/bin/activate  # Linux/Mac
pip install -r requirements.txt
npm install
npm run install-browsers

Data Storage

All data stored in ~/.claude/skills/notebooklm/data/:

  • library.json - Notebook metadata (with account associations)
  • auth/google/ - Multi-account Google auth

- index.json - Account index (active account, list) - <n>-<email>.json - Per-account credentials

  • auth/zlibrary.json - Z-Library auth state
  • agent_browser/session_id - Current daemon session ID
  • agent_browser/last_activity.json - Last activity timestamp for idle shutdown
  • agent_browser/watchdog.pid - Idle watchdog process ID

Security: Protected by .gitignore, never commit to git.

Configuration

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

Decision 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

Troubleshooting

ProblemSolution
ModuleNotFoundErrorUse run.py wrapper
Authentication failsBrowser must be visible for setup! --show-browser
DAEMON_UNAVAILABLEEnsure Node.js/npm installed, run npm install, retry
AUTH_REQUIREDRun python scripts/run.py auth_manager.py setup
ELEMENT_NOT_FOUNDVerify notebook URL and re-run with fresh page load
Rate limit (50/day)Wait or add another Google account with accounts add
Browser crashespython scripts/run.py cleanup_manager.py --preserve-library
Notebook not foundCheck with notebook_manager.py list

Best Practices

  1. Always use run.py - Handles environment automatically
  2. Check auth first - Before any operations
  3. Follow-up questions - Don't stop at first answer
  4. Browser visible for auth - Required for manual login
  5. Include context - Each question is independent
  6. Synthesize answers - Combine multiple responses

Limitations

  • No session persistence (each question = new browser)
  • Rate limits on free Google accounts (50 queries/day per account; use multiple accounts to increase)
  • Manual upload required (user must add docs to NotebookLM)
  • Browser overhead (few seconds per question)

Resources (Skill Structure)

Important directories and files:

  • scripts/ - All automation scripts (ask_question.py, notebook_manager.py, etc.)
  • data/ - Local storage for authentication and notebook library
  • references/ - Extended documentation:

- api_reference.md - Detailed API documentation for all scripts - troubleshooting.md - Common issues and solutions - usage_patterns.md - Best practices and workflow examples

  • .venv/ - Isolated Python environment (auto-created on first run)
  • .gitignore - Protects sensitive data from being committed

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Antigravity

28.71%
按下载量换算14,036

Cursor

25.74%
按下载量换算12,584

Claude Code

17.48%
按下载量换算8,546

OpenCode

12%
按下载量换算5,867

Codex

7.97%
按下载量换算3,896

Gemini CLI

3.32%
按下载量换算1,623

安全审计

Gen Agent Trust Hub

通过

Socket

未通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills