dl
This skill downloads video/music from user-supplied URLs into local folders like ~/Movies and ~/Music. It explicitly instructs executing uv run --script ${baseDir}/dl.py "<url>", will send downloaded files via the message tool (Telegram), and reads env vars DL_VIDEO_DIR, VIDEO_DIR, DL_MUSIC_DIR, MUSIC_DIR.
Media Downloader
Smartly download media (Video/Music) from URLs (YouTube, Bilibili, X, etc.) to the appropriate local folders.
- Video: Saves
mp4to~/Movies/or~/Videos/. - Music: Saves
m4ato~/Music/. - Playlists: Saves items into a subdirectory (e.g.,
~/Music/<playlist_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:
-
Acknowledge:
- Immediately reply to the user: "Downloading with dl skill..."
-
Execute:
- Run the script:
uv run --script ${baseDir}/dl.py "<url>"
- Run the script:
-
Capture Path:
- Read the script output. Look for the line:
Saved to: <filepath>.
- Read the script output. Look for the line:
-
Upload (Telegram Only):
- If the user is on Telegram (check context or session) AND the file is audio (mp3/m4a):
- Use the
messagetool to send the file to the user:{ "action": "send", "filePath": "<filepath>", "caption": "Here is your music." }
Usage (Manual)
Run the python script directly:
uv run --script ${baseDir}/dl.py <url>
The script auto-detects Video vs Music and Single vs Playlist.
Setup (User)
To enable TV playback:
- Install a DLNA/UPnP Media Server (Universal Media Server, miniDLNA, Jellyfin).
- Share
~/Musicand~/Movies(or~/Videos) folders. - Downloaded media will appear automatically on your TV.