yt-dlp — Claude Code skill: download video and rip audio
A skill that spots video links in a conversation, downloads the clips with yt-dlp and pulls the audio track out of them.
npx skills add lwmxiaobei/yt-dlp-skill --skill yt-dlp -a claude-codeWhat yt-dlp does
Three scripts ship inside the skill's scripts/ folder. download_video.py handles clips from YouTube, Twitter/X, Vimeo, TikTok, Instagram, Facebook, Twitch, Dailymotion, Reddit, Streamable and whatever else yt-dlp supports. extract_audio.py writes the soundtrack out as mp3, m4a, opus, flac or wav. extract_urls.py picks links out of a string, a file or stdin.
Two ways to trigger it. Ask for a download and the agent grabs the URL and runs the matching script. Or a link shows up on its own mid-chat — then the agent asks first before pulling anything. Quality goes through --quality with best, 1080p, 720p, 480p or audio; audio lands as mp3 at 192kbps unless you say otherwise. A custom --format selector overrides the presets.
Format conversion runs through ffmpeg, so without it the transcoding steps fail. yt-dlp itself is checked with yt-dlp --version and installed via pip install yt-dlp or brew install yt-dlp. Private and age-gated clips need cookies, otherwise the download stops at the access check. The scripts use nothing beyond the Python standard library.
What it helps with
- download a clip from a link pasted in chat
- rip the audio track to mp3
- find every video link inside a text file
- read clip metadata without downloading it
- queue several links as one playlist
Example prompts for the agent
- Download this video https://youtube.com/watch?v=... into downloads
- Extract the audio from https://youtu.be/... as m4a
- Find all video links in
notes.txtand list them
How to install yt-dlp
1Skills CLI (Vercel)
npx skills add lwmxiaobei/yt-dlp-skill --skill yt-dlp -a claude-code2Manually: put the files in place
~/.claude/skills/yt-dlp/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/yt-dlp/
1Skills CLI (Vercel)
npx skills add lwmxiaobei/yt-dlp-skill --skill yt-dlp -a codex2Manually: put the files in place
.agents/skills/yt-dlp/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add lwmxiaobei/yt-dlp-skill --skill yt-dlp -a cursor2Manually: put the files in place
.cursor/skills/yt-dlp/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install lwmxiaobei/yt-dlp-skill yt-dlp2Manually: put the files in place
.github/skills/yt-dlp/SKILL.md1Skills CLI (Vercel)
npx skills add lwmxiaobei/yt-dlp-skill --skill yt-dlp -a gemini-cli2Platform CLI
gemini skills install https://github.com/lwmxiaobei/yt-dlp-skillManually: put the files in place
.devin/skills/yt-dlp/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add lwmxiaobei/yt-dlp-skill --skill yt-dlp -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about yt-dlp
How do I install yt-dlp in Claude Code?
Run npx skills add lwmxiaobei/yt-dlp-skill --skill yt-dlp -a claude-code. The skill file then sits at ~/.claude/skills/yt-dlp/SKILL.md.
What does the yt-dlp skill do?
It gives the agent scripts for downloading video and extracting audio with yt-dlp, and it can also notice video links in a conversation and offer to fetch them.
What has to be installed beforehand?
yt-dlp itself plus ffmpeg, which handles format conversion. You can confirm yt-dlp with yt-dlp --version.