music-control

Search and play specific songs on Android via NetEase Cloud Music API and mpv.

10|2|Updated Jul 9, 2026
One-click install
npx skills add https://github.com/xvxv-stack7/android-claude-agent --skill music-control-xvxv-stack7
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: music-control
Source: https://github.com/xvxv-stack7/android-claude-agent/tree/main/skills/music-control
Command: npx skills add https://github.com/xvxv-stack7/android-claude-agent --skill music-control-xvxv-stack7

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mpv, @neteasecloudmusicapienhanced/api, termux-media-player.

What problem does it solve? It lets an AI agent on Android play a specific song by name and artist, choosing tracks based on context like time of day, mood, or activity, instead of only offering generic next/previous media controls. ## Core Features & Use Cases - Song Search and Playback: Query the NetEase Cloud Music API for a track, resolve a streaming URL, and play it in the background with mpv or termux-media-player. - Context-Aware Song Selection: Pick songs by scenario such as late night, morning, walking detected via step count, or recently mentioned artists. - Event-Driven Automation: The music_moment.sh script reacts to a music_moment event (Bluetooth A2DP active plus daytime) with a 40-minute cooldown, curated playlists per scenario, and logging. - Use Case: When headphones connect during a morning walk, the agent detects increased step count, selects an upbeat track from its playlist, streams it, and notifies the AI via a trigger file. ## Quick Start Ask the AI to play a specific song, for example "play 晴天 by 周杰伦", and it will search the NetEase API, fetch the stream URL, and start background playback.

Frequently Asked Questions about music-control

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I play a specific song on Android from the command line?▼

Search the NetEase Cloud Music API endpoint with the song and artist keywords, extract the song ID from the JSON response, request the streaming URL via the song/url/v1 endpoint, then play it in the background with mpv or termux-media-player.

How to automate music playback based on time of day or activity?▼

Use the music_moment.sh script, which checks the current hour and step-count changes to pick a scenario playlist (night, morning, walking, or daytime), then randomly selects and streams a track. A 40-minute minimum interval prevents repeated playback.

Does this music playback approach require root or WiFi?▼

No root is required; it runs inside the Termux environment with a local Node.js API server on 127.0.0.1:3000. Internet access is needed to reach the NetEase streaming service, but no computer or ADB over WiFi is involved.

Why does mpv playback fail with no audio on Android?▼

mpv on Android lacks audio permission in some environments, so the script downloads the mp3 to a temp file and plays it with termux-media-player instead. Streaming URLs also expire after a few hours, so always fetch a fresh URL before playing.

What are the limitations of the NetEase Cloud Music API approach?▼

The API server must be running before any command works and uses about 50MB of RAM as a Node.js process. Playback shows no system media notification, and this skill is deprecated in favor of a virtual-display plus Kugou-based rewrite.