Transcribe and summarize YouTube videos or playlists using yt-dlp + Claude API with multiple transcription engines and summary modes (kurz/standard/learn). Use when user shares a YouTube URL, playlist URL, or asks to summarize a video.
Transcribe YouTube videos (single or playlist) and generate personalized, structured summaries using Claude.
Check that required tools are available before starting:
which yt-dlp || echo "MISSING: yt-dlp — install with: uv pip install yt-dlp"
Optional (for local Whisper):
which whisper || echo "OPTIONAL: whisper — install with: uv pip install openai-whisper"
Optional (for OpenAI API engines):
python3 -c "import openai" 2>/dev/null || echo "OPTIONAL: openai — install with: uv pip install openai"
echo "OPENAI_API_KEY: ${OPENAI_API_KEY:+set}" # Never show the actual key
Extract from $ARGUMENTS:
kurz (brief), standard (default), learnde,en)auto (default), whisper, whisper-api, gpt4o-transcribe--engine whisperDeutsch)claude-sonnet-4-6)If no URL is provided, ask the user for one.
| Mode | Description | Output |
|---|---|---|
kurz | Quick overview | Kernaussagen, Zusammenfassung (300 words), Details, Fazit |
standard | Comprehensive analysis (default) | Up to 2000 words with context, quotes, critical analysis |
learn | Extract learnings | Key principles, actionable items, skill matching, JSON+MD |
| Engine | Description | Requirements |
|---|---|---|
auto | Subtitles first, then fallback | yt-dlp |
whisper | Local Whisper transcription | openai-whisper |
whisper-api | OpenAI Whisper API (~$0.006/min) | openai, OPENAI_API_KEY |
gpt4o-transcribe | GPT-4o Transcribe (~$0.006/min, best quality) | openai, OPENAI_API_KEY |
The script auto-detects playlist URLs (containing list= or /playlist?). When a playlist URL is provided:
yt-dlp --flat-playlistThe script handles everything — just pass the playlist URL as the url argument. All flags (--mode, --engine, --save-learnings, etc.) apply to every video in the playlist.
For the interest feedback loop (Step 5): When processing a playlist, ask for interest feedback once at the end covering all videos, not after each individual video. Summarize the main topics across all videos and let the user rate overall.
Run the script to get the transcript. Use $CLAUDE_PLUGIN_ROOT for the script path:
python3 "${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/skills/yt-summarize}/scripts/yt-summarize.py" "$URL" --engine "$ENGINE" --transcript-only
python3 "${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/skills/yt-summarize}/scripts/yt-summarize.py" "$URL" --lang "$LANG" --transcript-only
IMPORTANT: Non-interactive fallback handling
In auto mode, if no subtitles are found and the script cannot prompt interactively (no TTY), it exits with code 2 and prints available engines as JSON to stderr.
When exit code is 2:
AskUserQuestion to ask the user which engine to use--engine <chosen_engine>Run the full pipeline with the chosen mode:
python3 "${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/skills/yt-summarize}/scripts/yt-summarize.py" "$URL" --mode "$MODE" --lang "$LANG" --engine "$ENGINE" --summary-lang "$SUMMARY_LANG" --model "$MODEL"
For learn mode with knowledge base saving:
python3 "${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/skills/yt-summarize}/scripts/yt-summarize.py" "$URL" --mode learn --save-learnings
Present the result clearly formatted. If the transcript is very long (>50,000 chars), warn the user about potential token usage before summarizing.
kurz: Display the summary directly.
standard: Display the summary. Due to length (~2000 words), consider using a collapsible section or clear heading structure.
learn: Display the learning summary. If --save-learnings was used, inform the user where files were saved. If skill matches were found, highlight them.
After presenting ANY summary (all modes), always do this:
Use AskUserQuestion to ask:
"Wie interessant war dieses Video für dich?" Options:
Based on the response, update INTERESTS.md:
INTERESTS.md from the repo (find it via $CLAUDE_CONFIG_REPO/INTERESTS.md or search for it)## Topics of Interest with today's date
reinforced: YYYY-MM-DD(added: YYYY-MM-DD)## Not Interested with (since: YYYY-MM-DD)If INTERESTS.md was changed:
chore: update INTERESTS.md from yt-summarize feedbackuv pip install yt-dlpuv pip install openai-whisperuv pip install openaiWhen you notice something that would improve this skill: