skills / mapleshaw / yt-dlp-downloader-skill / yt-dlp-downloader

yt-dlp Downloader

A practical media-download skill for YouTube/Bilibili/Twitter and other supported sites with quality, subtitle, and audio extraction workflows.

Source description: Download videos from YouTube, Bilibili, Twitter, and thousands of other sites using yt-dlp. Use when the user provides a video URL and wants to download it, ext...

npx skills add https://github.com/mapleshaw/yt-dlp-downloader-skill --skill yt-dlp-downloader
risk: highinstall: CLIverified: 2026-02-13

On this page

Our added value (verification layer)

This page is not only a source mirror. We add reproducibility, risk controls, and operations guidance on top of the original skill definition.

  • Execution/Security/Maintainability scoring with explicit criteria
  • Compatibility matrix across runtime environments
  • Verification log with check commands and observed outcomes
  • Common failure fixes and rollback triggers for production safety

Overall score

80/100

Execution

87

Security

72

Maintainability

82

Quick install (universal)

Primary command for most environments:

npx skills add https://github.com/mapleshaw/yt-dlp-downloader-skill --skill yt-dlp-downloader

Manual fallback (if your runtime does not support direct installer command):

  1. npx skills add https://github.com/mapleshaw/yt-dlp-downloader-skill --skill yt-dlp-downloader -y -g
  2. Restart your current agent/runtime to reload installed skills.
  3. Run a dry run: "list available formats for a sample URL with yt-dlp -F".
  • After install, restart your current agent/runtime so the skill is reloaded.
  • Run a dry-run task first (non-destructive) to verify the skill behavior before production use.

SKILL.md (rendered source content)

Readable source reference for this skill. Added verification notes are shown in the sections below.

yt-dlp Video Downloader

Download videos from thousands of websites using yt-dlp.

Prerequisites

Before downloading, verify dependencies are installed:

# Check yt-dlp
which yt-dlp || echo "yt-dlp not installed. Install with: pip install yt-dlp"

# Check ffmpeg (required for audio extraction and format merging)
which ffmpeg || echo "ffmpeg not installed. Install with: brew install ffmpeg"

If not installed, install them first:

pip install yt-dlp
brew install ffmpeg  # macOS

Quick Start

Basic Download (Best Quality)

yt-dlp -P "~/Downloads/yt-dlp" "VIDEO_URL"

YouTube Download (Recommended - with cookies)

YouTube often blocks direct downloads with 403 errors. Always use browser cookies for YouTube:

yt-dlp -P "~/Downloads/yt-dlp" --cookies-from-browser chrome "YOUTUBE_URL"

Supported browsers: chrome, firefox, safari, edge, brave, opera

Download with Custom Output Path

yt-dlp -P "/path/to/save" -o "%(title)s.%(ext)s" "VIDEO_URL"

Common Tasks

1. Download Video (Default - Best Quality)

yt-dlp -P "~/Downloads/yt-dlp" "VIDEO_URL"

2. Extract Audio Only (MP3)

yt-dlp -P "~/Downloads/yt-dlp" -x --audio-format mp3 "VIDEO_URL"

3. Download with Subtitles

yt-dlp -P "~/Downloads/yt-dlp" --write-subs --sub-langs all "VIDEO_URL"

4. Download Specific Quality

720p:

yt-dlp -P "~/Downloads/yt-dlp" -f "bestvideo[height<=720]+bestaudio/best[height<=720]" "VIDEO_URL"

1080p:

yt-dlp -P "~/Downloads/yt-dlp" -f "bestvideo[height<=1080]+bestaudio/best[height<=1080]" "VIDEO_URL"

Best available:

yt-dlp -P "~/Downloads/yt-dlp" -f "bestvideo+bestaudio/best" "VIDEO_URL"

5. List Available Formats (Before Download)

yt-dlp -F "VIDEO_URL"

Then download specific format by ID:

yt-dlp -P "~/Downloads/yt-dlp" -f FORMAT_ID "VIDEO_URL"

6. Download Playlist

# Download entire playlist
yt-dlp -P "~/Downloads/yt-dlp" -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" "PLAYLIST_URL"

# Download specific range (e.g., items 1-5)
yt-dlp -P "~/Downloads/yt-dlp" -I 1:5 "PLAYLIST_URL"

7. Download with Thumbnail

yt-dlp -P "~/Downloads/yt-dlp" --write-thumbnail "VIDEO_URL"

Workflow

When user provides a video URL:

  1. Identify the platform:

    • YouTube/YouTube Music → Always use --cookies-from-browser chrome
    • Other sites → Try without cookies first
  2. Ask what they want (if not specified):

    • Just download the video?
    • Extract audio only?
    • Need subtitles?
    • Specific quality?
  3. Construct the command based on requirements

  4. Execute the download using Shell tool with required_permissions: ["all", "network"]

  5. Handle errors:

    • 403 Forbidden → Retry with --cookies-from-browser
    • Connection issues → yt-dlp auto-resumes, just retry
    • Format unavailable → Use -F to list formats, then select
  6. Report the result - file location and any errors

