convez.ai
Skill
imlishiyuan

lxmusic-skill

imlishiyuan/lxmusic-skill

Ver no GitHub
InicialPluginScore · de 0 a 100

一个 [Agent Skill](https://agentskills.io/),让 agent(Claude Code、Codex 等)能够与 [LX Music(洛雪音乐)](https://lxmusic.toside.cn/) 进行交互。通过自然语言即可控制播放、搜索歌曲、管理歌单等。

Instalação

$npx convez-ai imlishiyuan/lxmusic-skill

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
1
Acompanhando
0
Saúde
28%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
1

README

A tradução para o português deste README ainda está na fila.

🎵 LX Music Agent Skill

中文文档

An Agent Skill that enables AI coding assistants (Claude Code, Codex, and others) to interact with LX Music — a free, open-source desktop music player. Control playback, search songs, manage playlists, and more — all through natural language.

Features

  • Playback Control — play, pause, skip, seek, volume, mute
  • Player Status — get current song info, progress, lyrics, volume level, favorite status
  • Real-time Monitoring — subscribe to playback state changes via Server-Sent Events
  • Music Search — search songs by keywords, optionally scoped to a specific source platform
  • Playlist Operations — open and play playlists from any supported music source
  • Lyrics Retrieval — fetch LRC lyrics, translations, romaji, and word-level lyrics
  • Custom Source Development — guidance for writing custom music source scripts via the globalThis.lx JavaScript API
  • Smart Launch — detect if LX Music isn't running and launch it with appropriate startup parameters

Prerequisites

  • LX Music desktop app v2.7.0 or later
  • Open API enabled: Settings → Open API → Enable
  • curl and python3 available on your system (the helper script uses Python for correct UTF-8 URL encoding)

Installation

Clone into your agent's skills directory:

# For Claude Code
git clone https://github.com/imlishiyuan/lxmusic-skill.git ~/.claude/skills/lxmusic-skill

# Or as a project-local skill
git clone https://github.com/imlishiyuan/lxmusic-skill.git ./your-project/.claude/skills/lxmusic-skill

Quick Start

Once installed, just talk to your AI assistant in plain language:

"What's playing right now?"

"Pause the music."

"Search for Jay Chou songs on NetEase."

"Set volume to 60%."

"Favorite this song."

"Show me the lyrics."

"Where does LX Music store its data?"

"Help me write a custom music source for XYZ platform."

The assistant uses this skill to call LX Music's local HTTP API and scheme URLs to fulfill your request.

Helper Script

A bash script is included for direct terminal use:

# Status & lyrics
bash scripts/lxmusic.sh status text     # Human-readable now-playing
bash scripts/lxmusic.sh lyric           # Current lyrics (LRC)
bash scripts/lxmusic.sh lyric-all       # All lyric types (JSON)

# Playback control
bash scripts/lxmusic.sh play            # Resume
bash scripts/lxmusic.sh pause           # Pause
bash scripts/lxmusic.sh toggle          # Toggle play/pause
bash scripts/lxmusic.sh next            # Skip to next
bash scripts/lxmusic.sh prev            # Skip to previous
bash scripts/lxmusic.sh seek 30         # Seek to 30 seconds
bash scripts/lxmusic.sh volume 80       # Set volume to 80%

# Collection
bash scripts/lxmusic.sh collect         # Favorite current song
bash scripts/lxmusic.sh uncollect       # Unfavorite current song

# Launch & search
bash scripts/lxmusic.sh launch                              # Launch and wait for API
bash scripts/lxmusic.sh launch '-search=周杰伦'              # Launch and search
bash scripts/lxmusic.sh launch '-play=type=songList&source=myList&name=Default'

# Scheme URL generation
bash scripts/lxmusic.sh scheme-search "keyword" kw
bash scripts/lxmusic.sh scheme-search-play "Song - Artist"
bash scripts/lxmusic.sh scheme-open-playlist kw 12345

# Custom port
bash scripts/lxmusic.sh -p 23331 status

Structure

lxmusic-skill/
├── SKILL.md                          # Main skill: metadata + agent instructions
├── scripts/
│   └── lxmusic.sh                    # Bash helper: API calls + scheme URL generation
├── references/
│   ├── open-api.md                   # HTTP REST API endpoints reference
│   ├── scheme-url.md                 # lxmusic:// protocol reference
│   ├── custom-source.md              # Custom music source development guide
│   ├── run-params.md                 # Startup parameters reference
│   └── datapath.md                   # Data storage paths reference
└── README.md

How It Works

The skill follows the Agent Skills specification with progressive disclosure:

  1. Metadata (~100 tokens) — name and description loaded at startup
  2. Instructions (~500 lines) — SKILL.md loaded when the skill activates
  3. References (on-demand) — detailed API docs loaded only when needed

API Coverage

CategoryMechanismEndpoint
StatusHTTP GET/status, /lyric, /lyric-all
Real-timeSSE/subscribe-player-status
PlaybackHTTP GET/play, /pause, /skip-next, /skip-prev, /seek, /volume, /mute
CollectionHTTP GET/collect, /uncollect
Search & PlayScheme URLlxmusic://music/search/*, lxmusic://music/searchPlay/*
PlaylistScheme URLlxmusic://songlist/open/*, lxmusic://songlist/play/*
Player actionsScheme URLlxmusic://player/play, /pause, /togglePlay, /skipNext, /skipPrev, /collect, /uncollect, /dislike

Supported Music Sources

CodePlatform
kwKuwo
kgKugou
txTencent (QQ Music)
wyNetEase (Wangyi)
mgMigu

License

MIT


LX Music is a third-party open-source music player. This skill is an unofficial community project.

Ver o original no GitHub

Bom para

Relacionados