Workflow: Analyze prompt -> Identify specific track -> Check ~/.openclaw/workspace/music/ folder -> Download if missing -> Pass to cmus.
The agent must always operate within the specific OpenClaw workspace directory to ensure portability.
~/.openclaw/workspace/music/ (Resolved as an absolute path from the user's home directory).When the user requests a song (via lyrics, artist, composer, or title):
find ~/.openclaw/workspace/music/ -type f -iname " "cmus skill.yt-dlp.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: " find again to capture the final filename (as yt-dlp sanitizes titles) before passing it to cmus.~ or $HOME instead of hardcoded paths like /home/huy/ to ensure the skill works for all users.yt-dlp requires ffmpeg to extract and convert audio streams into .mp3 format.共 1 个版本