← 返回 Skills 市场
skywalker-lili

NotebookLM Content Creation (J-Claw)

作者 Skywalker326 · GitHub ↗ · v2.0.0 · MIT-0
cross-platform ⚠ suspicious
89
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install jclaw-notebooklm-content-creation
功能描述
Create and monitor NotebookLM Studio content — Audio Overview, Video Overview, Infographics, and Slides — via the notebooklm-mcp-cli. Use when user wants to...
使用说明 (SKILL.md)

NotebookLM Content Creation

Creates NotebookLM Studio content (Audio Overview, Video Overview, Infographics, Slides) and monitors it to completion using a background polling loop.

Requires:

  • notebooklm-mcp-cli installed: uv tool install notebooklm-mcp-cli
  • Authenticated: nlm login (done on the server already)

Studio Types

Type Command Formats Lengths Notes
Audio Overview nlm audio create deep_dive, brief, critique, debate short, default, long ✅ confirmed working
Video Overview nlm video create explainer, brief, cinematic ⚠️ NOT nlm studio create --type video
Infographics nlm infographic create ⚠️ NOT nlm studio create --type infographic
Slides nlm slides create detailed_deck, presenter_slides short, default ⚠️ NOT nlm studio create --type slides

⚠️ CLI 与 SKILL 旧版不一致(重要!)

nlm studio create 不支持 --type 参数!每种产出类型是独立的顶级命令:

  • nlm video create \x3Cnotebook_id> --format explainer --language zh-CN --confirm
  • nlm infographic create \x3Cnotebook_id> --detail detailed --orientation landscape --language zh-CN --confirm
  • nlm slides create \x3Cnotebook_id> --format detailed_deck --length default --language zh-CN --confirm

⚠️ Download 命令

  • Audio: nlm download audio \x3Cnotebook_id> --id \x3Cartifact_id> -o \x3Cpath>
  • Video: nlm download video \x3Cnotebook_id> --id \x3Cartifact_id> -o \x3Cpath>
  • Infographic: nlm download infographic \x3Cnotebook_id> --id \x3Cartifact_id> -o \x3Cpath>
  • Slides: nlm download slide-deck \x3Cnotebook_id> --id \x3Cartifact_id> -o \x3Cpath> ⚠️ 不是 nlm download slides

Workflow

Step 1 — Notebook Selection

List all notebooks:

nlm notebook list

Parse the JSON output for id and title. Match against the user's keyword (case-insensitive substring match). If multiple match, present options with numbers.

If no notebook matches:

  • Ask user: "No notebook found matching '[keyword]'. Create a new one or add more sources to an existing notebook?"
  • If user confirms new notebook: create with nlm notebook create "\x3Cname>"
  • Then add sources: nlm source add \x3Cnotebook_id> --url \x3Curl> --wait

Step 2 — Check Existing Artifacts

Before creating new content, check if the notebook already has generated artifacts:

nlm studio status \x3Cnotebook_id>

If artifacts with status: completed exist, show them to the user and ask:

"This notebook already has completed content. Download existing [type] or generate new content?"

  • Download existing: go directly to download step
  • Generate new: proceed to Step 3

Step 3 — Pre-Flight Confirmation OR Auto-Execute

Interactive mode (user initiated): Ask all parameters at once. Write in the user's current session language.

Creating [Audio/Video/Infographic/Slides] Overview from "[notebook name]"

Please confirm:

① Content type: [Audio Overview / Video Overview / Infographics / Slides]
② Format: [deep_dive / brief] (default: deep_dive)
③ Length: [short / default / long] (default: default) — not available for Infographics/Slides
④ Language: [BCP-47 code, e.g., en, zh-CN] (default: notebook's detected language or en)
⑤ Output path: [path] (default: ~/ObsidianVault/Default/NotebookLM/\x3Cnotebook-name>/)

Reply with any changes, or "ok" to proceed with defaults.

Triggered mode (upstream skill chaining): When the agent receives a trigger message containing all required parameters (e.g., from Deep Research), skip user confirmation and auto-execute. The trigger message should include:

  • 报告路径 / report_path: path to the source file to upload
  • Notebook 名称 / notebook_name: name for the notebook (create if not exists)
  • 产出类型: Audio Overview / Video Overview / Infographics / Slides
  • 格式: deep_dive / brief / etc.
  • 长度: short / default / long
  • 语言: BCP-47 code

In triggered mode, the agent should:

  1. Create notebook with nlm notebook create "\x3Cnotebook_name>"
  2. Upload source with nlm source add \x3Cnotebook_id> --file \x3Creport_path> --wait
  3. Proceed directly to Step 4 (Create Content) with the provided parameters
  4. Set up polling and notify user when complete

Step 4 — Create Content

Based on user's confirmed parameters:

Audio:

nlm audio create \x3Cnotebook_id> --format \x3Cformat> --length \x3Clength> --language \x3Clang> --confirm

Capture the returned Artifact ID.

Video:

nlm video create \x3Cnotebook_id> --format \x3Cformat> --style \x3Cstyle> --language \x3Clang> --confirm

Infographics:

nlm infographic create \x3Cnotebook_id> --detail \x3Clevel> --orientation \x3Corientation> --language \x3Clang> --confirm

Slides:

nlm slides create \x3Cnotebook_id> --format \x3Cformat> --length \x3Clength> --language \x3Clang> --confirm

Capture the returned Artifact ID for each.

Step 5 — Set Up Task Directory

Create a temp directory following the polling best practices pattern:

/tmp/notebooklm-studio/
  \x3CYYMMDD-HHmm>_\x3Csanitized-notebook-name>_\x3Cstudio-type>/
    task.json          ← full task metadata
    progress.json      ← poll count, artifact id, last status
    poll.log           ← each poll attempt
    error.log          ← errors
    done.flag          ← created on success
    \x3Coutput file>      ← downloaded artifact

Write task.json:

{
  "notebook_id": "\x3Cid>",
  "notebook_name": "\x3Cname>",
  "artifact_id": "\x3Cid>",
  "studio_type": "audio",
  "output_path": "~/ObsidianVault/Default/NotebookLM/\x3Cnotebook-name>/\x3Coutput_filename>",
  "poll_interval_seconds": 300,
  "max_polls": 8,
  "created_at": "\x3CISO timestamp>"
}

Step 6 — Notify User and Launch Background Polling

Notify the user (in current session language):

"Content generation started. I'll monitor it in the background and notify you when it's ready (typically 2–5 minutes). Poll every 5 minutes, max 40 minutes."

Launch the polling script in the background:

cd /tmp/notebooklm-studio/\x3Ctask-dir>/
nohup bash /tmp/notebooklm-studio/poll.sh > /dev/null 2>&1 &

Step 7 — Polling Script

Write this script to \x3Ctask-dir>/poll.sh:

#!/bin/bash
set -euo pipefail

TASK_DIR="/tmp/notebooklm-studio/\x3Ctask-dir>"
cd "$TASK_DIR"

[[ -f done.flag ]] && echo "Already done." && exit 0

CHAT_ID="INJECT_CHAT_ID"  # ← Agent: replace with current Discord channel ID (from inbound_meta.chat_id)
POLL_COUNT=$(grep '"poll_count"' progress.json 2>/dev/null | sed 's/[^0-9]//g') || POLL_COUNT=0
MAX_POLLS=8
INTERVAL=300

log() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*" | tee -a poll.log; }

notify_user() {
  local message="$1"
  openclaw message send --channel discord --target "$CHAT_ID" -m "$message" 2>/dev/null || log "WARNING: notification failed"
}

while true; do
  POLL_COUNT=$((POLL_COUNT + 1))

  if [[ $POLL_COUNT -gt $MAX_POLLS ]]; then
    log "TIMEOUT after $MAX_POLLS polls"
    echo "Timeout" >> error.log
    notify_user "❌ NotebookLM 播客生成超时。"
    exit 1
  fi

  log "[Poll $POLL_COUNT/$MAX_POLLS] Checking status..."
  RESULT=$(nlm studio status "$(grep '"notebook_id"' task.json | sed 's/.*: *"\([^"]*\)".*/\1/') 2>&1) || true
  echo "$RESULT" >> poll.log

  # Check if our artifact is completed
  ARTIFACT_STATUS=$(echo "$RESULT" | grep -A5 "\"id\": \"$(grep '"artifact_id"' task.json | sed 's/.*: *"\([^"]*\)".*/\1/')\"" | grep '"status"' | sed 's/.*: *"\([^"]*\)".*/\1/' | head -1)
  log "Artifact status: '$ARTIFACT_STATUS'"

  if [[ "$ARTIFACT_STATUS" == "completed" ]]; then
    log "Completed. Downloading..."
    OUTPUT_PATH=$(grep '"output_path"' task.json | sed 's/.*: *"\([^"]*\)".*/\1/')
    STUDIO_TYPE=$(grep '"studio_type"' task.json | sed 's/.*: *"\([^"]*\)".*/\1/')
    NOTEBOOK_NAME=$(grep '"notebook_name"' task.json | sed 's/.*: *"\([^"]*\)".*/\1/')
    nlm download audio "$(grep '"notebook_id"' task.json | sed 's/.*: *"\([^"]*\)".*/\1/')" --id "$(grep '"artifact_id"' task.json | sed 's/.*: *"\([^"]*\)".*/\1/')" -o "$OUTPUT_PATH" >> poll.log 2>&1 || true
    if [[ -s "$OUTPUT_PATH" ]]; then
      SIZE=$(du -h "$OUTPUT_PATH" | cut -f1)
      log "Downloaded: $OUTPUT_PATH ($SIZE)"
      touch done.flag
      notify_user "✅ 播客生成完成![$NOTEBOOK_NAME] 已保存($SIZE),共 $POLL_COUNT 轮。"
    else
      log "Downloaded file is empty"
      echo "Empty output" >> error.log
      notify_user "⚠️ NotebookLM 播客下载失败,文件为空。"
    fi
    exit 0
  fi

  if [[ "$ARTIFACT_STATUS" == "failed" ]]; then
    log "Generation failed"
    echo "Failed" >> error.log
    notify_user "❌ NotebookLM 播客生成失败。"
    exit 1
  fi

  # Save progress
  sed -i "s/\"poll_count\": [0-9]*/\"poll_count\": $POLL_COUNT/" progress.json
  log "Still in_progress. Sleeping ${INTERVAL}s..."
  sleep "$INTERVAL"
done

Initialize progress.json:

{
  "poll_count": 0,
  "last_poll_at": null,
  "last_poll_result": null
}

Step 8 — Completion

When polling exits (success or failure):

On success:

  • Verify file exists and has content
  • Move file to confirmed output path if not already there
  • Notify user in current session language:

    "✅ [Content type] ready!

    Notebook: [name]
    Saved to: [path]
    Size: [size]
    Polls: [N] (~[X] minutes)"

  • Leave temp folder for manual inspection

On failure/timeout:

  • Notify user:

    "❌ [Content type] generation did not complete.

    Notebook: [name]
    Reason: [timeout / auth error / generation failed]

    Options:\

  1. Re-run with same parameters\
  2. Check NotebookLM web UI manually\
  3. Clean up temp folder"
  • Do NOT auto-retry or delete temp folder

Quick Reference

# List notebooks
nlm notebook list

# Check status
nlm studio status \x3Cnotebook_id>

# Create audio
nlm audio create \x3Cnotebook_id> --format deep_dive --length default --confirm

# Create video
# Create video
nlm video create \x3Cnotebook_id> --format explainer --language zh-CN --confirm

# Create infographic
nlm infographic create \x3Cnotebook_id> --detail detailed --orientation landscape --confirm

# Create slides
nlm slides create \x3Cnotebook_id> --format detailed_deck --length default --confirm

# Download (after getting artifact ID)
nlm download [audio|video|infographic|slide-deck] \x3Cnotebook_id> --id \x3Cartifact_id> -o \x3Cpath>

⚠️ Download slides 的命令是 slide-deck,不是 slides


Lessons Learned (2026-03-27)

CLI 命令与 SKILL 文档不一致

旧版 SKILL.md 使用的 nlm studio create --type video/infographic/slides 已废弃。实际 CLI 每种产出类型是独立的顶级命令:

旧版(❌ 错误) 新版(✅ 正确)
nlm studio create --type video nlm video create
nlm studio create --type infographic nlm infographic create
nlm studio create --type slides nlm slides create
nlm download slides nlm download slide-deck

Video 的选项也不同

Video 不支持 --length--format deep_dive。正确选项:

  • --format explainer/brief/cinematic
  • --style auto_select/classic/whiteboard/kawaii/anime/watercolor/retro_print/heritage/paper_craft
  • --language zh-CN

并行生成

4 种产出类型可以并行生成(同时提交多个 nlm create 命令),不需要排队。每种产出有独立的 artifact ID,可以独立轮询。

轮询最佳实践

  • 轮询间隔:默认 5 分钟(300 秒)。对于 NotebookLM 这种较长任务足够用,且避免频繁请求。
  • 超时:40 次 × 1 分钟 = 40 分钟,基本够用
  • 完成后通过 openclaw message send --channel discord --target $CHAT_ID 直接投递到 Discord channel,不经过 agent 推理(避免模型超时导致通知丢失)。
安全使用建议
Before installing, verify the nlm CLI requirement and that it runs in a controlled, authenticated environment. Confirm whether you trust upstream skills to provide file paths because the skill's 'triggered mode' will skip user confirmation and run nlm source add --file <report_path>, which can upload arbitrary local files. Ask the author to (1) declare the nlm CLI as a required binary in metadata, (2) require explicit user confirmation by default (or at least validate report_path against an allowlist), and (3) document exactly where artifacts are written. If you plan to use this in automation, test it in a sandbox with non-sensitive data and audit logs enabled.
能力评估
Purpose & Capability
SKILL.md explicitly requires the third‑party CLI 'notebooklm-mcp-cli' (nlm) and an authenticated session ('nlm login'), but the skill metadata lists no required binaries or primary credential. That mismatch makes the declared requirements inconsistent with the runtime instructions.
Instruction Scope
Instructions include commands to create notebooks and upload files (nlm source add --file <report_path> --wait) and specify a triggered mode that explicitly skips user confirmation. That allows the agent to read and upload arbitrary filesystem paths supplied by upstream triggers, which is broader than what the metadata declares and risks unintentional data exfiltration.
Install Mechanism
This is an instruction-only skill with no install spec or code files, so nothing will be written to disk by an installer. The only install requirement is an external CLI dependency noted in SKILL.md (not declared in metadata).
Credentials
The skill requests no environment variables or credentials in metadata but relies on an already-authenticated nlm CLI and reads/writes user paths (e.g., ~/ObsidianVault and arbitrary --file <report_path>). That lack of declared credentials combined with file access is disproportionate and opaque to reviewers.
Persistence & Privilege
always:false (good) and autonomous invocation is allowed by default. Combined with the triggered-mode auto-execution (which skips confirmation) this permits the agent to autonomously upload local files when invoked by upstream skills — increasing blast radius compared with an explicit-confirmation-only workflow.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install jclaw-notebooklm-content-creation
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /jclaw-notebooklm-content-creation 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
修复轮询脚本解析 bug。新增 notify_user 通知。支持 upstream skill 触发模式(跳过确认)。轮询间隔统一 5 分钟。
元数据
Slug jclaw-notebooklm-content-creation
版本 2.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

NotebookLM Content Creation (J-Claw) 是什么?

Create and monitor NotebookLM Studio content — Audio Overview, Video Overview, Infographics, and Slides — via the notebooklm-mcp-cli. Use when user wants to... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 89 次。

如何安装 NotebookLM Content Creation (J-Claw)?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install jclaw-notebooklm-content-creation」即可一键安装,无需额外配置。

NotebookLM Content Creation (J-Claw) 是免费的吗?

是的,NotebookLM Content Creation (J-Claw) 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

NotebookLM Content Creation (J-Claw) 支持哪些平台?

NotebookLM Content Creation (J-Claw) 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 NotebookLM Content Creation (J-Claw)?

由 Skywalker326(@skywalker-lili)开发并维护,当前版本 v2.0.0。

💬 留言讨论