agentleFS
imsovikdeimsovikde/souvik-skills/skills/universal-video-downloader/SKILL.md

universal-video-downloader

Skill1 starsChanged 5 months agoMITView on GitHub

Universal multi-quality video and media stream downloader supporting YouTube, Vimeo, Twitch, and direct public HLS/DASH/HTML5 streams with REA-style evidence probing, multi-resolution selection (4K/2160p, 1440p, 1080p, 720p, audio-only MP3), lossless stream merging, archive resume tracking, and conditional 18+ verification for adult content. Use when asked to probe, inspect, analyze, or download any publicly accessible video, playlist, or media stream across any website or direct URL.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If a video is age-restricted (age_limit >= 18), provide adult confirmation directly in the prompt or command:

    line 57

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “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

Universal Video Downloader

A production-grade, multi-script skill combining the multi-platform capabilities of yt-dlp with the evidence-first reverse-engineering methodology of REA (Reverse Engineer Anything).

Supports YouTube, Vimeo, Twitch, SoundCloud, and any public domain hosting direct HTML5, HLS (.m3u8), or MPEG-DASH (.mpd) video streams.


Architecture & Workflow Pipeline

Downloads follow a deterministic three-stage pipeline governed by a conditional compliance gate:

[Public Video URL]
        │
        ▼
Stage 1: Conditional 18+ Compliance Check (`scripts/verify_compliance.py`)
        │
        ├──> [General Audience Media (age_limit < 18)] ──> AUTO-PASS (Immediate Access)
        └──> [Explicit / Age-Gated Media (age_limit >= 18)] ──> Enforces 18+ Adult Confirmation
        ▼
Stage 2: REA Evidence Probing (`scripts/probe_stream.py`)
        │   - Queries yt-dlp format matrices (4K, 1440p, 1080p, AV1, VP9, Opus)
        │   - Probes public HTML5 <video>, HLS (.m3u8), and DASH (.mpd) manifests
        │   - Computes manifest SHA-256 hashes and HTTP status codes
        ▼
Stage 3: Multi-Quality Download & Verification (`scripts/download_video.py`)
        │   - Multi-fragment stream acceleration (4 workers)
        │   - Lossless audio/video multiplexing via FFmpeg
        │   - Resumable archive tracking (.download_archive.txt)
        │   - Computes output SHA-256 checksum and verifies streams
        ▼
[Verified Production Media in Downloads]

Quick Start (Step-by-Step)

Standard (General Audience) Videos

For normal public videos (YouTube, Dailymotion, Vimeo, etc.), no 18+ prompt or confirmation is required. You can probe and download directly:

# 1. Inspect streams and available resolutions (REA probe)
python scripts/probe_stream.py --url "https://www.youtube.com/watch?v=VIDEO_ID"

# 2. Download in full high quality (1080p / 4K MP4)
python scripts/download_video.py "https://www.youtube.com/watch?v=VIDEO_ID" -q best -f mp4 -o "./downloads"

Age-Restricted (18+ / Adult) Videos

If a video is age-restricted (age_limit >= 18), provide adult confirmation directly in the prompt or command:

# Direct confirmation flag:
python scripts/download_video.py "https://example.com/video" --confirm-adult-18plus -q best -o "./downloads"

# Or generate a reusable signed attestation token:
python scripts/verify_compliance.py --url "https://example.com/video" --confirm-adult-18plus --signature "Your Name"

Detailed Options & Capabilities

Quality Settings (-q / --quality)

  • best (default): Highest resolution available on the platform (4K, 1440p, or 1080p60).
  • 2160p: 4K Ultra HD (3840 x 2160).
  • 1440p: Quad HD / 2K (2560 x 1440).
  • 1080p: Full HD (1920 x 1080).
  • 720p: Standard HD (1280 x 720).
  • 480p, 360p, worst.

Container Formats (-f / --format)

  • mp4 (default): Universal compatibility (AV1/H.264 + AAC/Opus).
  • mkv: Matroska container for complex subtitle streams and multiple audio tracks.
  • webm: Royalty-free web container (VP9/AV1 + Opus).

Audio Extraction (-a / --audio-only)

Extracts the highest-bitrate audio track and encodes it into standalone MP3:

python scripts/download_video.py "URL" -a -o "./downloads"

Subtitles & Captions (-s / --subtitles)

Downloads and embeds all public and auto-generated subtitles into the video container:

python scripts/download_video.py "URL" -s -o "./downloads"

Playlist Downloading (--playlist)

By default, the downloader safely processes single videos. To download an entire playlist:

python scripts/download_video.py "PLAYLIST_URL" --playlist -o "./downloads/Playlist_Name"

Maintains .download_archive.txt so interrupted or recurring downloads skip previously downloaded videos in seconds.


Reference Guides

For deep technical specifications, consult the companion guides:

  • Evidence Probing & REA Workflow
  • Quality Matrices & Codec Selection
  • Compliance Gate & Conditional 18+ Protocol

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.