← 返回 Skills 市场
ly14sh

lx-music-assistant

作者 ly14sh · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
28
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install lx-music-assistant
功能描述
通过 Scheme URL 和 HTTP API 控制洛雪音乐助手桌面版,支持搜索播放、播放控制、音量调节和收藏管理。
使用说明 (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 表格**
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install lx-music-assistant
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /lx-music-assistant 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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).
元数据
Slug lx-music-assistant
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

lx-music-assistant 是什么?

通过 Scheme URL 和 HTTP API 控制洛雪音乐助手桌面版,支持搜索播放、播放控制、音量调节和收藏管理。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 28 次。

如何安装 lx-music-assistant?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install lx-music-assistant」即可一键安装,无需额外配置。

lx-music-assistant 是免费的吗?

是的,lx-music-assistant 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

lx-music-assistant 支持哪些平台?

lx-music-assistant 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 lx-music-assistant?

由 ly14sh(@ly14sh)开发并维护,当前版本 v1.0.0。

💬 留言讨论