简介
通过自然语言控制YouTube Music播放、搜索和歌单管理,无需API密钥,依托浏览器自动化实现完整功能。
原始描述
Control YouTube Music with natural language. Play, pause, skip, search, manage playlists, and queue tracks. Full playback control via browser automation.
通过你的 Agent 添加
安装目录:youtube-music/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
YouTube Music Control Skill 是一款基于浏览器自动化的媒体控制工具,用户可通过自然语言指令完成YouTube Music的全流程操作。核心功能覆盖四大模块:播放控制(播放/暂停/跳过/音量调节)、搜索发现(歌曲/艺人搜索、热门推荐)、歌单管理(创建歌单、添加歌曲、查看收藏)以及队列管理(查看/添加/清空播放队列)。
技术实现上,该技能依托OpenClaw浏览器工具,通过CDP协议与YouTube Music网页版交互,采用动态选择器解析页面元素,而非硬编码DOM路径,具备一定容错能力。支持智能搜索(模糊匹配、艺人消歧)和上下文感知(记住上次播放、时段推荐)。
显著优点
- 零配置门槛:无需申请YouTube API密钥,直接复用用户已登录的浏览器会话
- 自然语言交互:支持口语化指令如"play Ye Tune Kya Kiya"、"queue some chill Bollywood songs"
- 完整功能覆盖:弥补官方API缺失的播放控制、队列管理等核心能力
- 错误自恢复:浏览器未运行时自动启动,网络异常时带退避重试
- 多设备潜力:架构预留多房间同步、设备投放扩展能力
潜在缺点与局限性
- 浏览器依赖:必须保持浏览器运行,增加系统资源占用
- Premium功能受限:无广告播放、后台播放等需YouTube Premium订阅
- 区域差异:歌词功能、部分曲库因地区授权存在差异
- 会话级队列:队列状态不跨会话持久化,重启后丢失
- 稳定性风险:依赖YouTube前端DOM结构,页面改版可能导致选择器失效
适合人群
- 日常通过YouTube Music听歌,希望免API快速接入语音/文本控制的终端用户
- 需快速构建音乐控制Demo的开发者或智能家居爱好者
- 已使用OpenClaw生态、追求工具链一致性的技术用户
常规风险
- 账号安全:使用浏览器自动化即共享用户登录态,存在Cookie泄露风险
- 服务条款:可能违反YouTube Terms of Service第4.C条关于自动化的限制
- 稳定性波动:非官方API方案,功能可用性取决于YouTube前端变更频率
- 隐私暴露:播放历史、歌单内容等数据经本地浏览器中转,无额外加密传输层
- 浏览器依赖:必须保持浏览器运行,增加系统资源占用
- Premium功能受限:无广告播放、后台播放等需YouTube Premium订阅
- 区域差异:歌词功能、部分曲库因地区授权存在差异
- 会话级队列:队列状态不跨会话持久化,重启后丢失
- 稳定性风险:依赖YouTube前端DOM结构,页面改版可能导致选择器失效
适合人群
- 日常通过YouTube Music听歌,希望免API快速接入语音/文本控制的终端用户
- 需快速构建音乐控制Demo的开发者或智能家居爱好者
- 已使用OpenClaw生态、追求工具链一致性的技术用户
常规风险
- 账号安全:使用浏览器自动化即共享用户登录态,存在Cookie泄露风险
- 服务条款:可能违反YouTube Terms of Service第4.C条关于自动化的限制
- 稳定性波动:非官方API方案,功能可用性取决于YouTube前端变更频率
- 隐私暴露:播放历史、歌单内容等数据经本地浏览器中转,无额外加密传输层
- 账号安全:使用浏览器自动化即共享用户登录态,存在Cookie泄露风险
- 服务条款:可能违反YouTube Terms of Service第4.C条关于自动化的限制
- 稳定性波动:非官方API方案,功能可用性取决于YouTube前端变更频率
- 隐私暴露:播放历史、歌单内容等数据经本地浏览器中转,无额外加密传输层
技能正文
name: youtube-music
version: 1.0.0
description: "Control YouTube Music with natural language. Play, pause, skip, search, manage playlists, and queue tracks. Full playback control via browser automation."
homepage: "https://github.com/paragshah/openclaw-youtube-music"
metadata:
{"clawdbot":{"emoji":"🎵","category":"media","requires":{"bins":["node"],"env":["YOUTUBE_MUSIC_BROWSER_PROFILE"]}}}
YouTube Music Control Skill 🎵
Control YouTube Music with natural language commands. Uses browser automation for full playback control.
Quick Start
# No setup needed - uses OpenClaw browser
# Optional: Set default profile in TOOLS.md
Commands
Playback Control
- Play: "play [song name]" / "play [artist]" / "play [playlist]"
- Pause: "pause" / "stop"
- Resume: "resume" / "continue"
- Skip: "skip" / "next"
- Previous: "previous" / "back"
- Volume: "volume 50%" / "set volume to 80"
- Mute: "mute" / "unmute"
Search & Discovery
# No setup needed - uses OpenClaw browser
# Optional: Set default profile in TOOLS.md
Playback Control
- Search: "search for [query]" / "find [artist]"
- Trending: "what's trending" / "trending now"
- Recommendations: "recommend similar" / "more like this"
Library & Playlists
- Playlists: "show my playlists" / "create playlist [name]"
- Add to Playlist: "add this to [playlist]"
- Liked Songs: "show liked songs" / "like this"
Queue Management
- Queue: "show queue" / "what's next"
- Add to Queue: "queue [song]"
- Clear Queue: "clear queue"
Information
- Now Playing: "what's playing" / "current track"
- Lyrics: "show lyrics" / "lyrics"
- Artist Info: "about [artist]"
Usage Examples
"play Ye Tune Kya Kiya by Javed Bashir"
"pause the music"
"skip to next track"
"set volume to 75%"
"search for Arijit Singh hits"
"add this to my workout playlist"
"what's playing now?"
"show me the lyrics"
"queue some chill Bollywood songs"
Implementation Notes
Browser Automation
- Queue: "show queue" / "what's next"
- Add to Queue: "queue [song]"
- Clear Queue: "clear queue"
Information
- Now Playing: "what's playing" / "current track"
- Lyrics: "show lyrics" / "lyrics"
- Artist Info: "about [artist]"
Usage Examples
"play Ye Tune Kya Kiya by Javed Bashir"
"pause the music"
"skip to next track"
"set volume to 75%"
"search for Arijit Singh hits"
"add this to my workout playlist"
"what's playing now?"
"show me the lyrics"
"queue some chill Bollywood songs"
Implementation Notes
Browser Automation
"play Ye Tune Kya Kiya by Javed Bashir"
"pause the music"
"skip to next track"
"set volume to 75%"
"search for Arijit Singh hits"
"add this to my workout playlist"
"what's playing now?"
"show me the lyrics"
"queue some chill Bollywood songs"
Implementation Notes
Browser Automation
Uses OpenClaw's browser tool with YouTube Music:
- Profile:
openclaw(isolated browser) - Base URL:
https://music.youtube.com - CDP Port: 18800
Key Selectors (Dynamic)
Selectors are resolved via snapshot refs, not hardcoded:
- Player controls: pause, play, skip, previous
- Search box: combobox with placeholder
- Volume slider: range input
- Queue: up next panel
- Lyrics: lyrics tab
Error Handling
- Browser not running → Auto-start
- Video unavailable → Suggest alternatives
- Network issues → Retry with backoff
- No search results → Show spelling suggestions
Advanced Features
Smart Search
- Fuzzy matching for song names
- Artist/album disambiguation
- Auto-play top result if exact match
Context Awareness
- Remembers last played track
- Tracks listening history
- Suggests based on time of day
Multi-Room Support
- Cast to different devices
- Sync playback across tabs
- Group control (future)
Configuration
Smart Search
- Remembers last played track
- Tracks listening history
- Suggests based on time of day
Multi-Room Support
- Cast to different devices
- Sync playback across tabs
- Group control (future)
Configuration
Add to TOOLS.md:
### YouTube Music
- Default profile: openclaw
- Preferred quality: high
- Auto-play: on
- Shuffle default: off
Dependencies
- OpenClaw browser tool
- YouTube Music (music.youtube.com)
- No API keys required
Limitations
- Requires browser to be running
- Some features need YouTube Premium
- Lyrics availability varies by region
- Queue management limited to current session
Future Enhancements
- YouTube Music API integration (if available)
- Offline mode with cached tracks
- Cross-platform sync
- Voice control integration
- Smart playlists based on mood/activity
Examples
Play a Song
User: "play Tuna Kay Keya"
Assistant: "Found 'Ye Tune Kya Kiya' by Javed Bashir. Playing now! 🎵"
Control Playback
User: "pause"
Assistant: "Paused. Press play to resume. ⏸️"
User: "skip"
Assistant: "Skipping to next track. ⏭️"
Search & Discover
User: "find similar to this"
Assistant: "Based on 'Ye Tune Kya Kiya', you might like:
- 'Kaise Hua' by Vishal Mishra
- 'Aankhon Se Batana' by Dikshant
- 'Kali Kali Zulfon Ke' by Madhur Sharma"
Playlist Management
- Requires browser to be running
- Some features need YouTube Premium
- Lyrics availability varies by region
- Queue management limited to current session
Future Enhancements
- YouTube Music API integration (if available)
- Offline mode with cached tracks
- Cross-platform sync
- Voice control integration
- Smart playlists based on mood/activity
Examples
Play a Song
User: "play Tuna Kay Keya"
Assistant: "Found 'Ye Tune Kya Kiya' by Javed Bashir. Playing now! 🎵"
Control Playback
Play a Song
User: "play Tuna Kay Keya"
Assistant: "Found 'Ye Tune Kya Kiya' by Javed Bashir. Playing now! 🎵"
User: "pause"
Assistant: "Paused. Press play to resume. ⏸️"
User: "skip"
Assistant: "Skipping to next track. ⏭️"
Search & Discover
User: "find similar to this"
Assistant: "Based on 'Ye Tune Kya Kiya', you might like:
- 'Kaise Hua' by Vishal Mishra
- 'Aankhon Se Batana' by Dikshant
- 'Kali Kali Zulfon Ke' by Madhur Sharma"
User: "add this to my Bollywood Classics"
Assistant: "Added 'Ye Tune Kya Kiya' to 'Bollywood Classics' playlist. ✓"
Testing
Test the skill with:
# Test search
"search for Pritam songs"
# Test playback
"play a sample track"
"pause"
"skip"
# Test volume
"set volume to 50%"
"mute"
"unmute"
Skill Author: Your AI Assistant
License: MIT
Status: Ready for production 🚀
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。