agentleFS
crazynomadcrazynomad/skills/youtube-downloader/SKILL.md

youtube-downloader

Skill27 starsChanged 8 months agoMITView on GitHub

Download videos from YouTube and 1000+ other sites using yt-dlp

  • Installs packages

33 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use agent-deep-links, helium-mcp and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ComposioHQSkill

    agent-deep-links

    Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

    Also in 3 projects that use this

  • ComposioHQSkill

    helium-mcp

    Search real-time news with bias scoring, get live stock/ETF/crypto data with AI analysis, ML options pricing, balanced news synthesis, and meme search via the Helium MCP server.

    Also in 3 projects that use this

  • trendinuxSkill

    twitter-algorithm-optimizer

    Analyze and optimize tweets for maximum reach using Twitter's open-source algorithm insights. Rewrite and edit user tweets to improve engagement and visibility based on how the recommendation system ranks content.

    Also in 12 projects that use this

  • petestewartSkill

    datadog-logs

    Query Datadog logs via the Logs Search API v2. Use when the user asks to "check the logs", "search logs", "find errors in Datadog", "look up logs for", "show me production logs", "check for errors", "search Datadog", or any request involving log search, error investigation, or production debugging that requires Datadog log data.

    Also in 3 projects that use this

  • MicrosoftSkill

    deploy-pipeline

    Triggers a Power Platform Pipeline deployment run for a Power Pages solution. Selects a target stage, validates the package, optionally configures deployment settings (environment variables, connection references), then deploys and polls for completion. Use when asked to: "deploy pipeline", "run pipeline", "trigger deployment", "deploy to staging", "deploy to production", "run power platform pipeline", "deploy solution via pipeline", "promote solution", "push to staging", "push to production".

    Also in 3 projects that use this

  • +7 more from ComposioHQ

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 31 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when users:

    line 16
  2. Distinctive:

    When user requests video download:

    line 149
  3. Distinctive:

    Only download content you have the right to access.

    line 277

“Common” is measured: kept by at least 6 in 10 of the 31 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

YouTube Video Downloader (yt-dlp)

Download videos from YouTube and 1000+ other sites using yt-dlp.

Description

A powerful video downloader skill based on yt-dlp that supports YouTube, Bilibili, Twitter/X, TikTok, and many other platforms. Features include format selection, audio extraction, subtitle download, playlist support, and metadata preservation.

When to Use

Use this skill when users:

  • Provide YouTube URLs and want to download videos
  • Mention "download video", "下载视频", "save video from YouTube"
  • Want to extract audio from videos (MP3)
  • Need to download playlists or channels
  • Want subtitles/captions from videos
  • Request video download from supported sites (Bilibili, Twitter, TikTok, etc.)

Features

  • Multi-Platform Support: YouTube, Bilibili, Twitter/X, TikTok, Vimeo, and 1000+ sites
  • Format Selection: Choose video quality (1080p, 720p, 4K) or audio-only
  • Audio Extraction: Extract audio as MP3, M4A, or other formats
  • Subtitle Download: Auto-download subtitles in multiple languages
  • Playlist Support: Download entire playlists or channels
  • Metadata Preservation: Save video info, thumbnails, and descriptions
  • Resume Support: Continue interrupted downloads
  • Progress Display: Real-time download progress

Usage

Basic Syntax

python scripts/download_video.py "VIDEO_URL" [OPTIONS]

Common Scenarios

Download single video (best quality):

python scripts/download_video.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

Download video in specific quality:

python scripts/download_video.py "https://www.youtube.com/watch?v=VIDEO_ID" -f 1080

Extract audio only (MP3):

python scripts/download_video.py "https://www.youtube.com/watch?v=VIDEO_ID" --audio-only

Download with subtitles:

python scripts/download_video.py "https://www.youtube.com/watch?v=VIDEO_ID" --subtitles

Download playlist:

python scripts/download_video.py "https://www.youtube.com/playlist?list=PLAYLIST_ID" --playlist

Download N videos from playlist:

python scripts/download_video.py "https://www.youtube.com/playlist?list=PLAYLIST_ID" --playlist -n 5

Specify output directory:

python scripts/download_video.py "URL" -o /path/to/output

Arguments

ArgumentDescriptionDefault
urlVideo/Playlist URL (required)-
-o, --outputOutput directoryCurrent directory
-f, --formatVideo quality: best, 1080, 720, 480, 360best
--audio-onlyExtract audio only (MP3)False
--subtitlesDownload subtitlesFalse
--sub-langSubtitle language(s)en,zh-Hans
--playlistEnable playlist downloadFalse
-n, --countNumber of videos from playlistAll
--metadataSave video metadata JSONTrue
--thumbnailDownload thumbnailFalse
--cookiesPath to cookies file (for age-restricted content)None

