desktop-music-launcher

检索本机已安装音乐软件,启动它,并根据用户需求推荐、搜索或播放歌曲;在 macOS 上可用 AppleScript 控制 Spotify 和 Apple Music,并为 Spotify 增加可选的精确点播链路。

3,891 stars

Best use case

desktop-music-launcher is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

检索本机已安装音乐软件,启动它,并根据用户需求推荐、搜索或播放歌曲;在 macOS 上可用 AppleScript 控制 Spotify 和 Apple Music,并为 Spotify 增加可选的精确点播链路。

Teams using desktop-music-launcher should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/desktop-music-launcher/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/52yuanchangxing/desktop-music-launcher/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/desktop-music-launcher/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How desktop-music-launcher Compares

Feature / Agentdesktop-music-launcherStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

检索本机已安装音乐软件,启动它,并根据用户需求推荐、搜索或播放歌曲;在 macOS 上可用 AppleScript 控制 Spotify 和 Apple Music,并为 Spotify 增加可选的精确点播链路。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# desktop-music-launcher

## 何时使用

当用户想要:

- 检查电脑里装了哪些音乐软件或播放器
- 打开 Spotify / Apple Music / QQ 音乐 / 网易云音乐 / VLC / mpv 等
- 按歌名、歌手、专辑、情绪、场景搜索音乐
- 根据“适合学习 / 跑步 / 睡前 / 聚会 / 失恋”等需求推荐可立即搜索的音乐方向
- 在 macOS 上直接控制 Spotify / Apple Music 的播放、暂停、下一首、上一首、状态查询
- 在 macOS 上对 Spotify / Apple Music 执行“按需求尽力开始播放”的 UI 自动化

## 不做什么

- 不伪造“已经开始播放”的结果;必须以脚本返回结果为准
- 不调用未声明的私有 API、逆向接口或账号 Cookie
- 不越权扫描无关目录;只检查常见安装路径和 PATH 中的可执行文件
- 不自动登录任何音乐服务,也不读取用户账号密码
- 不下载盗版资源,不绕过版权或付费限制
- 不承诺所有客户端、所有版本、所有语言 UI 下都能 100% 精确点开第一首歌

## 运行方式

统一使用:

```bash
python3 scripts/music_skill.py <command> [args]
```

若系统只有 `python`,则改用:

```bash
python scripts/music_skill.py <command> [args]
```

## 命令总览

### 1) 扫描本机音乐软件

```bash
python3 scripts/music_skill.py scan
```

返回 JSON,包含当前系统、识别到的应用、是否安装、命中的路径/命令、支持的能力;在 macOS 上还会返回是否存在 `osascript`。

### 2) 打开软件

```bash
python3 scripts/music_skill.py open --app spotify
python3 scripts/music_skill.py open --app vlc
```

### 3) 搜索歌曲 / 歌手 / 专辑

```bash
python3 scripts/music_skill.py search "周杰伦 稻香"
python3 scripts/music_skill.py search "lofi beats" --app spotify --open
```

### 4) 播放

```bash
python3 scripts/music_skill.py play "Eason Chan 富士山下" --app spotify --control-mode macos-ui
python3 scripts/music_skill.py play "Taylor Swift Love Story" --app apple-music --control-mode macos-ui
python3 scripts/music_skill.py play --file "~/Music/demo.mp3" --app vlc --open
python3 scripts/music_skill.py play --url "https://example.com/demo.mp3" --app mpv --open
```

行为说明:

- `play <query>`:  
  - macOS + Spotify / Apple Music 时,默认优先尝试控制版的 UI 自动化  
  - 其他系统或不支持控制的客户端,则退化为 URI / 网页搜索
- `play --file`:把本地音频文件交给 VLC / mpv / foobar2000 / MusicBee 等播放器
- `play --url`:把网络音频 URL 交给支持 URL 播放的播放器

### 5) 控制播放器

```bash
python3 scripts/music_skill.py control --app spotify --action play
python3 scripts/music_skill.py control --app spotify --action pause
python3 scripts/music_skill.py control --app spotify --action next
python3 scripts/music_skill.py control --app spotify --action previous
python3 scripts/music_skill.py control --app spotify --action status

python3 scripts/music_skill.py control --app apple-music --action playpause
python3 scripts/music_skill.py control --app apple-music --action status
```

支持动作:

- `play`
- `pause`
- `playpause`
- `next`
- `previous`
- `status`

### 6) 推荐

```bash
python3 scripts/music_skill.py recommend "适合写代码的歌"
python3 scripts/music_skill.py recommend "跑步音乐" -k 5
```

## 推荐工作流

当用户说“帮我放点适合学习的歌”时,按下面顺序执行:

1. 先运行 `scan`
2. 选一个已安装且支持搜索/播放的应用;在 macOS 上优先 Spotify / Apple Music 控制版
3. 运行 `recommend "<用户需求>"`
4. 从结果里挑最合适的 `suggestions[0].query`
5. macOS 上优先运行 `play "<query>" --app spotify --control-mode macos-ui`
6. 如果控制失败,再退回 `search "<query>" --open`

## 结果解释

典型 JSON 字段:

- `app`: 选中的应用 ID
- `method`: `uri` / `web` / `play_file` / `play_url` / `macos_ui_automation`
- `target`: 即将打开的 URI、URL、文件路径或音频地址
- `open_result.ok`: 是否成功发起打开动作
- `supports`: 该软件支持的能力集合
- `best_effort`: 是否属于“尽力而为”的 UI 自动化
- `requires_permissions`: 控制版需要的系统权限

## 失败时怎么处理

