skills/media/yt-dlp/SKILL.md
Use yt-dlp to fetch YouTube metadata, transcripts, and media, plus summarize videos by default when given only a YouTube URL. Use for channel stats, playlist inspection, subtitle extraction, audio or video downloads, and consistent temp-folder workflows with yt-dlp.
npx skillsauth add helix4u/hermes-agent yt-dlpInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use a dedicated temp folder for all yt-dlp work so you never spray files around the workspace. The default temp root is data/tmp/yt-dlp inside the workspace root (for Hermes this means a relative path data/tmp/yt-dlp from the current working directory). Always create it if missing, and keep intermediate JSON, subtitles, and media in that folder unless the user explicitly asks for a different destination. Prefer writing outputs into temp and then moving or copying to a final location if needed. If you create helper scripts, put them under workspace/scripts/yt-dlp and delete one-off scripts after use. Before fetching channel stats or user-specific data, check TOOLS.md for usernames and tool variables.
When constructing commands, never run yt-dlp in random directories; always either:
cd into data/tmp/yt-dlp first, or--paths data/tmp/yt-dlp / -P data/tmp/yt-dlp so all output files land there.On Windows / PowerShell (your setup), use this pattern only:
New-Item -ItemType Directory -Force -Path "data/tmp/yt-dlp" | Out-Null
yt-dlp --paths "data/tmp/yt-dlp" ...
When given a plain YouTube URL with no extra instruction, treat it as:
“Give me a thorough written explanation of this video as if I will not watch it.”
Default flow (run at most once per URL; if any yt-dlp step fails, show the error and explain it instead of looping retries):
data/tmp/yt-dlp exists as above.--dump-single-json into temp, e.g.:
yt-dlp --dump-single-json --paths \"data/tmp/yt-dlp\" -o \"%(title)s [%(id)s].%(ext)s\" <URL> > \"data/tmp/yt-dlp\\meta.json\"
yt-dlp --dump-single-json --paths data/tmp/yt-dlp -o '%(title)s [%(id)s].%(ext)s' <URL> > data/tmp/yt-dlp/meta.json
--write-auto-subs or --write-subs--sub-langs en (or the user’s language)--sub-format vtt--skip-downloaddata/tmp/yt-dlp via --paths / -P.read_file to open the .vtt from data/tmp/yt-dlp and summarize from the transcript.data/tmp/yt-dlp with --extract-audio and an audio format (e.g. mp3), then summarize from the audio (or via Whisper if available).Use --dump-single-json with --flat-playlist for speed, then parse fields like channel, channel_id, uploader, uploader_id, channel_follower_count, and entry counts. If view counts are missing from yt-dlp, say so and offer a browser scrape as a follow up.
Use -F for formats, then -f to select, or --extract-audio with --audio-format and --audio-quality for audio. Use -o to control output names, and --paths to set final destinations. Use --download-archive to avoid duplicates for batch pulls.
Use --list-subs first when accuracy matters, then --write-subs or --write-auto-subs with --sub-langs and --sub-format. Use --convert-subs if you need srt.
Use --write-info-json, --write-thumbnail, or --write-all-thumbnails, and --embed-metadata or --embed-thumbnail when producing final media.
Use --cookies-from-browser or --cookies. Keep cookie paths private and never print them.
If yt-dlp warns about missing JavaScript runtimes, note it and continue unless extraction fails. If it fails, suggest adding a JS runtime or switching to browser extraction.
When transcribing with Whisper, prefer CUDA if available by using --device cuda, and set UTF-8 output (for example set PYTHONUTF8=1 or use an output format like srt/json) to avoid Windows UnicodeEncodeError when writing files.
Prefer short, direct commands. Avoid listing huge inventories of formats unless explicitly asked.
If a yt-dlp command fails or you’re unsure about flags, it is always allowed to run:
yt-dlp --help
and then adjust the command based on the documented Usage: yt-dlp [OPTIONS] URL [URL...] and options. Never keep retrying the same failing command blindly; check --help or the error message once, fix the command, and then try again at most one more time.
Use the canonical helper script in this skill for transcript pulls:
python SKILL_DIR/scripts/fetch_transcript.py "https://youtube.com/watch?v=VIDEO_ID"
python SKILL_DIR/scripts/fetch_transcript.py "https://youtube.com/watch?v=VIDEO_ID" --timestamps
python SKILL_DIR/scripts/fetch_transcript.py "https://youtube.com/watch?v=VIDEO_ID" --text-only
python SKILL_DIR/scripts/fetch_transcript.py "https://youtube.com/watch?v=VIDEO_ID" --language tr,en
If both yt-dlp subtitles and youtube-transcript-api are available:
yt-dlp subtitle extraction for consistent data/tmp/yt-dlp file artifacts.fetch_transcript.py as fallback (or when plain JSON/plain-text transcript is explicitly requested).This is the canonical YouTube skill for this project. The youtube-content skill is a compatibility alias and should defer to this one.
development
Use when you have a spec or requirements for a multi-step task. Creates comprehensive implementation plans with bite-sized tasks, exact file paths, and complete code examples.
development
Use when implementing any feature or bugfix, before writing implementation code. Enforces RED-GREEN-REFACTOR cycle with test-first approach.
development
Use when encountering any bug, test failure, or unexpected behavior. 4-phase root cause investigation — NO fixes without understanding the problem first.
development
Use when executing implementation plans with independent tasks. Dispatches fresh delegate_task per task with two-stage review (spec compliance then code quality).