SkillHub

notebooklm-studio

v2.1.3

Import sources (URLs, YouTube, files, text) into Google NotebookLM and generate user-selected artifacts: podcast, video, report, quiz, flashcards, mind map, slides, infographic, data table. Use when the user sends content and asks to generate learning materials, podcasts, videos, or study packages.

Sourced from ClawHub, Authored by jasontsaicc

Installation

Please help me install the skill `notebooklm-studio` from SkillHub official store. npx skills add jasontsaicc/notebooklm-studio

NotebookLM Studio

Import sources into NotebookLM, generate user-selected artifacts via CLI, download results locally.

Inputs

Collect from user message (ask only for missing fields):

  • Sources: URLs, YouTube links, text notes, or file attachments (PDF, Word, audio, image, Google Drive link)
  • Artifacts: User selects from 9 types (no default — always ask):
  • audio (podcast), video, report, quiz, flashcards, mind-map, slide-deck, infographic, data-table
  • Language (optional, default: zh_Hant): applied via notebooklm language set
  • ⚠️ This is a GLOBAL setting — affects all notebooks in the account
  • Artifact options (discussed in step 1b): format, style, length, difficulty, etc. See references/artifact-options.md for all options per artifact type.
  • Custom instructions (optional): passed as description to generate commands
  • Telegram target (optional, OpenClaw only): chat_id for delivery

See references/source-types.md for source type detection rules. See references/artifacts.md for all 9 artifact types and CLI options.

Workflow

Steps are sequential gates — do NOT skip or combine steps. Each numbered step must complete before the next begins. In particular: - Step 0 (auth precheck) must run and pass before any other CLI command. - Step 1b (options discussion) must get user confirmation before generation. Do not assume defaults unless the user explicitly says "use defaults."

  1. Auth precheck — Verify the session is valid before doing any work: bash notebooklm auth check --test --json
  2. "status": "ok" → proceed to step 1.
  3. "status": "error"stop immediately. Tell the user: > NotebookLM 登入已過期,請先重新登入(notebooklm login),完成後告訴我,我再繼續。
  4. Command itself fails (network error, CLI not found, etc.) → also stop and report the error.
  5. --test is required — without it, only local checks run, which can pass even with an expired session.
  6. When the user confirms re-login, re-run this check before continuing.

  7. Parse input & configure artifacts

1a. Select artifacts — Detect source types from user message (URLs, files, text). Confirm which artifacts to generate.

1b. Discuss options — Before generating, confirm key options for each selected artifact. Refer to references/artifact-options.md for priority levels: - ASK options: must ask the user - OFFER options: state the default, let user decide whether to change - SILENT options: use defaults without asking - Options already specified by the user → skip - Present all questions in a single message (batch, not one-by-one)

If user says "use defaults" → skip all questions, proceed with default values immediately.

Example agent message (audio + video + report + quiz + flashcards + slides + infographic selected):

Before generating, a few options to confirm: - Podcast: deep-dive / brief / critique / debate? - Video: explainer / brief / cinematic? (cinematic uses Veo 3, takes 30-40 min) - Report: briefing-doc / study-guide / blog-post / custom? - Slides: detailed / presenter? - Quiz & Flashcards: difficulty medium, quantity standard — adjust? - Infographic: style auto, or prefer a specific style (sketch-note, professional, bento-grid...)? - Language: zh_Hant, OK?

