← Back to Skills Marketplace
guoqiao

Media Downloader

by guoqiao · GitHub ↗ · v0.2.3
darwinlinuxwin32 ✓ Security Clean
3022
Downloads
5
Stars
4
Active Installs
16
Versions
Install in OpenClaw
/install dl
Description
Download Video/Music from YouTube/Bilibili/X/etc.
README (SKILL.md)

Media Downloader

Smartly download media (Video/Music) from URLs (YouTube, Bilibili, X, etc.) to the appropriate local folders.

  • Video: Save into ~/Movies/ or ~/Videos/.
  • Music: Save into ~/Music/.
  • Playlists: Saves items into a subdirectory (e.g., ~/Music/\x3Cplaylist_name>/).

Designed to work with a local Media Server (e.g., Universal Media Server, Jellyfin) for instant playback on TV/devices.

Agent Procedure

When the user provides a URL or asks to download media, you MUST follow this exact sequence:

  1. Acknowledge:

    • Immediately reply to the user: "Downloading with dl skill..."
  2. Execute:

    • Run the script:
      uv run --script ${baseDir}/dl.py "\x3Curl>"
      
  3. Capture Path:

    • Read the script output, a path will be printed to stdout at the end, points to either a single file or a folder contains the playlist items.
  4. Upload (Telegram Only):

    • If the user is on Telegram (check context or session) AND the file is audio (mp3/m4a):
    • Use the message tool to send the file to the user:
      {
        "action": "send",
        "filePath": "\x3Cfilepath>",
        "caption": "Here is your music."
      }
      

Usage

Run dl.py as a uv script:

# save into default dirs ~/Music or ~/Movies or ~/Videos
uv run --script ${baseDir}/dl.py \x3Curl>

# specify your own output dir
uv run --script ${baseDir}/dl.py \x3Curl> -o \x3Cout_dir>

The script will print output path, either a file or a folder.

A optional cookies file could be provided to make yt-dlp more reliable, with which ever of these detected first:

  • ${baseDir}/.cookies.txt
  • $DL_COOKIES_FILE
  • $COOKIES_FILE
  • ~/.cookies.txt

Setup (User)

This skill will be much more useful if you setup a media server on same machine to share the downloaded media in your LAN:

  1. Install a DLNA/UPnP Media Server (Universal Media Server, miniDLNA, Jellyfin).
  2. Share ~/Music and ~/Movies (or ~/Videos) folders.
  3. Downloaded media will appear automatically on your TV, with apps support DLNA/UPnP, such as VLC.

See example script to setup Universal Media Server on Mac.

