yt-dlp
Download audio/video from YouTube and other sites using yt-dlp. Use when the user asks to download music, songs, albums, podcasts, or video from YouTube or similar platforms. Triggers on 'download song', 'get mp3', 'yt-dlp', 'youtube download', 'rip audio'.
Best use case
yt-dlp is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Download audio/video from YouTube and other sites using yt-dlp. Use when the user asks to download music, songs, albums, podcasts, or video from YouTube or similar platforms. Triggers on 'download song', 'get mp3', 'yt-dlp', 'youtube download', 'rip audio'.
Teams using yt-dlp should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/yt-dlp/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How yt-dlp Compares
| Feature / Agent | yt-dlp | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Download audio/video from YouTube and other sites using yt-dlp. Use when the user asks to download music, songs, albums, podcasts, or video from YouTube or similar platforms. Triggers on 'download song', 'get mp3', 'yt-dlp', 'youtube download', 'rip audio'.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# yt-dlp — Media Downloads
Download audio/video from YouTube (and 1000+ other sites) via yt-dlp CLI.
## Installation
```bash
pip3 install --break-system-packages yt-dlp
```
Note: On macOS with system Python, `--break-system-packages` is required (PEP 668).
## Common Workflows
### Download as MP3 (best quality)
```bash
yt-dlp -x --audio-format mp3 --audio-quality 0 -o "$HOME/Documents/%(title)s.%(ext)s" "ytsearch1:ARTIST TITLE"
```
### Download with custom filename
```bash
yt-dlp -x --audio-format mp3 --audio-quality 0 -o "$HOME/Documents/Artist - Title.%(ext)s" "ytsearch1:Artist Title"
```
### Download from direct URL
```bash
yt-dlp -x --audio-format mp3 --audio-quality 0 -o "$HOME/Documents/%(title)s.%(ext)s" "https://www.youtube.com/watch?v=XXXX"
```
### Download video (best quality)
```bash
yt-dlp -f "bestvideo+bestaudio" --merge-output-format mp4 -o "$HOME/Documents/%(title)s.%(ext)s" "URL"
```
### Metadata only (no download)
```bash
yt-dlp --dump-json "ytsearch1:query" | jq '{title, duration, url}'
```
## Key Flags
| Flag | Purpose |
|------|---------|
| `-x` | Extract audio only |
| `--audio-format mp3` | Convert to mp3 |
| `--audio-quality 0` | Best quality (VBR ~245kbps) |
| `-o TEMPLATE` | Output filename template |
| `-f 2` | Download format #2 (often 360p mp4) |
| `--cookies-from-browser chrome` | Use browser cookies for age-gated content |
| `ytsearch1:query` | Search YouTube, take first result |
| `ytsearch5:query` | Search YouTube, take first 5 results |
## Output Templates
| Template | Expands to |
|----------|-----------|
| `%(title)s` | Video title |
| `%(uploader)s` | Channel name |
| `%(duration)s` | Duration in seconds |
| `%(ext)s` | File extension |
| `%(playlist_index)s` | Index in playlist |
## Pitfalls
- **JS runtime warning**: "No supported JavaScript runtime" warning appears but downloads still work via Android API fallback. Install `deno` to suppress and get all formats.
- **Google Drive sync**: On this machine, Google Drive mounts at `~/Library/CloudStorage/GoogleDrive-USER_EMAIL/My Drive/`, NOT at `~/Documents/`. If the user wants files on Google Drive, output there.
- **Playlists**: Add `--no-playlist` to avoid downloading entire playlists when given a video URL that's part of one.
- **Rate limiting**: YouTube may throttle. Add `--sleep-interval 3` for batch downloads.
- **Age-gated content**: Use `--cookies-from-browser chrome` or `--cookies cookies.txt`.
## File Delivery
After downloading, send the file back to the user:
```
MEDIA:/absolute/path/to/file.mp3
```Related Skills
writer
Write content in Eric's voice — articles, blog posts, tweets, social media posts, marketing copy, newsletter drafts. Loads WRITING-STYLE.md and enforces kill phrases.
positioning-angles
Use when defining product positioning, choosing strategic angles, crafting value propositions, competitive positioning, product messaging, differentiation strategy, or go-to-market angles. Also use for 'how should I position my app', 'what angle should I use', 'painkiller vs vitamin', or 'market positioning'.
outline-generator
Use when generating outlines, article structures, content outlines, blog outlines, planning article sections, structuring posts, breaking down topics into sections, or organizing ideas for long-form content. Also use for 'outline this', 'structure this article', or 'plan the sections'.
last30days-open
Use only when the user explicitly asks for the open variant of last30days, including watchlists, briefings, and history queries. Sources: Reddit, X, YouTube, web.
last30days
Use when researching what happened in the last 30 days on a topic. Also triggered by 'last30'. Sources: Reddit, X, YouTube, web. Produces expert-level summary with copy-paste-ready prompts.
hooks
Use when generating hooks, headlines, titles, and scroll-stopping openers for content. Also use when analyzing viral posts, Reels, TikToks, YouTube Shorts, or successful social examples to extract reusable hook patterns and improve hook guidance.
evaluate-content
Use when judging content quality OR editing/improving existing copy: shareability, readability, voice, cuttability, angle, copy sweeps.
editor-in-chief
Use when a first draft is complete and all Phase 1 gates are done: topic selected (seo-research), title approved (hooks), outline approved (outline-generator), draft written (writer). Runs autonomous diagnosis-prescribe-rewrite loop before Substack.
copywriting
Write or improve marketing copy for any surface: pages, ads, app stores, landing pages, TikTok/Meta scripts, push notifications, UGC. Combines page copy frameworks with direct response principles.
content-strategy
Use when building content strategy: hooks, angles, and ideas from what's trending now. Covers organic and paid creative across TikTok, X, YouTube, Meta, LinkedIn.
content-pipeline
Orchestrator for the 3-article content pipeline — runs research phase, spawns parallel article sub-agents, creates Typefully drafts. Use when running the full content pipeline (usually via cron at 3am).
youtube-title-creator
Generate high-CTR YouTube titles and thumbnail concepts using 119 proven frameworks ranked by performance score. Use when creating YouTube titles, optimizing video titles for CTR, generating thumbnail text, A/B testing title variations, or pairing titles with complementary thumbnails. Covers framework fitting method, universalization strategy, complementarity principle, and psychological trigger analysis.