home / skills / aviz85 / claude-skills-library / youtube-downloader

This skill helps you download YouTube videos with quality presets for easy sharing and offline use.

npx playbooks add skill aviz85/claude-skills-library --skill youtube-downloader

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
2.6 KB
---
name: youtube-downloader
description: "Download YouTube videos with quality presets. Use for: download youtube, yt download, video download, youtube to whatsapp, youtube mp3."
version: "1.0.0"
author: aviz85
tags:
  - youtube
  - video
  - download
  - media
setup: "./SETUP.md"
setup_complete: false
---

# YouTube Video Downloader

> **First time?** If `setup_complete: false` above, run `./SETUP.md` first, then set `setup_complete: true`.

Download YouTube videos with quality control, optimized for sharing on WhatsApp and other platforms.

## Requirements

**This skill requires Python to be installed on your system.**

- Python 3.9+ (required)
- yt-dlp (`pip install yt-dlp`)
- ffmpeg (for audio extraction)

> **First time setup?** Read [SETUP.md](./SETUP.md) for detailed installation instructions for Windows, macOS, and Linux.

## Quick Start

```bash
cd ~/.claude/skills/youtube-downloader/scripts

# Download for WhatsApp (144p, small file)
python download.py "https://www.youtube.com/watch?v=VIDEO_ID" --quality whatsapp

# Download standard quality (480p)
python download.py "https://www.youtube.com/watch?v=VIDEO_ID" --quality standard

# Download high quality (720p)
python download.py "https://www.youtube.com/watch?v=VIDEO_ID" --quality high

# Download best quality available
python download.py "https://www.youtube.com/watch?v=VIDEO_ID" --quality best

# List available formats
python download.py "https://www.youtube.com/watch?v=VIDEO_ID" --list
```

## Quality Presets

| Preset | Resolution | Max Size | Use Case |
|--------|-----------|----------|----------|
| `whatsapp` | 144p | ~10MB | WhatsApp sharing (default) |
| `standard` | 480p | ~50MB | General use |
| `high` | 720p | ~100MB | Good quality |
| `best` | Best available | Varies | Maximum quality |

## Options

| Option | Description |
|--------|-------------|
| `--quality` / `-q` | Quality preset (whatsapp/standard/high/best) |
| `--output` / `-o` | Output directory (default: current dir) |
| `--list` / `-l` | List available formats without downloading |
| `--audio-only` / `-a` | Extract audio only (MP3) |

## Examples

```bash
# Download and send to WhatsApp
python download.py "https://youtube.com/watch?v=xxx" -q whatsapp
# Then use WhatsApp skill to send

# Download to specific folder
python download.py "https://youtube.com/watch?v=xxx" -o ~/Downloads

# Audio only (for podcasts/music)
python download.py "https://youtube.com/watch?v=xxx" --audio-only
```

## WhatsApp Size Limits

- **16MB**: Direct video sharing limit
- **2GB**: Document sharing limit (preserves quality)

For videos over 16MB, either:
1. Use lower quality preset
2. Send as document (not video)

Overview

This skill downloads YouTube videos with simple quality presets optimized for sharing and storage. It provides ready-made profiles (whatsapp, standard, high, best) to control resolution and file size. The tool also supports audio-only extraction and listing available formats before downloading.

How this skill works

The script calls yt-dlp and ffmpeg under the hood to fetch and optionally transcode video or audio. You select a quality preset or an explicit format; the tool chooses appropriate stream options and saves the resulting file to the chosen output folder. There is also a listing mode to show available formats without downloading.

When to use it

  • Share short videos to messaging apps where file size matters (use whatsapp preset).
  • Download episodes or clips for offline viewing with predictable size and quality.
  • Extract MP3 audio from music tracks or podcasts using audio-only mode.
  • Prepare files for platforms with upload limits by choosing lower presets.
  • Quickly inspect available formats before committing bandwidth with the list option.

Best practices

  • Install Python 3.9+, yt-dlp, and ffmpeg before running the scripts.
  • Use the whatsapp preset for sub-16MB targets to ensure direct messaging compatibility.
  • Choose the output directory explicitly to keep downloads organized.
  • Use --list to preview formats and file sizes if bandwidth or limits are a concern.
  • Respect copyright and only download content you are allowed to store or share.

Example use cases

  • Download a short clip at 144p for direct WhatsApp sharing using the whatsapp preset.
  • Save a lecture at 480p for offline study with the standard preset.
  • Fetch a concert video at 720p for personal viewing using the high preset.
  • Extract podcast audio as MP3 with the audio-only option for listening on the go.
  • List available formats for a long video to decide whether to send as document or lower quality.

FAQ

What prerequisites are required?

You need Python 3.9+, yt-dlp (pip install yt-dlp), and ffmpeg for audio extraction or format changes.

How do I keep files under messaging limits?

Use the whatsapp preset for small files or send the video as a document when larger files are needed.