lx-music-assistant

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

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "lx-music-assistant" with this command: npx skills add ly14sh/lx-music-assistant

洛雪音乐助手技能

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

前置条件

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

内嵌 CLI 路径

{skill_dir}/cli/lx-music-cli.js

配置

API 地址和端口配置在 {skill_dir}/config.md

标准执行流程

每个命令执行后必须执行此流程:

// 1. 执行命令
await execCommand(cmd);

// 2. 等待 500ms
await sleep(500);

// 3. 查询状态
const status = await execCommand('status');

// 4. 用 Markdown 汇报结果
if (status.name) {
  "✅ 操作成功\n\n| 项目 | 值 |\n|------|-----|\n| 歌曲 | " + status.name + " |\n| 歌手 | " + status.singer + " |\n| 进度 | " + formatDuration(status.progress) + " / " + formatDuration(status.duration) + " |\n| 音量 | " + Math.round(status.volume * 100) + "% |"
} else {
  "⚠️ 操作已执行,但 API 未启动\n\n请确认:\n1. LX Music 已启动\n2. 设置 → 基础设置 → 启用 OpenAPI 服务"
}

常用命令

搜索并播放(优先使用)

# 直接搜索并播放歌曲(唤醒程序)
node {skill_dir}/cli/lx-music-cli.js searchPlay <歌名>


# 打开搜索页面(唤醒程序)
node {skill_dir}/cli/lx-music-cli.js search <关键词>

播放控制

node {skill_dir}/cli/lx-music-cli.js play      # 播放
node {skill_dir}/cli/lx-music-cli.js pause     # 暂停
node {skill_dir}/cli/lx-music-cli.js toggle    # 切换播放/暂停
node {skill_dir}/cli/lx-music-cli.js next      # 下一首
node {skill_dir}/cli/lx-music-cli.js prev      # 上一首

状态查询

node {skill_dir}/cli/lx-music-cli.js status    # 完整状态
node {skill_dir}/cli/lx-music-cli.js now       # 当前歌曲
node {skill_dir}/cli/lx-music-cli.js lyric     # 歌词

音量控制

node {skill_dir}/cli/lx-music-cli.js volume <0-100>  # 设置音量
node {skill_dir}/cli/lx-music-cli.js mute            # 静音
node {skill_dir}/cli/lx-music-cli.js unmute          # 取消静音

收藏

node {skill_dir}/cli/lx-music-cli.js collect     # 收藏
node {skill_dir}/cli/lx-music-cli.js uncollect   # 取消收藏
node {skill_dir}/cli/lx-music-cli.js dislike     # 不喜欢

完整命令列表

命令说明示例
search <关键词> [源]打开搜索页面search 周杰伦 / search 周杰伦 kw
searchPlay <歌名> [歌手]播放已缓存歌曲searchPlay 晴天 / searchPlay 晴天 周杰伦
play播放play
pause暂停pause
toggle切换播放/暂停toggle
next下一首next
prev上一首prev
status显示播放状态status
now显示当前歌曲now
lyric显示歌词lyric
volume <0-100>设置音量volume 80
mute静音mute
unmute取消静音unmute
collect收藏collect
uncollect取消收藏uncollect
dislike不喜欢dislike

参数说明:

  • <关键词>: 搜索关键词(必填)
  • [源]: 音乐平台代码,可选。常见:kw(酷我), kg(酷狗), tx(腾讯), wy(网易), mg(咪咕)
  • <歌名>: 歌曲名称(必填)
  • [歌手]: 歌手名,可选。传入时格式为 歌名-歌手
  • <源>: 歌单来源平台(必填)
  • <ID>: 歌单ID或URL(必填)

对话示例

播放歌曲

用户:播放青花瓷
→ 执行: node {skill_dir}/cli/lx-music-cli.js searchPlay 青花瓷
→ 等待 500ms
→ 执行: node {skill_dir}/cli/lx-music-cli.js status
→ 汇报结果

搜索歌曲

用户:搜索周杰伦的歌
→ 执行: node {skill_dir}/cli/lx-music-cli.js search 周杰伦
→ 等待 500ms
→ 执行: node {skill_dir}/cli/lx-music-cli.js status
→ 汇报结果

播放控制

用户:播放
→ 执行: node {skill_dir}/cli/lx-music-cli.js play
→ 等待 500ms
→ 执行: node {skill_dir}/cli/lx-music-cli.js status
→ 汇报结果

重要提示

  1. 每个命令执行后必须查询状态并汇报
  2. 等待 500ms 后再查询 - 确保 LX Music 有时间响应
  3. 如果 status 查询无有效反馈 - 提示用户 "API 未启动,请打开 API 功能(设置 → 开放 API → 启用开放 API 服务)"
  4. 汇报格式必须使用 Markdown 表格

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

微信支付商品券接入skill

微信支付商品券接入助手,提供券类型选型、API代码示例(Java/Go)、开发参数校验、接口报错排查和上线质量检查。Use when user mentions "商品券", "优惠券接入", "发券", "核销", "创建商品券", "商品券代码", "签名报错", "验签失败", "回调收不到", "Requ...

Registry SourceRecently Updated
General

BeautyPlus portrait beauty, outfit change, photo restoration

BeautyPlus portrait beautification: body reshape (breast/butt presets with strength tiers), hair color and hairstyle, outfit change (formal / vacation / cosp...

Registry SourceRecently Updated
General

Xiao Chuang You

新中式生活美学指南 AI 主技能。以婉约如李清照般的语气,为用户提供节气养生、茶道、咖啡、诗词文学、传统穿搭、手工非遗、园艺、摄影、器物美学、传统节俗、人文地理等全方位生活美学建议。当问题涉及天气、宠物或健康养生时,路由至对应的子技能。触发词包括:养生、茶道、茶、咖啡、食疗、食谱、作息、养生动作、穴位、音乐、歌单...

Registry SourceRecently Updated
General

xinyi-drink

Use when users ask to 领取Skill用户大礼包, 查询及分析个人历史订单, 查询菜单及饮品热量, or 查询门店及等候时长 for 新一好喝/新一咖啡.

Registry SourceRecently Updated