--- name: yt-dlp-cli description: >- yt-dlp. Use when the user wants to download, extract audio, pull subtitles, clip, or archive a YouTube or other streaming-site URL, or when yt-dlp hits 403, bot-check, or only-360p. Not for local-file edit/transcode, watch/summarize without saving, search, or generic downloads. version: 0.1.2 license: MIT metadata: hermes: tags: [yt-dlp, media, video, audio, subtitles, archiving] category: media requires_toolsets: [terminal] --- # yt-dlp-cli - agent workflow **Result:** After a user asks to download, extract, clip, subtitle, or archive media from a yt-dlp-supported URL, the agent has either produced the correct file(s) on disk and reported path/size/identity, or stopped on an explicit blocker (missing binary, auth required, rights unclear, playlist too large, YouTube bot wall). **Next consumer:** The user (file on disk) and any later skill that transcribes/edits that file. **Done:** File exists at the stated path, matches the requested job (video vs audio vs clip vs playlist range), and the agent reported what it did and how it verified. Or a named blocker with the next safe action. **Intent (changes the approach):** Agents can already invoke `yt-dlp ` and they do it badly. This skill exists to close those failure modes, not to teach the CLI. Do not write a flag encyclopedia. Do not hide yt-dlp behind a Python wrapper. ## Autonomy envelope Invoking this skill authorizes local inspection, downloading the requested streaming-site URL, writing the resulting file(s) under the chosen destination, and running required local `ffmpeg` postprocessing for the requested media shape. It does not authorize downloading an unbounded playlist/channel, reading browser cookies or auth files, bypassing unclear rights, or supplying user-only inputs. Stop for confirmation only when rights are unclear, scope expands to a full playlist/channel without an agreed range/archive, cookies/auth are needed, or the next input can only come from the user. Quote every URL in shell commands. Treat a watch URL as one video unless the user explicitly asked for the playlist; keep `--no-playlist` on single-video jobs. Check `ffmpeg -version` before merged video/audio, audio extraction or conversion, subtitle embedding, clips, or SponsorBlock postprocessing; missing `ffmpeg` is a blocker for those shapes. ## Default download For a single requested video, run this command first: ```bash yt-dlp --no-playlist -P "" -o "%(title).200B [%(id)s].%(ext)s" --merge-output-format mp4 --print after_move:filepath "" ``` Use the path printed by `--print after_move:filepath` as the authoritative handoff path. Verify that file exists and is non-empty; for video, verify duration and resolution with `ffprobe` or equivalent. ## Deltas from the default - Height cap: add `-f "bv*[height<=1080]+ba/b[height<=1080]"` and change only the numeric cap. Use `yt-dlp --no-playlist -F ""` first only when the user requested a specific format ID or the first run returns the wrong shape; never invent format IDs. - Audio-only: replace `--merge-output-format mp4` with `-x`; add `--audio-format ` only when the user requested a container/codec such as mp3 or m4a. - Subtitles: for subtitle-only jobs, replace media download/postprocessing with `--skip-download --write-subs --sub-langs ""`. For video plus subtitles, keep the default download and add `--write-subs --sub-langs ""`. Add `--write-auto-subs` only when generated captions are acceptable, and `--embed-subs` only when embedded subtitles are requested. - Output layout: change only `-P ""` and `-o "