Extract content from YouTube videos and generate podcasts, video overviews, quizzes, flashcards, reports, and slide decks from research papers using Google NotebookLM. Use when the user wants to extract a YouTube transcript, analyze a video, turn a paper into a podcast, generate an audio summary, create a quiz from a paper, make slides from research, or automate any NotebookLM workflow.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
npx skills add https://github.com/damionrashford/mlx --skill media
La commande reste sur une seule ligne. Faites défiler horizontalement pour la vérifier avant de la copier.
Vous préférez une copie locale ? Téléchargez les fichiers actuellement disponibles dans SkillsMP.
Explorateur de fichiers
7 fichiers
Affichage de SKILL.md
SKILL.md
Instructions source · Aperçu en lecture seule
name
media
description
Extract content from YouTube videos and generate podcasts, video overviews, quizzes, flashcards, reports, and slide decks from research papers using Google NotebookLM. Use when the user wants to extract a YouTube transcript, analyze a video, turn a paper into a podcast, generate an audio summary, create a quiz from a paper, make slides from research, or automate any NotebookLM workflow.
allowed-tools
Bash(uv run * scripts/auth.py *) Bash(uv run * scripts/extract.py *) Bash(uv run * scripts/generate.py *) Bash(uv run * scripts/manage.py *) Read Write Glob Grep
argument-hint
YouTube URL, paper PDF path, or notebook ID (e.g. "https://youtube.com/watch?v=..." or "papers/attention.pdf")
This skill combines two capabilities: extracting metadata, transcripts, comments, chapters, and media from YouTube videos, and generating podcasts, videos, quizzes, reports, and more from research papers using Google NotebookLM.
YouTube Extraction
Instructions and tools for extracting metadata, transcripts, comments, chapters, and media from YouTube videos.
uv run ${CLAUDE_SKILL_DIR}/scripts/extract.py all "$ARGUMENTS" --max-comments 20 --lang en
Extract metadata only
uv run ${CLAUDE_SKILL_DIR}/scripts/extract.py metadata "$ARGUMENTS"
Extract transcript only
uv run ${CLAUDE_SKILL_DIR}/scripts/extract.py transcript "$ARGUMENTS" --lang en
Extract comments
uv run ${CLAUDE_SKILL_DIR}/scripts/extract.py comments "$ARGUMENTS" --max 20
Extract for research (compact summary with style hints)
uv run ${CLAUDE_SKILL_DIR}/scripts/extract.py research "$ARGUMENTS" --lang en
Download video
uv run ${CLAUDE_SKILL_DIR}/scripts/extract.py download-video "$ARGUMENTS" --quality 720p --output ./cache/downloads
Download audio (WAV)
uv run ${CLAUDE_SKILL_DIR}/scripts/extract.py download-audio "$ARGUMENTS" --output ./cache/downloads
Extract chapters as scenes
uv run ${CLAUDE_SKILL_DIR}/scripts/extract.py chapters "$ARGUMENTS" --lang en
Output
All commands output JSON to stdout by default. Use --output <file.json> to save to a file. Add --no-pretty to disable pretty-printing.
Guidelines
Start with to check the video exists and get basic info.
metadata
Use transcript for lecture analysis, summarization, or content extraction.
Use research for a compact, LLM-friendly summary with style hints and top comments.
Use chapters to get chapter-aligned transcript segments.
Only use download-video or download-audio when the user explicitly needs local media files.
Always cite: video title, channel, and URL in any summary.
Content Generation (NotebookLM)
Generate podcasts, videos, quizzes, reports, and more from research papers using Google NotebookLM. This section covers both quick paper-to-podcast workflows and full NotebookLM CLI automation.
Prerequisites
NotebookLM requires a one-time browser login to Google. Check auth status before generating:
uv run ${CLAUDE_SKILL_DIR}/scripts/auth.py check
If not authenticated, guide the user to run:
uv run ${CLAUDE_SKILL_DIR}/scripts/auth.py login
This opens a browser for Google SSO. Credentials are cached at ~/.notebooklm/storage_state.json.
Before starting workflows, verify the CLI is ready:
notebooklm status -- Should show "Authenticated as: email@..."
notebooklm list --json -- Should return valid JSON (even if empty notebooks list)
If either fails -- Run notebooklm login
CI/CD, Multiple Accounts, and Parallel Agents
For automated environments, multiple accounts, or parallel agent workflows:
Variable
Purpose
NOTEBOOKLM_HOME
Custom config directory (default: ~/.notebooklm)
NOTEBOOKLM_AUTH_JSON
Inline auth JSON - no file writes needed
CI/CD setup: Set NOTEBOOKLM_AUTH_JSON from a secret containing your storage_state.json contents.
Multiple accounts: Use different NOTEBOOKLM_HOME directories per account.
Parallel agents: The CLI stores notebook context in a shared file (~/.notebooklm/context.json). Multiple concurrent agents using notebooklm use can overwrite each other's context.
Solutions for parallel workflows:
Always use explicit notebook ID (recommended): Pass -n <notebook_id> (for wait/download commands) or --notebook <notebook_id> (for others) instead of relying on use
Per-agent isolation: Set unique NOTEBOOKLM_HOME per agent: export NOTEBOOKLM_HOME=/tmp/agent-$ID
Use full UUIDs: Avoid partial IDs in automation (they can become ambiguous)
Parallel safety: Use explicit notebook IDs in parallel workflows. Commands supporting -n shorthand: artifact wait, source wait, research wait/status, download *. Download commands also support -a/--artifact. Other commands use --notebook. For chat, use -c <conversation_id> to target a specific conversation.
Partial IDs: Use first 6+ characters of UUIDs. Must be unique prefix (fails if ambiguous). Works for ID-based commands such as use, source delete, and wait. For exact source-title deletion, use source delete-by-title "Title". For automation, prefer full UUIDs to avoid ambiguity.
Workflow
1. Generate a podcast from a paper
# From a local PDF
uv run ${CLAUDE_SKILL_DIR}/scripts/generate.py podcast ./papers/attention.pdf -o podcast.mp3
# From a URL (arXiv, web page, etc.)
uv run ${CLAUDE_SKILL_DIR}/scripts/generate.py podcast https://arxiv.org/abs/2401.12345 -o podcast.mp3
# Debate format (two speakers arguing perspectives)
uv run ${CLAUDE_SKILL_DIR}/scripts/generate.py podcast paper.pdf -o debate.mp3 --format debate
# Deep dive (20-30 min detailed analysis)
uv run ${CLAUDE_SKILL_DIR}/scripts/generate.py podcast paper.pdf -o deep.mp3 --format deep-dive --length long
# With custom focus instructions
uv run ${CLAUDE_SKILL_DIR}/scripts/generate.py podcast paper.pdf -o podcast.mp3 \
--instructions "Focus on the methodology and experimental results, skip the related work"
# In another language
uv run ${CLAUDE_SKILL_DIR}/scripts/generate.py podcast paper.pdf -o podcast.mp3 --language ja
2. Generate other content types
# Video overview (MP4 with AI visuals)
uv run ${CLAUDE_SKILL_DIR}/scripts/generate.py video paper.pdf -o overview.mp4 --style cinematic
# Quiz from paper content
uv run ${CLAUDE_SKILL_DIR}/scripts/generate.py quiz paper.pdf -o quiz.json --difficulty hard
# Flashcards for study
uv run ${CLAUDE_SKILL_DIR}/scripts/generate.py flashcards paper.pdf -o cards.json
# Report (study guide, briefing doc, or blog post)
uv run ${CLAUDE_SKILL_DIR}/scripts/generate.py report paper.pdf -o guide.md --format study-guide
# Slide deck
uv run ${CLAUDE_SKILL_DIR}/scripts/generate.py slides paper.pdf -o slides.pdf
# Infographic
uv run ${CLAUDE_SKILL_DIR}/scripts/generate.py infographic paper.pdf -o infographic.png
3. Manage notebooks and artifacts
# List all notebooks
uv run ${CLAUDE_SKILL_DIR}/scripts/manage.py list
# List artifacts in a notebook
uv run ${CLAUDE_SKILL_DIR}/scripts/manage.py artifacts <notebook_id>
# Download an existing artifact
uv run ${CLAUDE_SKILL_DIR}/scripts/manage.py download <notebook_id> --artifact <artifact_id> -o output.mp3
# Delete a notebook
uv run ${CLAUDE_SKILL_DIR}/scripts/manage.py delete <notebook_id>
4. Multi-source notebooks (combine papers)
# Create a notebook, add multiple papers, then generate
uv run ${CLAUDE_SKILL_DIR}/scripts/generate.py podcast \
paper1.pdf paper2.pdf paper3.pdf \
-o combined_podcast.mp3 \
--title "Survey of Attention Mechanisms" \
--format deep-dive \
--instructions "Compare and contrast the approaches across all papers"
5. Research to podcast (automated with subagent)
When the user wants full automation (generate and download when ready):
Create notebook and add sources as usual
Wait for sources to be ready (use source wait or check source list --json)
Run notebooklm generate audio "..." --json -- parse artifact_id from output
Spawn a background agent using Task tool:
Task(
prompt="Wait for artifact {artifact_id} in notebook {notebook_id} to complete, then download.
Use: notebooklm artifact wait {artifact_id} -n {notebook_id} --timeout 600
Then: notebooklm download audio ./podcast.mp3 -a {artifact_id} -n {notebook_id}",
subagent_type="general-purpose"
)
Main conversation continues while agent waits
Error handling in subagent:
If artifact wait returns exit code 2 (timeout): Report timeout, suggest checking artifact list
If download fails: Check if artifact status is COMPLETED first
6. Bulk import with source waiting (subagent pattern)
When adding multiple sources and needing to wait for processing before chat/generation:
Task(
prompt="Wait for sources {source_ids} in notebook {notebook_id} to be ready.
For each: notebooklm source wait {id} -n {notebook_id} --timeout 120
Report when all ready or if any fail.",
subagent_type="general-purpose"
)
Main conversation continues while agent waits
Once sources are ready, proceed with chat or generation
Why wait for sources? Sources must be indexed before chat or generation. Takes 10-60 seconds per source.
7. Deep web research (subagent pattern)
Deep research finds and analyzes web sources on a topic:
notebooklm source add-research "topic query" --mode deep --no-wait
Spawn a background agent to wait and import:
Task(
prompt="Wait for research in notebook {notebook_id} to complete and import sources.
Use: notebooklm research wait -n {notebook_id} --import-all --timeout 300
Report how many sources were imported.",
subagent_type="general-purpose"
)
Main conversation continues while agent waits
When agent completes, sources are imported automatically
Alternative (blocking): For simple cases, omit --no-wait:
notebooklm source add-research "topic" --mode deep --import-all
# Blocks for up to 5 minutes
When to use each mode:
--mode fast: Specific topic, quick overview needed (5-10 sources, seconds)
Extract IDs: Parse the id, source_id, or task_id field from JSON output.
Status values:
Sources: processing -> ready (or error)
Artifacts: pending or in_progress -> completed (or unknown)
Language Configuration
Language setting controls the output language for generated artifacts (audio, video, etc.).
Important: Language is a GLOBAL setting that affects all notebooks in your account.
# List all 80+ supported languages with native names
notebooklm language list
# Show current language setting
notebooklm language get
# Set language for artifact generation
notebooklm language set zh_Hans # Simplified Chinese
notebooklm language set ja # Japanese
notebooklm language set en # English (default)
Common language codes:
Code
Language
en
English
zh_Hans
Simplified Chinese
zh_Hant
Traditional Chinese
ja
Japanese
ko
Korean
es
Spanish
fr
French
de
German
pt_BR
Portuguese (Brasil)
Override per command: Use --language flag on generate commands:
notebooklm generate audio --language ja # Japanese podcast
notebooklm generate video --language zh_Hans # Chinese video
Offline mode: Use --local flag to skip server sync:
notebooklm language set zh_Hans --local # Save locally only
notebooklm language get --local # Read local config only
Integration with research skill
The research skill downloads papers to ./papers/. Feed them directly:
# Step 1: Download paper (research skill)
uv run ${CLAUDE_SKILL_DIR}/../research/scripts/download.py 2401.12345 -o ./papers/
# Step 2: Generate podcast
uv run ${CLAUDE_SKILL_DIR}/scripts/generate.py podcast ./papers/2401.12345.pdf -o podcast.mp3
Processing Times
Operation
Typical time
Suggested timeout
Source processing
30s - 10 min
600s
Research (fast)
30s - 2 min
180s
Research (deep)
15 - 30+ min
1800s
Notes
instant
n/a
Mind-map
instant (sync)
n/a
Quiz, flashcards
5 - 15 min
900s
Report, data-table
5 - 15 min
900s
Audio generation
10 - 20 min
1200s
Video generation
15 - 45 min
2700s
Polling intervals: When checking status manually, poll every 15-30 seconds to avoid excessive API calls.
Error Handling
Error
Cause
Action
Auth/cookie error
Session expired
Run notebooklm auth check then notebooklm login
"No notebook context"
Context not set
Use -n <id> or --notebook <id> flag (parallel), or notebooklm use <id> (single-agent)
"No result found for RPC ID"
Rate limiting
Wait 5-10 min, retry
GENERATION_FAILED
Google rate limit
Wait and retry later
Download fails
Generation incomplete
Check artifact list for status
Invalid notebook/source ID
Wrong ID
Run notebooklm list to verify
RPC protocol error
Google changed APIs
May need CLI update
On failure, offer the user a choice:
Retry the operation
Skip and continue with something else
Investigate the error
Exit Codes
All commands use consistent exit codes:
Code
Meaning
Action
0
Success
Continue
1
Error (not found, processing failed)
Check stderr, see Error Handling
2
Timeout (wait commands only)
Extend timeout or check status manually
Examples:
source wait returns 1 if source not found or processing failed
artifact wait returns 2 if timeout reached before completion
generate returns 1 if rate limited (check stderr for details)
Rules
Autonomy rules
Run automatically (no confirmation):
notebooklm status - check context
notebooklm auth check - diagnose auth issues
notebooklm list - list notebooks
notebooklm source list - list sources
notebooklm artifact list - list artifacts
notebooklm language list - list supported languages
notebooklm language get - get current language
notebooklm language set - set language (global setting)
notebooklm artifact wait - wait for artifact completion (in subagent context)
notebooklm source wait - wait for source processing (in subagent context)
notebooklm research status - check research status
notebooklm research wait - wait for research (in subagent context)
notebooklm use <id> - set context (single-agent only -- use -n flag in parallel workflows)