- 没检测到音乐软件:建议用户先安装 Spotify、Apple Music、VLC 或 mpv
- macOS 控制失败:先检查“辅助功能”和“自动化”权限,再重试
- 目标软件不支持统一搜索入口:给出 query,让用户手动在应用里搜索
- 本地文件不存在:明确报错,不要猜测路径
- Linux 缺少 `xdg-open`:提示安装桌面打开器或改为手动复制 URL

## 权限说明

macOS 控制版依赖:

- `osascript`
- 运行该 Skill 的宿主应用已获 **辅助功能**
- 运行该 Skill 的宿主应用已获 **自动化**,允许控制 Spotify / Music

没有这些权限时,控制版会失败,但扫描、推荐、普通搜索仍可用。

## 安全边界

- 仅执行本地启动、打开 URI/URL、把用户明确提供的文件/URL交给播放器
- 在 macOS 上仅调用可审计的 AppleScript 控制公开桌面应用
- 不读取浏览器 Cookie、不抓包、不注入播放器进程
- 不使用 `curl | bash`、远程脚本直灌、Base64 混淆执行
- 所有外部入口都在脚本返回结果中可审计

Related Skills

desktop-monitor-widget

3891
from openclaw/skills

桌面监控悬浮球 - 实时显示系统资源状态

General Utilities

desktop-control

3891
from openclaw/skills

Advanced desktop automation with mouse, keyboard, and screen control. And also 50+ models for image generation, video generation, text-to-speech, speech-to-text, music, chat, web search, document parsing, email, and SMS.

ohyesai-music

3891
from openclaw/skills

Generate custom music tracks (vocal or instrumental) via OhYesAI asynchronously.

token-launcher

3891
from openclaw/skills

Launch tokens and keep 100% of your creator fees. Direct Mode provides full SDK integration guides for Clanker (7 EVM chains), Flaunch (Base), and Pump.fun (Solana) — no middleman, no platform cut. Easy Mode offers a convenience path via the Tator API (90/10 split). Includes strategy evaluation, fee economics, claiming, recipient updates, and tax/legal guidance. Triggers: "token idea", "launch a coin", "launch a token", "deploy a token", "token strategy", "claim fees", "creator fees", "update fee recipient", "token launch on base", "launch on solana", "clanker", "flaunch", "pump.fun", "token economics", "is this a good token".

🎵 Play Music Skill

3891
from openclaw/skills

**Controlled music player with pause/resume/stop support**

desktop-sandbox

3891
from openclaw/skills

A desktop sandbox lets OpenClaw run as natively as on a real OS, ensuring full functionality with safe isolation.Run OpenClaw without breaking your PC.

home-music

3891
from openclaw/skills

Control whole-house music scenes combining Spotify playback with Airfoil speaker routing. Quick presets for morning, party, chill modes.

Music Playlist Generation (PlaylistGen)

3891
from openclaw/skills

LLM-powered playlist generation for your local music library that contains music audio files such as mp3, flac, m4a, etc. Integrate this skill with your Agents (e.g., OpenClaw) to enable natural language music discovery and playlist curation through conversation. Point it at your music folder, run the indexer once, and get a natural language playlist generator — accessible via web browser or API.

asmr-music

3891
from openclaw/skills

Provide professional ASMR music recommendations and playback services to help users achieve sleep aid, heart rate regulation, and focus enhancement through scientifically designed audio. Use when user wants to (1) relax, sleep, or fall asleep, (2) regulate heart rate or relieve anxiety, (3) improve focus and concentration for study or work, (4) find background white noise or ambient sounds, (5) practice meditation or deep breathing, (6) set up automatic daily reminders for ASMR listening. Keywords: sleep, relax, meditation, heart rate, anxiety, focus, concentration, white noise, ASMR, background music, calming, stress relief, daily reminder, nightly routine.

desktop-agent-ops

3891
from openclaw/skills

Execute cross-platform desktop tasks through a packaged desktop automation skill that guides the main agent to observe the screen, focus apps and windows, call helper scripts for screenshots and input actions, verify each step, clean up task context, and only escalate to multi-agent collaboration when tasks become clearly multi-window or multi-app. Use when the user wants desktop GUI control, native app operation, window focus, screenshots, click and type flows, or cross-platform desktop workflows on macOS, Windows, or Linux.

gequhai-music

3891
from openclaw/skills

搜索和下载歌曲海(gequhai.com)的音乐,支持搜索歌曲、获取下载链接(优先无损/高品质), 并可一键下载到群晖NAS。当用户询问歌曲、搜索音乐、或想下载歌曲时使用此技能。

apple-music-dj

3891
from openclaw/skills

Ultimate personalization engine for Apple Music. Analyzes listening history, Apple Music Replay stats, library data, and taste patterns to create intelligent playlists directly in the user's Apple Music library via the MusicKit API. Supports deep cuts discovery, mood/activity playlists, trend scouting, constellation discovery ("surprise me"), playlist refresh/evolution, automated weekly curation via cron, taste DNA cards, compatibility scoring, listening insights, catalog gap analysis, album deep dives, artist rabbit holes, daily song drops, concert prep, and personalized new release radar. Use this skill whenever the user mentions Apple Music, playlists, music recommendations, listening habits, music taste, "what should I listen to", discovering new music, mood playlists, workout playlists, deep cuts, hidden gems, trending music, "surprise me", refreshing a playlist, or anything related to curating their music experience. Also trigger on: "DJ", "mix", "playlist for", "music for", "songs like", "similar to", "what's hot", "new releases for me", "taste DNA", "taste card", "compatibility", "how compatible", "year in review", "listening stats", "what have I missed", "album deep dive", "rabbit hole", "concert prep", "seeing [artist] live", "daily song", "what should I listen to right now", or OpenClaw in the context of music.