Dependencies

# Install yt-dlp
pip install yt-dlp --break-system-packages

# For audio extraction (optional)
# macOS
brew install ffmpeg

# Ubuntu/Debian
apt-get install ffmpeg

Output Structure

Single Video

OutputDir/
├── Video Title [VIDEO_ID].mp4     # Video file
├── Video Title [VIDEO_ID].json    # Metadata (if --metadata)
├── Video Title [VIDEO_ID].jpg     # Thumbnail (if --thumbnail)
└── Video Title [VIDEO_ID].en.vtt  # Subtitles (if --subtitles)

Playlist

OutputDir/
└── PlaylistName/
    ├── playlist_info.json
    ├── 001 - Video Title.mp4
    ├── 001 - Video Title.json
    ├── 002 - Another Video.mp4
    └── ...

Metadata Example

{
  "title": "Video Title",
  "uploader": "Channel Name",
  "upload_date": "2024-01-15",
  "duration": 300,
  "view_count": 1000000,
  "description": "Video description...",
  "tags": ["tag1", "tag2"],
  "video_file": "Video Title [VIDEO_ID].mp4"
}

Claude Integration

When user requests video download:

  1. Read skill documentation:
    view("/mnt/skills/user/youtube-downloader/SKILL.md")
  2. Install dependencies (if needed):
    pip install yt-dlp --break-system-packages
  3. Execute download:
    python /mnt/skills/user/youtube-downloader/scripts/download_video.py \
      "USER_URL" -o /mnt/user-data/outputs
  4. Present files to user:
    present_files(["/mnt/user-data/outputs/..."])

Supported Platforms

Major Platforms

  • YouTube: Videos, Shorts, Playlists, Channels, Live streams
  • Bilibili: Videos, Episodes (may need cookies)
  • Twitter/X: Video tweets
  • TikTok: Videos (may need cookies)
  • Vimeo: Videos
  • Twitch: VODs, Clips

Full List

yt-dlp supports 1000+ sites. Run yt-dlp --list-extractors for full list.

Common Issues

Q: Age-restricted videos? A: Use --cookies with exported browser cookies: --cookies cookies.txt

Q: Format not available? A: Some videos may not have all quality options. Script will auto-select best available.

Q: Download speed slow? A: This is usually server-side throttling. Consider using a VPN or waiting.

Q: Need to login for private videos? A: Export cookies from your browser after logging in, then use --cookies.

Q: Audio extraction fails? A: Install ffmpeg: brew install ffmpeg (macOS) or apt install ffmpeg (Linux)

Example Conversations

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

Claude:

# Install yt-dlp
pip install yt-dlp --break-system-packages

# Download video
python /mnt/skills/user/youtube-downloader/scripts/download_video.py \
  "https://www.youtube.com/watch?v=dQw4w9WgXcQ" \
  -o /mnt/user-data/outputs

# Present files
present_files([...])

User: "下载这个 YouTube 视频的音频,我只要 MP3"

Claude:

python /mnt/skills/user/youtube-downloader/scripts/download_video.py \
  "VIDEO_URL" \
  --audio-only \
  -o /mnt/user-data/outputs

User: "Download this playlist, but only the first 5 videos"

Claude:

python /mnt/skills/user/youtube-downloader/scripts/download_video.py \
  "PLAYLIST_URL" \
  --playlist -n 5 \
  -o /mnt/user-data/outputs

How It Works

Workflow

  1. URL Parsing: Detect platform and content type (video/playlist)
  2. Format Selection: Determine best available format based on user preference
  3. Download: Stream video/audio with progress display
  4. Post-Processing: Extract audio (if requested), embed subtitles
  5. Metadata: Save video information to JSON

Under the Hood

This skill wraps yt-dlp with sensible defaults:

  • Automatic format selection for best quality
  • Proper filename sanitization
  • Retry logic for failed downloads
  • Progress display with ETA

Limitations

  • Some sites may require authentication (cookies)
  • Age-restricted content needs browser cookies
  • Download speed depends on source server
  • Some DRM-protected content cannot be downloaded
  • Live streams can only be downloaded after they end (VOD)

Legal Notice

This tool is for personal use only. Please respect:

  • YouTube Terms of Service
  • Copyright laws in your jurisdiction
  • Content creators' rights

Only download content you have the right to access. Do not redistribute copyrighted material.

Version History

v1.0 (Current)

  • Initial release with yt-dlp wrapper
  • Support for video, audio, subtitles, playlists
  • Metadata and thumbnail preservation
  • Multi-platform support

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.