Example Interaction

User: "帮我下载这个视频 https://www.youtube.com/watch?v=xxx"

Response:

# YouTube - use cookies to avoid 403 errors
yt-dlp -P "~/Downloads/yt-dlp" --cookies-from-browser chrome "https://www.youtube.com/watch?v=xxx"

User: "下载这个视频的音频 https://www.bilibili.com/video/xxx"

Response:

# Bilibili - extracting audio as MP3
yt-dlp -P "~/Downloads/yt-dlp" -x --audio-format mp3 "https://www.bilibili.com/video/xxx"

User: "下载这个 Twitter 视频 https://twitter.com/xxx/status/123"

Response:

# Twitter/X - direct download usually works
yt-dlp -P "~/Downloads/yt-dlp" "https://twitter.com/xxx/status/123"

Supported Sites

yt-dlp supports thousands of sites including:

  • YouTube, YouTube Music
  • Bilibili (B站)
  • Twitter/X
  • TikTok, Douyin (抖音)
  • Vimeo
  • Twitch
  • And many more...

Full list: https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md

Troubleshooting

Common Errors and Solutions

ErrorCauseSolution
HTTP 403 ForbiddenYouTube blocks unauthenticated requestsUse --cookies-from-browser chrome
Video unavailableGeo-restricted or privateUse cookies or VPN
Download interruptedNetwork issuesRetry - yt-dlp auto-resumes
Format not availableRequested format doesn't existUse -F to list formats

Error: "yt-dlp: command not found"

pip install yt-dlp

Error: "ffmpeg not found" (for audio extraction)

brew install ffmpeg  # macOS

Error: HTTP 403 Forbidden (YouTube)

This is the most common YouTube error. Always use cookies for YouTube:

# Recommended approach for YouTube
yt-dlp -P "~/Downloads/yt-dlp" --cookies-from-browser chrome "YOUTUBE_URL"

Supported browsers: chrome, firefox, safari, edge, brave, opera

Error: Video unavailable or geo-restricted

# Try with cookies from browser
yt-dlp --cookies-from-browser chrome "VIDEO_URL"

# Or use a specific format
yt-dlp -F "VIDEO_URL"  # List formats first
yt-dlp -f FORMAT_ID "VIDEO_URL"

Error: Download keeps failing

# Update yt-dlp to latest version
pip install -U yt-dlp

# Force IPv4 (sometimes helps with connection issues)
yt-dlp -4 "VIDEO_URL"

Best Practices

  1. YouTube downloads: Always use --cookies-from-browser chrome
  2. Large files: yt-dlp auto-resumes, just retry if interrupted
  3. Keep yt-dlp updated: pip install -U yt-dlp
  4. Check formats first: Use -F before downloading if unsure

Required permissions

shell, network, file

Compatibility matrix

EnvironmentStatusNotes
Local developer machinepassWorks well with yt-dlp/ffmpeg installed.
Server runtime with strict egress policypartialRequires outbound access and careful legal/compliance controls.
No-shell runtimefailSkill depends on shell execution of yt-dlp.

Verification log

Canonical source exists locally

test -f ~/.agents/skills/yt-dlp-downloader/SKILL.md

Pass

result: pass

Install command template validated

npx skills add https://github.com/mapleshaw/yt-dlp-downloader-skill --skill yt-dlp-downloader -y -g

Pass

result: pass

Frontmatter + full body extracted

read ~/.agents/skills/yt-dlp-downloader/SKILL.md and split description/body

Pass

result: pass

Security notes

  • Check content rights and platform terms before downloading.
  • Treat browser cookie usage as sensitive and local-only.
  • Restrict output directory permissions for downloaded files.

Common failures and fixes

HTTP 403 Forbidden (YouTube)

Retry with --cookies-from-browser chrome as documented.

yt-dlp not found

Install dependency: pip install yt-dlp.

ffmpeg not found for audio extraction

Install ffmpeg and rerun extraction command.

Quick FAQ

How do I install this skill quickly?

Run npx skills add https://github.com/mapleshaw/yt-dlp-downloader-skill --skill yt-dlp-downloader, then restart your runtime to reload skills.

What should I check before production rollout?

Confirm permissions, run a non-destructive dry run, and review rollback triggers.

What if install succeeds but actions do not run?

Verify SKILL.md location, restart runtime, and check environment/dependency readiness.

Recent changes

  • 2026-02-13: Added hot-skill page entry from Excel priority list.
  • 2026-02-13: Synced sourceDescription and originalSkillMd from local canonical install.
  • 2026-02-13: Added compatibility, fixes, and rollback guidance.

Rollback triggers

  • Compliance review flags unauthorized source downloads.
  • Runtime policies disallow required shell/network capabilities.
  • Repeated download failures from platform anti-bot changes.

Known issues

Platform anti-bot updates can break downloads

Keep yt-dlp updated and adjust command/cookies strategy.

Legal/compliance risk for copyrighted content

Require usage policy check before production automation.

Site references