Communitygithub.com

ni-shiliu/neil-control

music-control-skill,暂时支持spotify

neil-control 是什么?

neil-control is a Claude Code agent skill that music-control-skill,暂时支持spotify.

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add ni-shiliu/neil-control

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Limit music control to Spotify only now

music-control

Controls Spotify on macOS via CLI. Use it to enhance the user's work session with music — proactively and responsively.

Setup

Requirements: macOS, Python 3.10+, Spotify desktop app installed.

No Spotify API key or OAuth setup needed — search uses the anonymous Web Player API.

CLI

MUSIC="python3 ~/.claude/skills/music-control/scripts/music_cli.py"
$MUSIC [--provider spotify] <command>
CommandDescription
statusCurrent track info (JSON)
playToggle play/pause
nextSkip to next
prevPrevious track
play-by <title>...Search and play immediately; multi-song with |||
search <query> [--page N]Search with pagination
recommend <mood>Pick by mood and play
queue-showDisplay current queue
queue-add <title>...Add songs to queue; multi-song with |||
queue-play [index]Start playing from queue
queue-nextSkip to next in queue
queue-clearClear the queue

--provider defaults to spotify. If Spotify is not running, it will be launched automatically.

Mood Keywords

MoodWhen to use
focusedDeep work, coding in flow, reading
relaxedCasual chat, breaks, light tasks
hypedFeature shipped, bug fixed, wins
sadUser venting, stuck on a problem
debugFrustrated, chasing a tricky bug

Proactive Trigger Rules

Always act without being asked when you detect:

Signal in conversationAction
User starts a new coding sessionrecommend focused → play top result
User says they fixed a bug / shippedrecommend hyped → play top result
User is frustrated / stuckrecommend debug
User mentions needing to relaxrecommend relaxed
User mentions a specific song or artistplay-by <song> <artist>
Long silence / idle in conversationrecommend relaxed
User asks "play something" with no detailInfer from recent conversation mood

Queue & Multi-Song

Multi-song separator: |||

$MUSIC play-by 逆战 ||| 天下 ||| 这就是爱
$MUSIC queue-add 逆战 ||| 天下
$MUSIC queue-play
$MUSIC queue-next
$MUSIC search 周杰伦 --page 2

Response Format

{"ok": true, "title": "晴天", "artist": "周杰伦", "playing": true}
{"ok": true, "results": [{"title":"...", "artist":"...", "id":"..."}]}
{"ok": true, "action": "next"}
{"ok": true, "action": "queue_next", "current": 1, "has_next": true}
{"ok": false, "error": "no_player", "message": "..."}

Notes

  • Spotify: uses anonymous Web Player API for search — no login or API key needed
  • If status returns no_player, the app may still be loading — wait 3s and retry
  • Queue is persisted to ~/.config/music-cli/queue.json

相关技能