Or just say "use defaults" to start immediately.

  1. Derive slug — Based on the sources and user message, generate a short kebab-case slug (2-4 words) that captures the core topic. This slug is used for both the notebook name and the output directory.
  2. Examples: react-server-components, feynman-technique, taiwan-semiconductor-q4
  3. Keep it concise, lowercase, ASCII-only (transliterate non-ASCII if needed)
  4. If the user provides a topic or title, prefer that as the basis

  5. Create notebookbash notebooklm create "<slug> <YYYYMMDD>" # → {"notebook_id": "xyz789", ...} ← capture notebook_id notebooklm use <notebook_id> mkdir -p ./output/<slug>

  6. Set languagebash notebooklm language set <confirmed_language> Use the language confirmed in step 1b. ⚠️ GLOBAL setting — always set explicitly to avoid residual from previous runs.

  7. Add sources — For each source: ```bash # URL, YouTube, or file path notebooklm source add ""

# Google Drive notebooklm source add-drive "" <code>`` For plain text → save to a</code>.txt<code>file first, then</code>source add "./temp_text.txt"`.</p> <ol> <li><strong>Generate artifacts</strong> — Two-tier strategy for timeout safety:</li> </ol> <p><strong>⚠️ Deduplication gate (Tier 2 only)</strong> — Before generating Tier 2 artifacts, call <code>artifact list</code> <strong>once</strong> and check all requested types in that single response: <code>bash notebooklm artifact list --json # → [{"task_id": "abc123", "type": "slide-deck", "status": "processing"}, ...]</code> For each Tier 2 artifact you are about to generate, look for entries where <code>type</code> matches (e.g., <code>slide-deck</code>, <code>audio</code>, <code>video</code>). If multiple entries match the same type, the non-terminal status takes priority (<code>processing</code>/<code>pending</code> > <code>completed</code> > <code>failed</code>): - <code>processing</code> / <code>pending</code> → <strong>do NOT generate again</strong>. Take the existing <code>task_id</code>, go to step 9 (wait + deliver). - <code>completed</code> → <strong>do NOT generate again</strong>. Skip the wait — go directly to download + deliver in step 9. - <code>failed</code> → safe to re-generate. - No matching entry → proceed with generation.</p> <p>If <code>artifact list</code> itself fails or returns an error, proceed with generation — the dedup check is a safety net, not a hard gate. Duplicate generation wastes resources and causes confusion — this gate prevents the most common operational error.</p> <p><strong>Tier 1 — Immediate</strong> (use <code>--wait</code>, completes within timeout): ```bash # Sync (instant) notebooklm generate mind-map</p> <p># Fast async (1-2 min) — use options confirmed in step 1b notebooklm generate report --format <chosen_format> --wait notebooklm generate quiz --difficulty <chosen_difficulty> --quantity <chosen_quantity> --wait notebooklm generate flashcards --difficulty <chosen_difficulty> --quantity <chosen_quantity> --wait notebooklm generate data-table "<description>" --wait</p> <p># Medium async (2-5 min, borderline — if timeout, retry or move to Tier 2) notebooklm generate infographic --style <chosen_style> --orientation <chosen_orientation> --wait ```</p> <p><strong>Tier 2 — Deferred</strong> (use <code>--json</code> without <code>--wait</code>, capture <code>task_id</code> for step 9): ```bash # Slow async — use options confirmed in step 1b # Parse JSON output to extract task_id for polling notebooklm generate slide-deck --format <chosen_format> --json # → {"task_id": "abc123", "status": "pending"} ← save task_id</p> <p>notebooklm generate video --format <chosen_format> --style <chosen_style> --json # → {"task_id": "def456", "status": "pending"} ← save task_id # Note: if cinematic, omit --style (ignored by Veo 3)</p> <p>notebooklm generate audio "<description>" --format <chosen_format> --length <chosen_length> --json # → {"task_id": "ghi789", "status": "pending"} ← save task_id <code>`` Options accepted as defaults in step 1b can be omitted (CLI uses its own defaults). Parse each JSON response and save the</code>task_id<code>— you will need it in step 9. Only generate the artifacts the user requested. Skip the rest. See</code>references/artifacts.md` → "Deferred Generation" for Tier 2 details.</p> <p><strong>Write delivery status</strong> — Immediately after all Tier 2 generates are dispatched, write <code>./output/<slug>/delivery-status.json</code> so the recovery script can pick up if the agent times out: <code>json { "slug": "<slug>", "notebook_id": "<notebook_id>", "created_at": "<ISO 8601>", "artifacts": [ {"type": "slide-deck", "task_id": "<id>", "status": "pending", "output_path": "./output/<slug>/slides.pdf"}, {"type": "audio", "task_id": "<id>", "status": "pending", "output_path": "./output/<slug>/podcast.mp3"} ] }</code> Update each artifact's <code>status</code> to <code>completed</code> or <code>failed</code> as step 9 progresses. This file is the handoff contract between the agent and <code>scripts/recover_tier2_delivery.sh</code>. Telegram delivery is agent-only (requires OpenClaw <code>message</code> tool); the recovery script handles download + status tracking only.</p> <ol> <li> <p><strong>Download Tier 1</strong> — Each successful Tier 1 artifact into <code>./output/<slug>/</code>: <code>bash notebooklm download mind-map ./output/<slug>/mindmap.json notebooklm download report ./output/<slug>/report.md notebooklm download quiz --format json ./output/<slug>/quiz.json notebooklm download flashcards --format json ./output/<slug>/flashcards.json notebooklm download data-table ./output/<slug>/data.csv notebooklm download infographic ./output/<slug>/infographic.png</code></p> </li> <li> <p><strong>Report + Deliver Tier 1</strong> — Present completed Tier 1 artifacts to user. If Tier 2 artifacts are pending, include a status note:</p> <blockquote> <p>"Slides/Audio/Video are still generating, I'll send them when ready."</p> </blockquote> </li> </ol> <p><strong>Telegram delivery</strong> (OpenClaw only) — If <code>message</code> tool is available: 1. Text summary with Tier 2 pending status (always first) 2. Report → Quiz → Flashcards → Mind Map → Infographic → Data Table</p> <p>See <code>references/telegram-delivery.md</code> for delivery contract. Skip Telegram delivery if running outside OpenClaw (e.g. Claude Code, Codex).</p> <ol> <li><strong>Poll + Deliver Tier 2</strong> — Wait for each deferred artifact in order of expected speed (fastest first), then download and deliver as each completes: ```bash # Wait by expected completion order: slide-deck (fastest) → video → audio (slowest) # Uses --interval 5 (not default 2) since Tier 2 artifacts take minutes, not seconds notebooklm artifact wait <slide_task_id> --timeout 1800 --interval 5 --json # → {"status": "completed", ...} ← task_id from generate is used as artifact_id here notebooklm download slide-deck ./output/<slug>/slides.pdf # → deliver to Telegram immediately</li> </ol> <p>notebooklm artifact wait <video_task_id> --timeout 1800 --interval 5 --json # Note: if cinematic, use --timeout 2400 (generation takes 30-40 min) notebooklm download video ./output/<slug>/video.mp4 # → deliver to Telegram immediately</p> <p>notebooklm artifact wait <audio_task_id> --timeout 1800 --interval 5 --json notebooklm download audio ./output/<slug>/podcast.mp3 bash scripts/compress_audio.sh ./output/<slug>/podcast.mp3 ./output/<slug>/podcast_compressed.mp3 # → deliver to Telegram immediately <code>`` - **Order matters**: wait for fastest artifact first (slide-deck → video → audio) to minimize idle time - On completion: download → post-process → deliver to Telegram → update</code>delivery-status.json<code>status to</code>completed<code>- On failure: update status to</code>failed<code>with reason, notify user, continue to next artifact - On timeout: see timeout recovery below - Max wait: 30 minutes per artifact (covers worst-case audio/video) - If agent is about to exit with any artifact still</code>pending`, tell the user: > "Tier 2 補送模式已啟動,recovery script 會每 5 分鐘檢查並自動送達。"</p> <p><strong>⚠️ Timeout recovery</strong> — If <code>artifact wait</code> returns <code>status: "timeout"</code>, the artifact is likely still generating. <strong>NEVER re-generate</strong>. Instead: 1. Re-check status: <code>notebooklm artifact poll <task_id> --json</code> 2. If <code>processing</code> → re-wait: <code>notebooklm artifact wait <task_id> --timeout 1800 --interval 5 --json</code> 3. If <code>completed</code> → download and deliver 4. If <code>failed</code> → notify user with error, move to next artifact 5. If re-wait also times out (2+ total timeouts, ~60 min elapsed) → give up, notify user, suggest downloading from NotebookLM directly A timeout means the wait expired, not that generation failed. The task continues server-side. Re-generating creates duplicates and wastes time.</p> <h2 id="error-handling">Error handling</h2> <ul> <li><strong>Auth errors</strong> → caught by step 0 precheck. If any CLI command later returns an authentication/session error (HTTP 401, "Not logged in", "session expired", token fetch failure), treat it as a mid-workflow auth failure — stop, ask user to re-login, then re-run step 0 before resuming.</li> <li><strong>Tier 1 failure</strong>: retry up to 2 times, then include failure note in step 8 delivery.</li> <li><strong>Tier 2 failure</strong>: notify user per-artifact in step 9. Tier 1 is already delivered by this point, so Tier 2 failures never block text artifact delivery.</li> <li>Capture failure reason in delivery status.</li> </ul> <h2 id="delivery-confirmation-gate">Delivery confirmation gate</h2> <p>Before reporting "complete" to the user, ALL of the following must be true: 1. Every requested artifact is either <strong>successfully delivered</strong> or <strong>reported as failed with reason</strong> 2. For Telegram delivery (OpenClaw): each <code>message</code> tool call (OpenClaw's built-in messaging tool) returned a success response with a <code>messageId</code> - If a send fails, retry once. If still failing, report the failure to the user — do NOT silently skip 3. No artifact is still in <code>processing</code> or <code>pending</code> status without being tracked</p> <p><strong>Never say "done" while any artifact is still pending delivery.</strong> If Tier 2 artifacts are still generating, say so explicitly and continue waiting. The task is not complete until everything is delivered or accounted for.</p> <h2 id="quality-gate">Quality gate</h2> <p>Before delivery, verify: - Sources are concrete article/content pages (not category/index pages). - Report contains actionable takeaways (not generic summary). - Quiz tests key concepts and mechanics. - Flashcards focus on terms, decisions, and trade-offs. - Output respects requested language and length.</p> <p>See <code>references/output-contracts.md</code> for format specifications.</p> <h2 id="delivery-template">Delivery template</h2> <ol> <li>Selection rationale (<=3 bullets)</li> <li>Artifact list with paths/status (all 9 types if applicable)</li> <li>Key takeaways (3-5 bullets)</li> <li>Failures + fallback note (if any)</li> <li>One discussion question</li> </ol> <h2 id="changelog">Changelog</h2> <h3 id="v210">v2.1.0</h3> <ul> <li><strong>Auth precheck gate</strong> — step 0 runs <code>auth check --test --json</code> before any work; expired sessions fail fast instead of blowing up mid-generation.</li> <li><strong>Dedup gate</strong> — step 6 checks <code>artifact list</code> before Tier 2 generation to prevent duplicate artifacts when agent retries or resumes.</li> <li><strong>Timeout recovery</strong> — <code>artifact wait</code> timeout no longer triggers re-generation; polls status and re-waits, giving up only after 2 consecutive timeouts (~60 min).</li> <li><strong>Delivery confirmation gate</strong> — agent cannot claim "done" until every artifact is delivered or explicitly reported as failed with reason.</li> <li><strong>Delivery status contract</strong> — step 6 writes <code>delivery-status.json</code> after Tier 2 dispatch; step 9 updates it as artifacts complete. Enables cron-based recovery via <code>scripts/recover_tier2_delivery.sh</code> when agent times out.</li> </ul> </div> </div> <!-- Right: Sidebar --> <aside class="space-y-6"> <!-- Popularity --> <div class="bg-gray-900 border border-gray-800 rounded-2xl p-6 shadow-sm"> <h3 class="text-[10px] font-black text-gray-500 uppercase tracking-widest mb-5">Popularity</h3> <div class="flex items-end gap-2 mb-6"> <span class="text-4xl font-black text-white leading-none">1</span> <span class="text-gray-500 text-[10px] font-bold uppercase mb-1">Stars</span> </div> <div class="grid grid-cols-2 gap-3 mb-6"> <div class="bg-gray-950 p-4 rounded-xl border border-gray-800 text-center"> <div class="text-gray-600 text-[10px] font-bold uppercase mb-1">DLs</div> <div class="text-white font-bold text-base">109</div> </div> <div class="bg-gray-950 p-4 rounded-xl border border-gray-800 text-center"> <div class="text-gray-600 text-[10px] font-bold uppercase mb-1">Installs</div> <div class="text-white font-bold text-base">0</div> </div> </div> <!-- View Repository: 恢复原文字,去掉图标,保持深色紧凑风格 --> <a href="https://clawhub.ai/jasontsaicc/notebooklm-studio" target="_blank" class="block text-center border border-gray-700 bg-gray-800 text-gray-200 py-3 rounded-xl font-bold hover:bg-gray-700 transition-all uppercase text-[10px] tracking-widest"> View Repository </a> </div> <!-- AI Security --> <div class="bg-gray-900 border border-gray-800 rounded-2xl p-6 relative overflow-hidden"> <div class="absolute -top-10 -right-10 w-24 h-24 bg-green-500/10 rounded-full blur-2xl opacity-40"></div> <h3 class="text-[10px] font-black text-gray-500 uppercase tracking-widest mb-5 relative z-10">AI Security</h3> <div class="flex items-center gap-5 relative z-10"> <div class="w-14 h-14 rounded-full border-2 border-green-500 flex items-center justify-center text-green-500 text-xl font-black bg-gray-950 shadow-inner">98</div> <div class="flex-1"> <div class="text-white font-bold text-xs uppercase tracking-tight">None</div> <div class="text-[9px] text-gray-600 italic">Audited by AI Guard</div> </div> </div> </div> <!-- Download --> <a href="https://wry-manatee-359.convex.site/api/v1/download?slug=notebooklm-studio" class="flex items-center justify-center gap-2 w-full border border-blue-500/40 text-blue-400 py-3.5 rounded-xl font-bold hover:bg-blue-500/10 transition-all uppercase text-[10px] tracking-widest"> <i class="fa-solid fa-cloud-arrow-down"></i> Download ZIP </a> </aside> </div> </main> <!-- Footer --> <footer class="border-t border-gray-800 bg-gray-950 mt-20 py-12 text-center"> <div class="container mx-auto px-4"> <div class="flex justify-center gap-6 mb-6 text-gray-500"> <a href="#" class="hover:text-white transition-colors text-lg"><i class="fa-brands fa-discord"></i></a> <a href="#" class="hover:text-white transition-colors text-lg"><i class="fa-brands fa-x-twitter"></i></a> </div> <p class="text-gray-500 text-[10px] font-bold uppercase tracking-widest mb-2">© 2026 AI Skills Hub</p> <p class="text-gray-700 text-[9px] uppercase tracking-[0.2em]">Verified Metadata Repository</p> </div> </footer> </body> </html>