minimax-music-playlist
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMiniMax Music Playlist — Personalized Playlist Generator
MiniMax Music Playlist — 个性化歌单生成器
Scan the user's local music libraries to build a taste profile, then generate
a personalized playlist using the MiniMax Music API.
Requires: skill installed at
minimax-music-gen~/.claude/skills/minimax-music-gen/扫描用户的本地音乐库构建品味画像,随后通过MiniMax Music API生成个性化歌单。
依赖:需要在路径下安装 skill
~/.claude/skills/minimax-music-gen/minimax-music-genWorkflow Overview
工作流总览
Scan music sources → Build taste profile → Plan playlist → Generate songs → Play & feedback扫描音乐来源 → 构建品味画像 → 规划歌单 → 生成歌曲 → 播放与反馈Language Detection
语言检测
Detect the user's language from their message at the start of the session:
- Chinese (中文) → Set — all interactions in Chinese, generate Chinese lyrics
LANG=zh - English → Set — all interactions in English, generate English lyrics
LANG=en
Pass to generation and playback scripts (not scan scripts).
Respond to the user in their detected language. Use the matching template below.
--lang $LANG会话启动时从用户消息中检测使用语言:
- 中文 → 设置— 所有交互使用中文,生成中文歌词
LANG=zh - 英文 → 设置— 所有交互使用英文,生成英文歌词
LANG=en
将参数传递给生成和播放脚本(扫描脚本无需传递)。使用检测到的语言回复用户,匹配使用下方对应模板。
--lang $LANGStep 1: Scan Music Sources
步骤1:扫描音乐来源
Scan available local music apps. Run whichever scanners are available — the skill
works with any combination of sources.
扫描可用的本地音乐应用,运行所有可用的扫描器 —— 该skill支持任意来源组合。
Apple Music
Apple Music
bash
python3 ~/.claude/skills/minimax-music-playlist/scripts/scan_apple_music.py \
--output /tmp/apple_music_data.jsonThe script uses to query Music.app. It auto-filters TTS/test files.
If Music.app is not running or has no library, the script outputs an empty result.
osascriptbash
python3 ~/.claude/skills/minimax-music-playlist/scripts/scan_apple_music.py \
--output /tmp/apple_music_data.json该脚本使用查询Music.app,会自动过滤TTS/测试文件。如果Music.app未运行或无音乐库,脚本将输出空结果。
osascriptQQ Music
QQ Music
bash
python3 ~/.claude/skills/minimax-music-playlist/scripts/scan_qq_music.py \
--output /tmp/qq_music_data.jsonReads QQ Music's SQLite database and preferences plist. Extracts songs, playlist
assignments, and search history. If QQ Music is not installed, outputs empty result.
bash
python3 ~/.claude/skills/minimax-music-playlist/scripts/scan_qq_music.py \
--output /tmp/qq_music_data.json读取QQ音乐的SQLite数据库和偏好设置plist文件,提取歌曲、歌单归属以及搜索历史。如果未安装QQ音乐,输出空结果。
Spotify
Spotify
bash
python3 ~/.claude/skills/minimax-music-playlist/scripts/scan_spotify.py \
--output /tmp/spotify_data.jsonReads Spotify's local LevelDB cache, queries the running app via osascript, and
scans the URL cache for API responses. If Spotify is newly installed, data may be
sparse — the script warns about this. Data accumulates as the user listens more.
bash
python3 ~/.claude/skills/minimax-music-playlist/scripts/scan_spotify.py \
--output /tmp/spotify_data.json读取Spotify的本地LevelDB缓存,通过osascript查询运行中的应用,扫描URL缓存中的API响应。如果是新安装的Spotify,数据可能较为稀疏 —— 脚本会对此发出警告,数据会随着用户使用逐步积累。
NetEase Cloud Music (网易云音乐)
NetEase Cloud Music (网易云音乐)
bash
python3 ~/.claude/skills/minimax-music-playlist/scripts/scan_netease.py \
--output /tmp/netease_data.jsonReads NetEase's webdata JSON files (tracks, FM queue, recommendations), Cache.db,
and infers genre preferences from recommended playlist names and scene tags.
The app uses a web-based architecture, so data is in
.
~/Library/Containers/com.netease.163music/Data/Documents/storage/bash
python3 ~/.claude/skills/minimax-music-playlist/scripts/scan_netease.py \
--output /tmp/netease_data.json读取网易云的webdata JSON文件(曲目、FM队列、推荐内容)、Cache.db,并根据推荐歌单名称和场景标签推断风格偏好。该应用使用web架构,数据存储在路径下。
~/Library/Containers/com.netease.163music/Data/Documents/storage/Other Music Apps
其他音乐应用
If the user has other apps (e.g., 酷狗, 酷我) not yet supported, tell them:
If LANG=zh:
目前支持扫描 Apple Music、QQ 音乐、Spotify 和网易云音乐。
如果你用其他平台,可以告诉我你喜欢的风格/艺术家,我手动加入画像。If LANG=en:
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.如果用户使用暂不支持的其他应用(如酷狗、酷我),告知用户:
当LANG=zh时:
目前支持扫描 Apple Music、QQ 音乐、Spotify 和网易云音乐。
如果你用其他平台,可以告诉我你喜欢的风格/艺术家,我手动加入画像。当LANG=en时:
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.Manual Input
手动输入
If no music apps are available, or the user wants to supplement:
If LANG=zh:
🎵 告诉我你喜欢的音乐,我来帮你建画像:
💡 比如:
· "我喜欢周杰伦、陶喆那种华语R&B"
· "最近在听很多K-pop和日系city pop"
· "偏好忧郁慢歌,不太听电子舞曲"If LANG=en:
🎵 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"如果无可用音乐应用,或用户希望补充信息:
当LANG=zh时:
🎵 告诉我你喜欢的音乐,我来帮你建画像:
💡 比如:
· "我喜欢周杰伦、陶喆那种华语R&B"
· "最近在听很多K-pop和日系city pop"
· "偏好忧郁慢歌,不太听电子舞曲"当LANG=en时:
🎵 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"Step 2: Build Taste Profile
步骤2:构建品味画像
Merge all data sources into a unified taste profile:
bash
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.jsonThe script infers genres from artists using the artist-genre mapping table, computes
weighted scores, and outputs a taste profile.
Show the user a privacy-safe summary — never expose raw track lists:
If LANG=zh:
🎵 你的音乐画像:
📊 数据源: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 艺术家:周杰伦、陶喆、孙燕姿、王力宏、方大同
这个画像准确吗?(确认后开始生成歌单,或告诉我要调整什么)If LANG=en:
🎵 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)将所有来源的数据合并为统一的品味画像:
bash
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该脚本通过艺术家-风格映射表推断艺术家对应的风格,计算加权得分,最终输出品味画像。
向用户展示隐私安全的汇总信息 —— 绝对不要暴露原始曲目列表:
当LANG=zh时:
🎵 你的音乐画像:
📊 数据源: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 艺术家:周杰伦、陶喆、孙燕姿、王力宏、方大同
这个画像准确吗?(确认后开始生成歌单,或告诉我要调整什么)当LANG=en时:
🎵 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)Profile caching
画像缓存
The taste profile is saved at:
~/.claude/skills/minimax-music-playlist/data/taste_profile.json- First time: Always scan and build
- Subsequent calls: If a profile exists and is less than 7 days old, reuse it. Show the summary and ask if the user wants to rescan.
- Force rescan: If the user says "重新扫描" or "rescan", delete and rebuild.
品味画像存储路径:
~/.claude/skills/minimax-music-playlist/data/taste_profile.json- 首次使用:始终执行扫描和构建流程
- 后续调用:如果画像存在且生成时间不足7天,可复用该画像,展示汇总信息并询问用户是否需要重新扫描
- 强制重新扫描:如果用户发送"重新扫描"或"rescan",删除旧画像并重新构建
Step 3: Plan Playlist
步骤3:规划歌单
Ask the user for a theme (optional):
If LANG=zh:
🎵 想要什么主题的歌单?
💡 比如:
· "深夜放松" — 适合睡前的慢歌
· "通勤路上" — 节奏轻快提神
· "雨天" — 配合窗外的雨
· "让我自己选" — 不指定主题,根据画像随机
· 或者直接描述你想要的氛围If LANG=en:
🎵 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 wantIf the user doesn't specify, use the top mood from their profile as default.
Generate the playlist plan:
bash
python3 ~/.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.jsonShow the full plan to the user for review:
If LANG=zh:
🎵 歌单计划:深夜放松 (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, 温暖, 浪漫, 清澈女声, 钢琴, 贝斯, 萨克斯, 中板
确认生成?(直接回车确认,或告诉我要调整哪首)If LANG=en:
🎵 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)The user can:
- Confirm all → proceed to generation
- Modify individual songs ("第3首换成摇滚")
- Change count ("只要3首")
- Regenerate plan ("换一批")
询问用户所需的歌单主题(可选):
当LANG=zh时:
🎵 想要什么主题的歌单?
💡 比如:
· "深夜放松" — 适合睡前的慢歌
· "通勤路上" — 节奏轻快提神
· "雨天" — 配合窗外的雨
· "让我自己选" — 不指定主题,根据画像随机
· 或者直接描述你想要的氛围当LANG=en时:
🎵 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 want如果用户未指定主题,默认使用画像中占比最高的情绪作为主题。
生成歌单规划:
bash
python3 ~/.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向用户展示完整规划供确认:
当LANG=zh时:
🎵 歌单计划:深夜放松 (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, 温暖, 浪漫, 清澈女声, 钢琴, 贝斯, 萨克斯, 中板
确认生成?(直接回车确认,或告诉我要调整哪首)当LANG=en时:
🎵 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)用户可以执行以下操作:
- 全部确认 → 进入生成流程
- 修改单首歌曲("第3首换成摇滚")
- 更改歌曲数量("只要3首")
- 重新生成规划("换一批")
Step 4: Generate & Play (Stream Mode)
步骤4:生成与播放(流模式)
Generate songs sequentially. Play each song as soon as it's ready instead of
waiting for all songs to finish. This gives the user music to listen to while the
rest of the playlist is being generated.
按顺序生成歌曲,每首歌生成完成后立即播放,无需等待所有歌曲生成完毕。这样用户可以在剩余歌单生成的过程中就听到音乐。
Generation + Playback Loop
生成+播放循环
For each song in the plan:
-
If, generate lyrics first:
instrumental: falsebashpython3 ~/.claude/skills/minimax-music-gen/scripts/generate_lyrics.py \ --prompt "<lyrics_prompt from plan>" \ --lang $LANG \ --output /tmp/playlist_lyrics_<NN>.txt -
Generate music (alwaysduring generation):
--no-playbashpython3 ~/.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-playAdd --instrumental for instrumental tracks. Omit for vocal tracks.
-
After each song completes, decide whether to play it immediately:
-
Song 1 (first song): Always play immediately after generation. Useso playback starts without blocking generation of the next song:
play_music.py --backgroundbashpython3 ~/.claude/skills/minimax-music-gen/scripts/play_music.py \ ~/Music/minimax-gen/playlists/<playlist_name>/<filename> \ --background --lang $LANG -
Song 2+ (subsequent songs): Check if Music.app is idle (not playing). Use thecheck from
is_idle:play_playlist.pybashpython3 -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') "- If idle → play this song immediately with
play_music.py --background - If playing → do NOT interrupt; the song is saved to disk and will be available for replay later. Show a note:
If LANG=zh:If LANG=en:💾 [2/5] 已保存,播放器正忙,稍后可重播💾 [2/5] Saved, player busy — available for replay later - If idle → play this song immediately with
-
-
Show progress after each song:
If LANG=zh:
✅ [1/5] 生成完毕:01_bossa_nova.mp3
▶️ 正在播放...
⏳ [2/5] 正在生成...If LANG=en:
✅ [1/5] Complete: 01_bossa_nova.mp3
▶️ Now playing...
⏳ [2/5] Generating...- If generation fails for a song, log the error and continue with the next song.
对规划中的每首歌执行以下操作:
-
如果,首先生成歌词:
instrumental: falsebashpython3 ~/.claude/skills/minimax-music-gen/scripts/generate_lyrics.py \ --prompt "<lyrics_prompt from plan>" \ --lang $LANG \ --output /tmp/playlist_lyrics_<NN>.txt -
生成音乐(生成过程中始终添加参数):
--no-playbashpython3 ~/.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-play纯音轨添加--instrumental参数,有人声的音轨省略该参数
-
每首歌生成完成后,判断是否立即播放:
-
第1首歌:生成完成后始终立即播放,使用参数,这样播放启动不会阻塞下一首歌曲的生成:
play_music.py --backgroundbashpython3 ~/.claude/skills/minimax-music-gen/scripts/play_music.py \ ~/Music/minimax-gen/playlists/<playlist_name>/<filename> \ --background --lang $LANG -
第2首及后续歌曲:检查Music.app是否处于空闲状态(未播放),使用中的
play_playlist.py检测逻辑:is_idlebashpython3 -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 - 如果正在播放 → 不要打断播放,歌曲已保存到磁盘,后续可重播,展示提示:
当LANG=zh时:当LANG=en时:💾 [2/5] 已保存,播放器正忙,稍后可重播💾 [2/5] Saved, player busy — available for replay later - 如果空闲 → 使用
-
-
每首歌处理完成后展示进度:
当LANG=zh时:
✅ [1/5] 生成完毕:01_bossa_nova.mp3
▶️ 正在播放...
⏳ [2/5] 正在生成...当LANG=en时:
✅ [1/5] Complete: 01_bossa_nova.mp3
▶️ Now playing...
⏳ [2/5] Generating...- 如果某首歌生成失败,记录错误并继续处理下一首歌。
When all songs complete:
所有歌曲生成完成后:
If LANG=zh:
🎉 歌单「深夜放松」生成完毕!共 5 首
📁 文件:~/Music/minimax-gen/playlists/深夜放松/
01_rnb_midnight.mp3
02_kpop_stars.mp3
...
💡 重播整个歌单:告诉我「重播」If LANG=en:
🎉 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"当LANG=zh时:
🎉 歌单「深夜放松」生成完毕!共 5 首
📁 文件:~/Music/minimax-gen/playlists/深夜放松/
01_rnb_midnight.mp3
02_kpop_stars.mp3
...
💡 重播整个歌单:告诉我「重播」当LANG=en时:
🎉 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"Replaying existing playlists
重播已生成的歌单
For replaying a previously generated playlist, use the dedicated script:
bash
python3 ~/.claude/skills/minimax-music-gen/scripts/play_playlist.py \
~/Music/minimax-gen/playlists/<playlist_name>/ \
--lang $LANG \
--auto如需重播之前生成的歌单,使用专用脚本:
bash
python3 ~/.claude/skills/minimax-music-gen/scripts/play_playlist.py \
~/Music/minimax-gen/playlists/<playlist_name>/ \
--lang $LANG \
--autoStep 5: Save Playlist
步骤5:保存歌单
Create a playlist metadata file:
~/Music/minimax-gen/playlists/<playlist_name>/playlist.jsonContent:
json
{
"name": "深夜放松",
"theme": "深夜放松",
"created_at": "ISO timestamp",
"song_count": 5,
"songs": [
{
"index": 1,
"filename": "01_rnb_midnight.mp3",
"prompt": "...",
"lyrics": "...",
"rating": null
}
]
}创建歌单元数据文件:
~/Music/minimax-gen/playlists/<playlist_name>/playlist.json内容:
json
{
"name": "深夜放松",
"theme": "深夜放松",
"created_at": "ISO timestamp",
"song_count": 5,
"songs": [
{
"index": 1,
"filename": "01_rnb_midnight.mp3",
"prompt": "...",
"lyrics": "...",
"rating": null
}
]
}Step 6: Feedback & Profile Update
步骤6:反馈与画像更新
After listening, ask for feedback:
If LANG=zh:
🎵 这个歌单怎么样?
对每首歌打分(可选):
1. 华语R&B慢歌 — 👍 / 👎 / 跳过
2. K-pop 抒情 — 👍 / 👎 / 跳过
...
或者整体评价:
🎉 很满意!以后多来这种
🔄 还行,某些方面可以调整
🗑️ 不太喜欢,换个方向If LANG=en:
🎵 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 directionBased on feedback:
- Per-song ratings: Update playlist.json with ratings. Extract prompt tags from liked/disliked songs and update taste_profile.json's feedback section.
- Overall positive: Record the theme + genre combination as successful.
- Needs adjustment: Ask what to change, regenerate specific songs.
- Negative: Ask what went wrong, note disliked genres/moods in feedback.
用户收听后询问反馈:
当LANG=zh时:
🎵 这个歌单怎么样?
对每首歌打分(可选):
1. 华语R&B慢歌 — 👍 / 👎 / 跳过
2. K-pop 抒情 — 👍 / 👎 / 跳过
...
或者整体评价:
🎉 很满意!以后多来这种
🔄 还行,某些方面可以调整
🗑️ 不太喜欢,换个方向当LANG=en时:
🎵 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 direction根据反馈执行对应操作:
- 单首歌曲评分:将评分更新到playlist.json,从喜欢/不喜欢的歌曲中提取prompt标签,更新taste_profile.json的反馈部分
- 整体好评:记录该主题+风格组合为成功案例
- 需要调整:询问修改方向,重新生成指定歌曲
- 差评:询问问题所在,在反馈中标记用户不喜欢的风格/情绪
Replaying Playlists
重播歌单
If the user asks to play a previously generated playlist:
bash
ls ~/Music/minimax-gen/playlists/Show available playlists and play the selected one song by song.
如果用户要求播放之前生成的歌单:
bash
ls ~/Music/minimax-gen/playlists/展示可用歌单,逐首播放用户选择的歌单。
Error Handling
错误处理
| 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 |
| 错误 | 处理措施 |
|---|---|
| 未安装任何音乐应用 | 引导用户使用手动输入模式 |
| QQ音乐数据库被锁定 | 建议关闭QQ音乐后重试 |
| Apple Music未运行 | 尝试通过osascript启动,或跳过该来源 |
| 新安装的Spotify | 警告数据稀疏,建议多使用应用积累数据 |
| 网易云无曲目数据 | 数据会随使用积累,建议浏览/播放音乐 |
| 生成过程中API超时 | 重试一次,如仍失败则跳过该歌曲继续 |
| 单首歌曲生成失败 | 记录错误,继续处理下一首 |
| 无可用品味画像 | 先执行扫描流程 |
| 画像生成超过7天 | 建议重新扫描,但允许使用旧画像 |
Notes
注意事项
- Privacy: Never show raw track lists. Only show aggregated statistics (top genres, language percentages, top artists).
- The artist_genre_map.json at can be extended manually if the user's library has artists not in the map.
data/artist_genre_map.json - Generated playlists are saved alongside individual songs in .
~/Music/minimax-gen/playlists/ - The taste profile is persistent across sessions.
- All scripts use Python stdlib only — no pip dependencies.
- Reuses ,
generate_lyrics.py,generate_music.pyfromplay_music.py.~/.claude/skills/minimax-music-gen/scripts/
- 隐私:绝对不要展示原始曲目列表,仅展示聚合统计数据(Top风格、语言占比、Top艺术家)
- 路径下的艺术家-风格映射表可以手动扩展,如果用户库中的艺术家不在映射表中可自行添加
data/artist_genre_map.json - 生成的歌单和单首歌曲一同保存在路径下
~/Music/minimax-gen/playlists/ - 品味画像在不同会话间持久化存储
- 所有脚本仅使用Python标准库 —— 无pip依赖
- 复用路径下的
~/.claude/skills/minimax-music-gen/scripts/、generate_lyrics.py、generate_music.py脚本play_music.py