← 返回
未分类 中文

yt-dlp

AI skill to analyze song requests, verify local workspace files, and download missing tracks directly from YouTube bypassing API limits.
分析歌曲请求、验证本地工作区文件,并绕过API限制直接从YouTube下载缺失曲目的AI技能。
nhathuynguyen19 nhathuynguyen19 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 511
下载
💾 41
安装
1
版本
#latest

概述

yt-dlp (OpenClaw Music Fetcher)

Workflow: Analyze prompt -> Identify specific track -> Check ~/.openclaw/workspace/music/ folder -> Download if missing -> Pass to cmus.

Find the active workspace music folder

The agent must always operate within the specific OpenClaw workspace directory to ensure portability.

  • Path: ~/.openclaw/workspace/music/ (Resolved as an absolute path from the user's home directory).
  • Never download files to the root, current working directory, or system folders.

Track Identification & Verification Logic

When the user requests a song (via lyrics, artist, composer, or title):

  1. Analyze: Determine the exact track name and artist.
  2. Check Local: Search the workspace music folder: find ~/.openclaw/workspace/music/ -type f -iname ""
  3. Branching:
    • If the file EXISTS: Skip download. Pass the absolute file path to the cmus skill.
    • If the file is MISSING: Proceed to the download step using yt-dlp.

yt-dlp quick start

Ensure the directory exists, navigate to it, and download the missing track. The ytsearch1: prefix is used to grab the best match from YouTube Music/YouTube automatically:

  • mkdir -p ~/.openclaw/workspace/music/ && cd ~/.openclaw/workspace/music/ && yt-dlp -x --audio-format mp3 -o "%(title)s.%(ext)s" "ytsearch1: "

Notes

  • Post-Download Action: Always wait for the download to finish, then run find again to capture the final filename (as yt-dlp sanitizes titles) before passing it to cmus.
  • Generalization: Use ~ or $HOME instead of hardcoded paths like /home/huy/ to ensure the skill works for all users.
  • Dependency: yt-dlp requires ffmpeg to extract and convert audio streams into .mp3 format.
  • Prefer highly specific search queries (Track + Artist) to ensure the agent picks the correct version of a song.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 17:23 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 679 📥 328,306
dev-programming

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 41,719
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 72 📥 182,119