Usage Guidance
This skill appears to do what it says: run the included dl.py to download media via yt-dlp and save into your ~/Music or ~/Videos folders. Before installing, consider: (1) the agent will write files to your home folders and may create info-<id>.json files (especially in verbose mode); (2) if used from Telegram, the skill will upload audio files to the chat — expect that this transmits local files to an external service; (3) the script relies on yt-dlp, ffmpeg (for audio postprocessing), and Python packages — ensure those are installed from trusted sources; (4) copyright and legal risks: downloading some media may be illegal in your jurisdiction; (5) there is a minor code quirk around cookie-file detection (the script checks cookie paths as directories), so cookies may not be used as intended. If you want extra caution, run the script manually in a sandboxed environment first or review/modify dl.py yourself before enabling autonomous invocation.
Capability Analysis
Type: OpenClaw Skill Name: dl Version: 0.2.3 The skill is designed to download media from URLs using `yt-dlp`. While it involves network access, file system writes, and the agent sending downloaded files via Telegram, these actions are aligned with its stated purpose. Crucially, the `dl.py` script employs robust slugification (`python-slugify`) for all filenames and folder names derived from user input or media titles. This prevents path traversal and arbitrary file naming, effectively mitigating the risk of prompt injection leading to the exfiltration of sensitive system files (e.g., `~/.ssh/id_rsa`) via the agent's `message` tool, as the output path is strictly controlled and sanitized.
Capability Assessment
Purpose & Capability
Name/description match the included script and SKILL.md. The skill requires the 'uv' runner and uses yt-dlp to download media, which is expected for a media downloader. No unrelated services or credentials are requested.
Instruction Scope
Instructions explicitly tell the agent to run the bundled script, capture its stdout path, and (only for Telegram audio) send the file via the messaging tool. This is within scope, but the Telegram-upload step will transmit a local file to an external service — that is functional for this skill but a privacy/leakage consideration the user should expect.
Install Mechanism
No install spec; this is instruction-only with a bundled script. Nothing is downloaded from arbitrary URLs during install. The runtime depends on yt-dlp and Python packages declared in the script header, but those are normal for this functionality.
Credentials
The skill requests no environment variables or credentials. It will read common cookie file paths if provided and write files into ~/Music, ~/Movies/~/Videos (or custom out_dir). Saving files into user home folders and creating info-<id>.json (when verbose) are expected but are notable for privacy and disk usage; no unrelated secrets are requested.
Persistence & Privilege
always is false and the skill does not request persistent system-wide privileges or modify other skills. It executes a local script and writes media to user folders, which is consistent with purpose.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install dl
  3. After installation, invoke the skill by name or use /dl
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.2.3
- Updated agent procedure to clarify that the script output will print a path (file or folder) at the end, replacing previous instructions to look for "Saved to:". - Minor language fixes in documentation (e.g., "a optional cookie file" changed to "A optional cookies file", clarified output instructions). - No changes to code logic or features; documentation only.
v0.2.2
dl 0.2.2 - Media downloader can now use a cookie file for better reliability with yt-dlp, detecting several possible locations automatically. - Metadata flag "always" changed from true to false. - Usage instructions updated to describe cookie file support. - Minor text adjustments for clarity in documentation.
v0.2.1
- Updated usage instructions in SKILL.md to clarify that dl.py should be run as a uv script. - No changes to underlying functionality; documentation wording refined for clarity.
v0.2.0
- Added support for specifying a custom output directory with the -o option. - Updated usage instructions for running the script with custom output paths. - Minor documentation improvements in SKILL.md for clarity.
v0.1.2
- Updated dl.py. - No changes to user-facing instructions or procedures. - Maintained all previous features and usage guidance.
v0.1.1
- Improved setup instructions with tips for enabling media sharing on a LAN and TV playback via DLNA/UPnP apps like VLC. - Added a link to an example script for installing Universal Media Server on Mac. - Removed the version key from metadata.
v0.1.0
Initial public release. - Added skill to download video/music from platforms like YouTube, Bilibili, and X. - Outputs downloaded files to local Videos or Music folders, with playlist support. - Provides clear agent instructions for handling downloads, outputs, and Telegram upload integration. - Includes manual usage and setup guidance for media server playback. - Metadata, author, and homepage details included.
v0.0.9
- Improved agent instructions for consistency: agents must always acknowledge with "Downloading with dl skill..." before downloading. - Step-by-step agent flow detailed: script execution, output parsing, and Telegram upload clarified. - Simplified descriptions of video/music/playlist saving behavior. - Added explicit setup section for TV/media server playback. - Updated usage instructions for both agents and manual users.
v0.0.8
- Expanded and clarified the skill description and usage instructions. - Improved documentation on folder handling for downloaded video, music, and playlists. - Added guidance for optimal use with media servers for instant LAN access. - Included agent instructions for download acknowledgment and Telegram music file delivery. - Refined example commands for clarity.
v0.0.7
- Updated agent usage instructions to clarify support for YouTube, Bilibili, X, and similar URLs. - Reorganized and renamed the section for extra setup instructions for human users. - No functional or code changes; SKILL.md only.
v0.0.6
Version 0.0.6 - Updated skill description to emphasize smart downloading and direct playback via Media Server folders. - Added clearer agent instructions for when to use the skill. - Streamlined examples for typical video and music download scenarios. - Updated triggers to include `/dl <url>`. - Improved documentation for both general users and automation agents.
v0.0.5
- Added dl.py script to enable media downloading via a Python uv script. - SKILL.md updated with instructions for the new Python script, allowing automatic detection of media type and target location. - Existing shell command usage retained and clarified as alternative. - No breaking changes; previous functionality and usage remain available.
v0.0.4
- Added recommended DLNA/UPnP media server setup steps for sharing downloaded media over LAN. - Introduced example triggers for downloading video and music via natural language. - Updated usage examples to use uvx yt-dlp@latest for always-up-to-date downloads. - Clarified output locations and filename formatting in all usage instructions. - Added detailed tips to help avoid common issues with filenames, file sizes, and unintended downloads.
v0.0.3
- Removed the main implementation file dl.py. - No changes to documentation or usage instructions. - The skill no longer includes its original Python code.
v0.0.2
- Added initial implementation file: dl.py. - Expanded and clarified SKILL.md documentation with detailed usage instructions for downloading videos and music, including playlists. - Updated short description for clearer, more direct language.
v0.0.1
- Initial release of dl skill. - Media Downloader for smart and simple downloading. - Compatible with Darwin, Linux, and Windows. - Requires the 'uv' binary.
Metadata
Slug dl
Version 0.2.3
License
All-time Installs 5
Active Installs 4
Total Versions 16
Frequently Asked Questions

What is Media Downloader?

Download Video/Music from YouTube/Bilibili/X/etc. It is an AI Agent Skill for Claude Code / OpenClaw, with 3022 downloads so far.

How do I install Media Downloader?

Run "/install dl" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Media Downloader free?

Yes, Media Downloader is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Media Downloader support?

Media Downloader is cross-platform and runs anywhere OpenClaw / Claude Code is available (darwin, linux, win32).

Who created Media Downloader?

It is built and maintained by guoqiao (@guoqiao); the current version is v0.2.3.

💬 Comments