← Back to Skills Marketplace
ly14sh

lx-music-assistant

by ly14sh · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
28
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install lx-music-assistant
Description
通过 Scheme URL 和 HTTP API 控制洛雪音乐助手桌面版,支持搜索播放、播放控制、音量调节和收藏管理。
README (SKILL.md)

---\r name: lx-music-assistant\r description: |\r 控制洛雪音乐助手桌面版播放音乐。\r 支持:搜索歌曲并唤醒程序、播放/暂停/切换、调节音量、查看播放状态和歌词、收藏歌曲。\r 使用 Scheme URL 控制操作,HTTP API 查询状态。\r 每次执行命令后自动查询状态并用 Markdown 表格汇报结果。\r ---\r \r

洛雪音乐助手技能\r

\r 通过内嵌 CLI 工具控制洛雪音乐助手桌面版。搜索&搜索并播放功能可唤醒程序。\r \r

前置条件\r

\r

  1. 已安装洛雪音乐助手桌面版\r
  2. 已开启 OpenAPI 服务:设置 → 开放 API → 启用开放 API 服务(端口 23330)\r \r

内嵌 CLI 路径\r

\r

{skill_dir}/cli/lx-music-cli.js\r
```\r
\r
## 配置\r
\r
API 地址和端口配置在 `{skill_dir}/config.md`。\r
\r
## 标准执行流程\r
\r
**每个命令执行后必须执行此流程:**\r
\r
```javascript\r
// 1. 执行命令\r
await execCommand(cmd);\r
\r
// 2. 等待 500ms\r
await sleep(500);\r
\r
// 3. 查询状态\r
const status = await execCommand('status');\r
\r
// 4. 用 Markdown 汇报结果\r
if (status.name) {\r
  "✅ 操作成功\
\
| 项目 | 值 |\
|------|-----|\
| 歌曲 | " + status.name + " |\
| 歌手 | " + status.singer + " |\
| 进度 | " + formatDuration(status.progress) + " / " + formatDuration(status.duration) + " |\
| 音量 | " + Math.round(status.volume * 100) + "% |"\r
} else {\r
  "⚠️ 操作已执行,但 API 未启动\
\
请确认:\
1. LX Music 已启动\
2. 设置 → 基础设置 → 启用 OpenAPI 服务"\r
}\r
```\r
\r
## 常用命令\r
\r
### 搜索并播放(优先使用)\r
\r
```bash\r
# 直接搜索并播放歌曲(唤醒程序)\r
node {skill_dir}/cli/lx-music-cli.js searchPlay \x3C歌名>\r
\r
\r
# 打开搜索页面(唤醒程序)\r
node {skill_dir}/cli/lx-music-cli.js search \x3C关键词>\r
```\r
\r
### 播放控制\r
\r
```bash\r
node {skill_dir}/cli/lx-music-cli.js play      # 播放\r
node {skill_dir}/cli/lx-music-cli.js pause     # 暂停\r
node {skill_dir}/cli/lx-music-cli.js toggle    # 切换播放/暂停\r
node {skill_dir}/cli/lx-music-cli.js next      # 下一首\r
node {skill_dir}/cli/lx-music-cli.js prev      # 上一首\r
```\r
\r
### 状态查询\r
\r
```bash\r
node {skill_dir}/cli/lx-music-cli.js status    # 完整状态\r
node {skill_dir}/cli/lx-music-cli.js now       # 当前歌曲\r
node {skill_dir}/cli/lx-music-cli.js lyric     # 歌词\r
```\r
\r
### 音量控制\r
\r
```bash\r
node {skill_dir}/cli/lx-music-cli.js volume \x3C0-100>  # 设置音量\r
node {skill_dir}/cli/lx-music-cli.js mute            # 静音\r
node {skill_dir}/cli/lx-music-cli.js unmute          # 取消静音\r
```\r
\r
### 收藏\r
\r
```bash\r
node {skill_dir}/cli/lx-music-cli.js collect     # 收藏\r
node {skill_dir}/cli/lx-music-cli.js uncollect   # 取消收藏\r
node {skill_dir}/cli/lx-music-cli.js dislike     # 不喜欢\r
```\r
\r
## 完整命令列表\r
\r
| 命令 | 说明 | 示例 |\r
|------|------|------|\r
| `search \x3C关键词> [源]` | 打开搜索页面 | `search 周杰伦` / `search 周杰伦 kw` |\r
| `searchPlay \x3C歌名> [歌手]` | 播放已缓存歌曲 | `searchPlay 晴天` / `searchPlay 晴天 周杰伦` |\r
| `play` | 播放 | `play` |\r
| `pause` | 暂停 | `pause` |\r
| `toggle` | 切换播放/暂停 | `toggle` |\r
| `next` | 下一首 | `next` |\r
| `prev` | 上一首 | `prev` |\r
| `status` | 显示播放状态 | `status` |\r
| `now` | 显示当前歌曲 | `now` |\r
| `lyric` | 显示歌词 | `lyric` |\r
| `volume \x3C0-100>` | 设置音量 | `volume 80` |\r
| `mute` | 静音 | `mute` |\r
| `unmute` | 取消静音 | `unmute` |\r
| `collect` | 收藏 | `collect` |\r
| `uncollect` | 取消收藏 | `uncollect` |\r
| `dislike` | 不喜欢 | `dislike` |\r
\r
**参数说明:**\r
- `\x3C关键词>`: 搜索关键词(必填)\r
- `[源]`: 音乐平台代码,可选。常见:`kw`(酷我), `kg`(酷狗), `tx`(腾讯), `wy`(网易), `mg`(咪咕)\r
- `\x3C歌名>`: 歌曲名称(必填)\r
- `[歌手]`: 歌手名,可选。传入时格式为 `歌名-歌手`\r
- `\x3C源>`: 歌单来源平台(必填)\r
- `\x3CID>`: 歌单ID或URL(必填)\r
\r
## 对话示例\r
\r
### 播放歌曲\r
```\r
用户:播放青花瓷\r
→ 执行: node {skill_dir}/cli/lx-music-cli.js searchPlay 青花瓷\r
→ 等待 500ms\r
→ 执行: node {skill_dir}/cli/lx-music-cli.js status\r
→ 汇报结果\r
```\r
\r
### 搜索歌曲\r
```\r
用户:搜索周杰伦的歌\r
→ 执行: node {skill_dir}/cli/lx-music-cli.js search 周杰伦\r
→ 等待 500ms\r
→ 执行: node {skill_dir}/cli/lx-music-cli.js status\r
→ 汇报结果\r
```\r
\r
### 播放控制\r
```\r
用户:播放\r
→ 执行: node {skill_dir}/cli/lx-music-cli.js play\r
→ 等待 500ms\r
→ 执行: node {skill_dir}/cli/lx-music-cli.js status\r
→ 汇报结果\r
```\r
\r
## 重要提示\r
\r
1. **每个命令执行后必须查询状态并汇报**\r
2. **等待 500ms 后再查询** - 确保 LX Music 有时间响应\r
3. **如果 status 查询无有效反馈** - 提示用户 "API 未启动,请打开 API 功能(设置 → 开放 API → 启用开放 API 服务)"\r
4. **汇报格式必须使用 Markdown 表格**
Usage Guidance
Review carefully before installing. The skill does what it claims for LX Music, but the CLI should be patched to avoid shell command injection. Until then, only use it with trusted prompts and normal source values, and be aware it can change playback, volume, and song favorites.
Capability Analysis
Type: OpenClaw Skill Name: lx-music-assistant Version: 1.0.0 The skill contains a command injection vulnerability in 'cli/lx-music-cli.js' due to unsanitized command-line arguments (such as 'searchSource', 'slSource', and 'slpSource') being directly interpolated into shell commands via 'execSync' in the 'openSchemeUrl' function. While the skill's functionality aligns with its stated purpose of controlling the LX Music Assistant, the lack of input validation on these parameters allows for arbitrary code execution on the host system if an attacker can influence the arguments passed to the CLI.
Capability Assessment
Purpose & Capability
The stated purpose is coherent: it controls LX Music playback, search, status, volume, lyrics, and favorites through scheme URLs and a localhost API. Users should notice that favorites/dislikes and playback state can be changed.
Instruction Scope
The skill instructs the agent to run the bundled CLI for music commands and then query/report status. There is no visible prompt override or hidden autonomous behavior, but user-supplied command parameters need safer handling.
Install Mechanism
There is no install spec and the runnable JavaScript CLI is bundled in the artifact. Metadata does not provide a source repository or homepage, so provenance is limited even though the code is reviewable here.
Credentials
The CLI uses child_process shell execution to open lxmusic:// URLs, and some URL path components such as source values are interpolated without validation or encoding. That creates a command-injection risk beyond what is necessary for music control.
Persistence & Privilege
The artifacts show no credentials, environment secrets, background workers, persistence, or long-running autonomous process. The API host in code is hardcoded to 127.0.0.1.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install lx-music-assistant
  3. After installation, invoke the skill by name or use /lx-music-assistant
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of lx-music-assistant skill. - Control LX Music Desktop via embedded CLI tool and Scheme URL. - Supports searching, playback control (play/pause/next/prev), volume adjustment, status/lyrics querying, and song collection. - Each command execution is followed by an automatic status query and Markdown table report. - Requires LX Music Desktop with OpenAPI enabled (port 23330).
Metadata
Slug lx-music-assistant
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is lx-music-assistant?

通过 Scheme URL 和 HTTP API 控制洛雪音乐助手桌面版,支持搜索播放、播放控制、音量调节和收藏管理。 It is an AI Agent Skill for Claude Code / OpenClaw, with 28 downloads so far.

How do I install lx-music-assistant?

Run "/install lx-music-assistant" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is lx-music-assistant free?

Yes, lx-music-assistant is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does lx-music-assistant support?

lx-music-assistant is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created lx-music-assistant?

It is built and maintained by ly14sh (@ly14sh); the current version is v1.0.0.

💬 Comments