Lx Music Skill
Description
LX Music desktop player control skill for AI assistants (OpenCode/Claude). Control playback, query playlists, search and play songs via HTTP API and Scheme URL.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
LX Music OpenCode Skill
LX Music 桌面版播放器控制技能,用于 OpenCode / Claude AI 助手。
通过本地 HTTP API + SQLite 歌单数据库实现播放控制、搜索播放、歌单查询。**所有 API 已内嵌,无需查阅在线文档。**
安装
git clone https://github.com/ET06731/lx-music-skill.git
cp -r lx-music-skill ~/.openclaw/workspace/skills/lx-music
前置条件
1. 安装 LX Music 桌面版
下载并安装 [落雪音乐 LX-Music Desktop](https://github.com/lyswhut/lx-music-desktop):
- Windows: 下载
.exe或.msi安装包 - macOS: 下载
.dmg安装包 - Linux: 下载
.AppImage或.deb包
2. 开启开放 API
- 打开 LX Music 软件
- 进入 设置 → 开放 API
- 勾选 启用开放 API 服务
- 记下端口号(默认
23330)
3. 其他依赖
- Python 3(用于歌单查询脚本)
快速使用
播放控制
| 操作 | 命令 |
|---|---|
| 播放 / 暂停 | curl $LX_API_URL/play / curl $LX_API_URL/pause |
| 上一曲 / 下一曲 | curl $LX_API_URL/skip-prev / curl $LX_API_URL/skip-next |
| 跳转进度 | curl $LX_API_URL/seek?offset=30 |
| 音量调节 | curl $LX_API_URL/volume?volume=80 |
| 静音 | curl $LX_API_URL/mute?mute=true |
| 收藏 | curl $LX_API_URL/collect |
查询
| 操作 | 命令 |
|---|---|
| 播放状态 | curl $LX_API_URL/status |
| 当前歌词 | curl $LX_API_URL/lyric |
| 所有歌词 | curl $LX_API_URL/lyric-all |
搜索播放
# 搜索并播放(格式:歌曲名-歌手)
powershell -Command "Start-Process 'lxmusic://music/searchPlay/晴天-周杰伦'"
歌单查询与播放
# 列出所有歌单
python scripts/playlist.py
# 查看歌单中的歌曲
python scripts/playlist.py songs
# 播放歌单
python scripts/playlist.py play
歌单 ID 可通过列表命令获取。
完整 API
| 端点 | 说明 |
|---|---|
GET /status |
获取播放器状态 |
GET /lyric |
获取 LRC 歌词 |
GET /lyric-all |
获取所有歌词 |
GET /subscribe-player-status |
SSE 实时状态订阅 |
GET /play |
播放 |
GET /pause |
暂停 |
GET /skip-next |
下一曲 |
GET /skip-prev |
上一曲 |
GET /seek?offset=N |
跳转进度(秒) |
GET /volume?volume=N |
音量 1-100 |
GET /mute?mute=true/false |
静音控制 |
GET /collect |
收藏 |
GET /uncollect |
取消收藏 |
技术细节
- 协议: HTTP GET
- 默认端口:
23330 - 工具:
curl(Bash),Start-Process(PowerShell),python - 跨平台: Wind
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI mem0
| Universal memory layer for AI Agents | 51341 | 221 | 1 |
AI