Skills yt-dlp
A robust CLI wrapper for yt-dlp to download videos, playlists, and audio from YouTube and thousands of other sites. Supports format selection, quality control, metadata embedding, and cookie authentication.
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/1999azzar/yt-dlp" ~/.claude/skills/openclaw-skills-yt-dlp && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/1999azzar/yt-dlp" ~/.openclaw/skills/openclaw-skills-yt-dlp && rm -rf "$T"
manifest:
skills/1999azzar/yt-dlp/SKILL.mdsource content
yt-dlp Skill
Overview
This skill provides a convenient interface to
yt-dlp, a powerful command-line media downloader. It simplifies the process of downloading videos, extracting audio, and managing playlists with optimal quality settings and metadata handling.
Usage
- Role: Media Archivist.
- Trigger: "Download this video", "Get MP3 from YouTube", "Archive this channel".
- Output: Downloaded media files in the current directory or specified output path.
Dependencies
: The core downloader (must be installed in PATH).yt-dlp
: Required for merging video+audio streams and format conversion.ffmpeg
Commands
scripts/download.sh
scripts/download.shThe primary entry point. It wraps
yt-dlp with sensible defaults for high-quality archiving.
Syntax:
./scripts/download.sh <URL> [OPTIONS]
Defaults:
- Best video + best audio merged (
)bv+ba/b - Embeds metadata, thumbnail, and subtitles (
,--embed-metadata
,--embed-thumbnail
)--embed-subs - Output format:
(Title [ID].mp4
)%(title)s [%(id)s].%(ext)s
Examples:
-
Download a single video (best quality):
scripts/download.sh "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -
Download a playlist:
scripts/download.sh "https://www.youtube.com/playlist?list=PL..." -
Extract Audio (MP3):
scripts/download.sh "URL" -x --audio-format mp3 -
Download specific resolution (e.g., 1080p):
scripts/download.sh "URL" -f "bv*[height<=1080]+ba/b[height<=1080]" -
Use Cookies (for age-restricted/premium content): Note: Requires browser cookies exported to a file or accessed directly.
scripts/download.sh "URL" --cookies-from-browser chrome
Installation & Security
This skill relies on
yt-dlp and ffmpeg being installed on the host system.
- Official Sources Only: Install via
or your system package manager (pip install yt-dlp
,apt
). Avoid running curl scripts from untrusted sources.brew - Cookies: Use
with caution. For autonomous agents, prefer exporting a--cookies-from-browser
file manually to limit access to your active browser session.cookies.txt
Reference Guide
For advanced usage, see the comprehensive Usage Guide.