Loading...
Loading...
Generate personalized music playlists by analyzing the user's music taste from local apps (Apple Music, QQ Music) and generation feedback history. Triggers on "generate playlist", "make a playlist", "歌单", "推荐歌单", "根据我的口味生成", "personalized playlist", "music taste", "音乐画像", "scan my music", "扫描我的音乐", "playlist based on my taste", "根据喜好生成".
npx skill4agent add minimax-ai/skills minimax-music-playlistminimax-music-gen~/.claude/skills/minimax-music-gen/Scan music sources → Build taste profile → Plan playlist → Generate songs → Play & feedbackLANG=zhLANG=en--lang $LANGpython3 ~/.claude/skills/minimax-music-playlist/scripts/scan_apple_music.py \
--output /tmp/apple_music_data.jsonosascriptpython3 ~/.claude/skills/minimax-music-playlist/scripts/scan_qq_music.py \
--output /tmp/qq_music_data.jsonpython3 ~/.claude/skills/minimax-music-playlist/scripts/scan_spotify.py \
--output /tmp/spotify_data.jsonpython3 ~/.claude/skills/minimax-music-playlist/scripts/scan_netease.py \
--output /tmp/netease_data.json~/Library/Containers/com.netease.163music/Data/Documents/storage/目前支持扫描 Apple Music、QQ 音乐、Spotify 和网易云音乐。
如果你用其他平台,可以告诉我你喜欢的风格/艺术家,我手动加入画像。Currently supported: Apple Music, QQ Music, Spotify, and NetEase Cloud Music.
If you use other platforms, tell me your preferred styles/artists and I'll add them to your profile manually.🎵 告诉我你喜欢的音乐,我来帮你建画像:
💡 比如:
· "我喜欢周杰伦、陶喆那种华语R&B"
· "最近在听很多K-pop和日系city pop"
· "偏好忧郁慢歌,不太听电子舞曲"🎵 Tell me about your music taste, and I'll build a profile:
💡 For example:
· "I like Jay Chou and David Tao style C-pop R&B"
· "I've been listening to a lot of K-pop and Japanese city pop"
· "I prefer melancholy ballads, not into EDM"python3 ~/.claude/skills/minimax-music-playlist/scripts/build_taste_profile.py \
--apple-music /tmp/apple_music_data.json \
--qq-music /tmp/qq_music_data.json \
--spotify /tmp/spotify_data.json \
--netease /tmp/netease_data.json \
--gen-history ~/Music/minimax-gen/ \
--artist-map ~/.claude/skills/minimax-music-playlist/data/artist_genre_map.json \
--lang $LANG \
--output ~/.claude/skills/minimax-music-playlist/data/taste_profile.json🎵 你的音乐画像:
📊 数据源:QQ音乐 145首 | Apple Music 42首 | Spotify 20首 | 网易云 15首 | 已生成 9首
🎸 Top 风格:华语流行 35% | R&B 20% | K-pop 10% | 中国风 8%
🌍 语言:中文 70% | 韩语 12% | 英语 10% | 日语 8%
💭 情绪:忧郁 30% | 浪漫 25% | 温暖 20%
🎤 声线:偏好男声 55% | 女声 40%
🎵 Top 艺术家:周杰伦、陶喆、孙燕姿、王力宏、方大同
这个画像准确吗?(确认后开始生成歌单,或告诉我要调整什么)🎵 Your Music Profile:
📊 Sources: QQ Music 145 | Apple Music 42 | Spotify 20 | NetEase 15 | Generated 9
🎸 Top styles: C-pop 35% | R&B 20% | K-pop 10% | Chinese-style 8%
🌍 Languages: Chinese 70% | Korean 12% | English 10% | Japanese 8%
💭 Moods: Melancholy 30% | Romantic 25% | Warm 20%
🎤 Vocals: Male 55% | Female 40%
🎵 Top artists: Jay Chou, David Tao, Stefanie Sun, Leehom Wang, Khalil Fong
Does this look right? (Confirm to generate playlist, or tell me what to adjust)~/.claude/skills/minimax-music-playlist/data/taste_profile.json🎵 想要什么主题的歌单?
💡 比如:
· "深夜放松" — 适合睡前的慢歌
· "通勤路上" — 节奏轻快提神
· "雨天" — 配合窗外的雨
· "让我自己选" — 不指定主题,根据画像随机
· 或者直接描述你想要的氛围🎵 What theme for your playlist?
💡 Examples:
· "Late night chill" — relaxing slow songs
· "Commute" — upbeat and energizing
· "Rainy day" — matching the rain outside
· "Surprise me" — random based on your profile
· Or just describe the vibe you wantpython3 ~/.claude/skills/minimax-music-playlist/scripts/generate_playlist.py \
--profile ~/.claude/skills/minimax-music-playlist/data/taste_profile.json \
--theme "<user theme>" \
--count <number> \
--lang $LANG \
--output /tmp/playlist_plan.json🎵 歌单计划:深夜放松 (5首)
1. 华语R&B慢歌 — 忧郁, 内省 [中文/男声]
Prompt: R&B, neo-soul, 忧郁, 内省, 温柔男声, 电钢琴, 贝斯, 慢板, 深夜独处
2. K-pop 抒情 — 温暖, 浪漫 [韩语/女声]
Prompt: K-pop, 流行, 温暖, 浪漫, 清澈女声, 合成器, 钢琴, 中板, 星空下
3. 独立民谣 — 内省, 平静 [中文/男声]
Prompt: 独立民谣, folk, 内省, 平静, 温柔男声, 原声吉他, 口琴, 慢板, 深夜独处
4. Lo-fi hip-hop — 平静, 梦幻 [纯音乐]
Prompt: lo-fi hip-hop, 平静, 梦幻, 采样钢琴, 电子鼓, vinyl crackle, 慢板, 深夜书桌
5. 爵士 — 温暖, 浪漫 [英语/女声]
Prompt: smooth jazz, bossa nova, 温暖, 浪漫, 清澈女声, 钢琴, 贝斯, 萨克斯, 中板
确认生成?(直接回车确认,或告诉我要调整哪首)🎵 Playlist Plan: Late Night Chill (5 songs)
1. C-pop R&B Ballad — melancholy, introspective [Chinese/male vocal]
Prompt: R&B, neo-soul, melancholy, introspective, gentle male voice, electric piano, bass, slow tempo, late night solitude
2. K-pop Ballad — warm, romantic [Korean/female vocal]
Prompt: K-pop, pop, warm, romantic, clear female voice, synth, piano, mid-tempo, under the stars
3. Indie Folk — introspective, calm [Chinese/male vocal]
Prompt: indie folk, folk, introspective, calm, gentle male voice, acoustic guitar, harmonica, slow tempo, late night solitude
4. Lo-fi hip-hop — calm, dreamy [instrumental]
Prompt: lo-fi hip-hop, calm, dreamy, sampled piano, electronic drums, vinyl crackle, slow tempo, late night desk
5. Jazz — warm, romantic [English/female vocal]
Prompt: smooth jazz, bossa nova, warm, romantic, clear female voice, piano, bass, saxophone, mid-tempo
Confirm? (press enter to confirm, or tell me which song to adjust)instrumental: falsepython3 ~/.claude/skills/minimax-music-gen/scripts/generate_lyrics.py \
--prompt "<lyrics_prompt from plan>" \
--lang $LANG \
--output /tmp/playlist_lyrics_<NN>.txt--no-playpython3 ~/.claude/skills/minimax-music-gen/scripts/generate_music.py \
--prompt "<prompt from plan>" \
--lyrics "<lyrics or empty>" \
--output ~/Music/minimax-gen/playlists/<playlist_name>/<filename> \
--lang $LANG \
--no-playplay_music.py --backgroundpython3 ~/.claude/skills/minimax-music-gen/scripts/play_music.py \
~/Music/minimax-gen/playlists/<playlist_name>/<filename> \
--background --lang $LANGis_idleplay_playlist.pypython3 -c "
import subprocess
r = subprocess.run(['osascript', '-e',
'tell application \"System Events\" to (name of processes) contains \"Music\"'],
capture_output=True, text=True, timeout=5)
if r.stdout.strip() != 'true':
print('idle')
else:
s = subprocess.run(['osascript', '-e',
'tell application \"Music\" to player state as string'],
capture_output=True, text=True, timeout=5)
state = s.stdout.strip().lower()
print('idle' if 'playing' not in state else 'playing')
"play_music.py --background💾 [2/5] 已保存,播放器正忙,稍后可重播💾 [2/5] Saved, player busy — available for replay later✅ [1/5] 生成完毕:01_bossa_nova.mp3
▶️ 正在播放...
⏳ [2/5] 正在生成...✅ [1/5] Complete: 01_bossa_nova.mp3
▶️ Now playing...
⏳ [2/5] Generating...🎉 歌单「深夜放松」生成完毕!共 5 首
📁 文件:~/Music/minimax-gen/playlists/深夜放松/
01_rnb_midnight.mp3
02_kpop_stars.mp3
...
💡 重播整个歌单:告诉我「重播」🎉 Playlist "Late Night Chill" complete! 5 songs
📁 Files: ~/Music/minimax-gen/playlists/late_night_chill/
01_rnb_midnight.mp3
02_kpop_stars.mp3
...
💡 Replay the full playlist: just say "replay"python3 ~/.claude/skills/minimax-music-gen/scripts/play_playlist.py \
~/Music/minimax-gen/playlists/<playlist_name>/ \
--lang $LANG \
--auto~/Music/minimax-gen/playlists/<playlist_name>/playlist.json{
"name": "深夜放松",
"theme": "深夜放松",
"created_at": "ISO timestamp",
"song_count": 5,
"songs": [
{
"index": 1,
"filename": "01_rnb_midnight.mp3",
"prompt": "...",
"lyrics": "...",
"rating": null
}
]
}🎵 这个歌单怎么样?
对每首歌打分(可选):
1. 华语R&B慢歌 — 👍 / 👎 / 跳过
2. K-pop 抒情 — 👍 / 👎 / 跳过
...
或者整体评价:
🎉 很满意!以后多来这种
🔄 还行,某些方面可以调整
🗑️ 不太喜欢,换个方向🎵 How was this playlist?
Rate each song (optional):
1. C-pop R&B Ballad — 👍 / 👎 / skip
2. K-pop Ballad — 👍 / 👎 / skip
...
Or overall rating:
🎉 Loved it! More like this
🔄 Decent, but could adjust some things
🗑️ Not my vibe, try a different directionls ~/Music/minimax-gen/playlists/| Error | Action |
|---|---|
| No music apps installed | Guide to manual input mode |
| QQ Music DB locked | Suggest closing QQ Music and retrying |
| Apple Music not running | Try to launch via osascript, or skip |
| Spotify newly installed | Warn that data is sparse, suggest using app more |
| NetEase no track data | Data accumulates with usage, suggest browsing/playing |
| API timeout during generation | Retry once, then skip that song and continue |
| Generation fails for a song | Log error, continue with next song |
| No taste profile exists | Run scan first |
| Profile older than 7 days | Suggest rescan, but allow using old profile |
data/artist_genre_map.json~/Music/minimax-gen/playlists/generate_lyrics.pygenerate_music.pyplay_music.py~/.claude/skills/minimax-music-gen/scripts/