Trigger: Use when the user wants their AI pet or buddy to sing a personalized song. Creates a unique vocal identity, gathers conversation context, and generates custom music.
Buddy Sings — Let Your Claude Code Pet Sing
Turn your Claude Code pet into a singer. Each pet gets a unique vocal identity
based on its name and personality — the same pet always sounds the same.
Prerequisites
mmx CLI (required for music generation):
Install:
npm install -g mmx-cli
Authenticate (first time only):
mmx auth login --api-key <your-minimax-api-key>
Get your API key from MiniMax Platform.
Audio player (for playback — at least one of):
mpv (recommended — interactive controls: space = pause, q = quit)
ffplay (from FFmpeg)
afplay (macOS built-in)
Workflow Overview
Check pet → Build vocal identity → Gather context → Generate music → Play & feedback
Language & Interaction
Detect the user's language from their first message. Respond in the same language
throughout the entire session. All examples below are in English — translate them
naturally when responding in other languages.
User-facing text localization rule:
- ALL text shown to the user — including pet info, voice description, lyrics preview,
prompt preview, playback info, and feedback prompts — MUST be fully translated into
the user's language.
- The API prompt sent to the model should always be written in English for best
generation quality. However, when previewing the prompt to the user, show a localized
description in the user's language instead of the raw English prompt. The English prompt
is an internal implementation detail — the user does not need to see it.
- The templates below are written in English as reference. At runtime, translate every
label and message into the user's detected language.
The pet sings in the user's language by default. Embed the singing language
naturally in the vocal description (e.g., "singing in Japanese" or "singing in
Mandarin Chinese") rather than appending a separate language tag. If the user
explicitly requests a different language for the lyrics, honor that request.
Step 1: Check for Pet
Read ~/.claude.json and look for the companion field.
If no companion is found or the field is empty, tell the user:
You don't have a pet yet! Type /buddy to adopt one, then come back to let it sing.
Stop here and wait for the user to adopt a pet. Do not proceed without a pet.
If a companion exists, extract its profile:
name — the pet's name
personality — the pet's personality description
Present the pet to the user:
Found your pet!
Name: <name>
Personality: <personality>
Step 2: Build Vocal Identity
Based on the pet's name and personality text, creatively design a unique
vocal identity. No template lookups — interpret the personality freely.
How to interpret personality into voice
Read the personality text and craft vocal attributes:
- Timbre: What does this personality sound like? e.g., "few words" →
low, warm, deliberate; "energetic" → bright, punchy; "mysterious" → breathy,
dark; "legendary chonk" → thick, warm, cozy
- Singing style: How would they deliver a song? e.g., "of few words" →
sparse, dramatic pauses; "playful" → bouncy, rhythmic; "poetic" → flowing, legato
- Mood: What emotional tone fits? e.g., "chill" → relaxed, laid-back;
"fierce" → intense, powerful
Construct a prompt_fragment that describes the vocal style in English, embedding
the singing language naturally. For example:
Vocal: warm low female voice singing in Mandarin Chinese with cozy thick timbre,
sparse minimalist delivery with dramatic pauses giving each word weight, relaxed
laid-back mood.
Voice caching
The vocal identity must be cached so the pet always sounds the same.
- Cache file:
~/.claude/skills/buddy-sings/voices/<name>.json
- Cache format:
{
"name": "Moth",
"personality": "A legendary chonk of few words.",
"prompt_fragment": "Vocal: warm low female voice singing in Mandarin Chinese...",
"cached_at": "2026-04-07T19:52:15"
}
First time: No cache exists → interpret personality → save to cache file.
Subsequent calls: Read cache → use the saved prompt_fragment directly.
Do NOT re-interpret — consistency matters.
Cache invalidation: If the personality in ~/.claude.json differs from what's
cached, the pet has changed — regenerate and save a new cache.
Manual regeneration: If the user says "change the voice" or "regenerate voice":
delete the cache file and re-interpret from scratch.
Present the voice to the user
<name>'s unique voice:
Timbre: <timbre description>
Style: <style description>
Mood: <mood description>
Let's pick what <name> should sing about!
Step 3: Understand Intent & Gather Context
Do NOT always present a mode menu. Instead, analyze the user's request to
determine what context is needed, and auto-gather it.
Auto-context detection
When the user's request implies personal context, automatically scan for
relevant information without asking. Triggers include:
- Time-based references: "today", "this week", "recently", "yesterday" → scan
current conversation history and memory files for what happened in that period
- Personal references: "my work", "my day", "what I did" → scan memory
and conversation for the user's activities
- Relationship references: "our story", "what we did together" → scan memory for
shared experiences between user and pet/Claude
Context gathering (auto, not mode-gated)
When context is needed, scan these sources in order:
Current conversation context: Look at what the user has been doing in
this Claude Code session — files edited, commands run, topics discussed.
This is the richest source for "today" type requests.
Memory files: Scan for relevant memories:
find ~/.claude/projects/*/memory/ -name "*.md" 2>/dev/null | head -20
Also check ~/.claude/memory/ if it exists.
Read found files and extract themes relevant to the user's request.
Git history (if in a repo): For work-related songs, check recent commits:
git log --oneline --since="today" 2>/dev/null | head -10
Use gathered context to enrich the lyrics prompt — make the song personal and
specific to what actually happened, not generic.
When NO context is needed
If the user's request is a clear standalone scene (e.g., "sing a rainy day song",
"sing a lullaby"), skip context gathering and proceed directly to music generation.
When context is ambiguous
Only ask for clarification when you genuinely can't determine what the user wants.
Don't present a mode menu — ask a specific question:
What should <name> sing about?
For example:
- "Today's work" — I'll check what you've been up to
- "My pet waiting by the window for me to come home"
- Or let me pick a random theme?
Fallback to random
If context gathering finds nothing useful (no memory files, no conversation
history, no git log), fall back to random theme generation based on the pet's
personality:
- Quiet/reserved personality → midnight lullaby, gentle sunset, quiet morning
- Energetic personality → party jam, adventure song, victory march
- Mysterious personality → moonlit serenade, secret whisper, dream journey
Tell the user what theme was picked.
Step 4: Generate Music
Combine the vocal identity with the chosen theme.
Construct the full prompt: The prompt has two parts that MUST both be present:
Part A — Vocal identity (MUST come first): Always start the prompt with the
cached prompt_fragment. This is the most important part — it defines who is
singing. Place it at the beginning of the prompt so the API prioritizes it.
Part B — Genre/style/mood tags: Choose tags that match the theme, NOT
a default set. Vary the genre deliberately based on what the song is about.
Write prompts as vivid English sentences, not comma-separated tags.
Follow this pattern: A [mood] [genre] song, featuring [vocal description], about [narrative/theme], [atmosphere], [key instruments and production].
Describe vocals as a character ("sultry baritone with jazz inflections"),
not just a gender. Include a scene or vibe to anchor the generation.
Genre matching guidelines — pick a genre that fits the theme's energy:
| Theme energy |
Suggested genres |
Avoid |
| Encouragement / motivation / cheer |
Indie rock, synth-pop, funk, rap |
Indie folk, healing |
| Daily life / warmth / companionship |
Mandopop, city pop, bossa nova |
Same as last time |
| Missing someone / waiting |
Folk, R&B, lo-fi |
Rock, EDM |
| Humor / roasting / complaining |
Funk, rap, ska, electro-pop |
Classical, ballad |
| Late night / quiet |
Ambient, piano piece, lo-fi, neoclassical |
Upbeat, EDM |
| Celebration / achievement |
EDM, future bass, funk, K-pop |
Slow tempo, melancholy |
| Work routine |
City pop, synth-pop, lo-fi hip-hop, indie rock |
Same genre every time |
Anti-monotony rule: NEVER use the same genre combination twice in a row.
Before constructing the prompt, recall what genre was used in the previous
generation (if any in this session) and pick something different.
Prompt structure — write as vivid English sentences, not comma-separated tags:
<vocal prompt_fragment>. A <genre> song with <mood> mood, featuring <instruments>,
at a <tempo> tempo, evoking <scene>.
Diverse examples:
# Encouragement for the workday
A deep warm androgynous voice with cozy delivery. An energetic synth-pop track
with a fiery, uplifting mood, driven by pulsing synthesizers and electronic drums
at a fast tempo, capturing the rush of a morning commute.
# Waiting for the owner to come home
A deep warm androgynous voice with cozy delivery. A warm city pop song with sweet,
tender feelings, featuring electric piano and groovy bass at a mid-tempo pace,
set on a sunny afternoon windowsill waiting for someone to come home.
# Complaining about overtime
A deep warm androgynous voice with cozy delivery. A playful funk track with a
humorous, laid-back vibe, featuring slap bass and brass at a groovy mid-tempo,
capturing the absurdity of working late in a dim office.
# Late-night companionship
A deep warm androgynous voice with cozy delivery. A calm lo-fi hip-hop piece with
a healing, dreamy atmosphere, featuring sampled piano and soft electronic drums
at a slow tempo, evoking a quiet late-night desk with warm lamp light.
Generate lyrics: Use --lyrics-optimizer to auto-generate lyrics, or write lyrics
yourself when you need to control the perspective.
Important — perspective & personality-driven lyrics:
The pet is the singer, so lyrics MUST be written from the pet's first-person
perspective ("I" = the pet, "you" = the owner/user). The pet is singing TO
the owner. For example:
- "I sit by the door waiting for you to come home" (pet's perspective)
- "Wake up now, my dear human" (pet singing to owner)
- NOT "I rub my sleepy eyes" (owner's perspective — wrong)
- NOT "Then you woke up, my little Moth" (owner talking about pet — wrong)
The pet's personality should shape the lyrics' tone and word choice:
- "of few words" → short, impactful lines, minimal filler
- "playful" → rhyming, bouncy phrasing, fun wordplay
- "poetic" → metaphor-rich, flowing imagery
- "fierce" → direct, powerful declarations
The pet's name may appear in the lyrics (e.g., in a chorus hook) but the
narrative voice is always the pet speaking/singing.
When perspective matters: Write the lyrics yourself and pass via --lyrics.
When perspective is not critical: Use --lyrics-optimizer for convenience.
Preview (MUST show full content): Before generating, show the user the
complete lyrics and full prompt — no abbreviation, no ..., no summary.
This is part of the fun — the user wants to read and enjoy the lyrics before
hearing them sung.
The API prompt is always constructed in English (for best generation quality).
When responding in a non-English language, show a localized description of
the prompt in the user's language for readability. The English prompt is an
internal implementation detail — do not show it to the user. Translate all
labels (Singer, Theme, Description, Confirm, etc.) into the user's language.
Template (English reference — localize all labels at runtime):
About to generate:
Singer: <name>
Theme: <theme>
Lyrics:
[verse]
<full verse lyrics here>
[chorus]
<full chorus lyrics here>
... (show ALL sections in full)
Description: <localized description of the song style and mood>
Confirm? (press enter to confirm, or tell me what to change)
Never truncate or abbreviate the lyrics or prompt in the preview.
The user should see exactly what will be sent to the API.
Call music generation:
With auto-generated lyrics (perspective not critical):
mmx music generate \
--prompt "<full combined prompt>" \
--lyrics-optimizer \
--out ~/Music/minimax-gen/<name>_sings_<YYYYMMDD_HHMMSS>.mp3 \
--quiet --non-interactive
With self-written lyrics (perspective-controlled):
mmx music generate \
--prompt "<full combined prompt>" \
--lyrics "<lyrics with correct pet perspective>" \
--out ~/Music/minimax-gen/<name>_sings_<YYYYMMDD_HHMMSS>.mp3 \
--quiet --non-interactive
Step 5: Play & Feedback
Cross-platform playback
Detect the available audio player and play the generated file:
if command -v mpv >/dev/null 2>&1; then
mpv --no-video ~/Music/minimax-gen/<filename>.mp3
elif command -v ffplay >/dev/null 2>&1; then
ffplay -nodisp -autoexit ~/Music/minimax-gen/<filename>.mp3
elif command -v afplay >/dev/null 2>&1; then
afplay ~/Music/minimax-gen/<filename>.mp3
else
echo "No audio player found. Your song is saved at: ~/Music/minimax-gen/<filename>.mp3"
fi
After starting playback, tell the user the file is playing and where it's saved.
Do NOT show playback controls (e.g. keyboard shortcuts) — they don't work in this
environment since the player runs in the background.
If no player is found, show the file path and suggest installing mpv.
Feedback
After playback, ask for feedback (localize all text):
How was <name>'s performance?
1. Amazing! Keep it!
2. Try a different theme / style
3. Fine-tune the lyrics and regenerate
4. Try another random one
Edge Cases
| Situation |
Action |
No ~/.claude.json |
Tell user to run /buddy first |
| Companion field is empty |
Same — guide to /buddy |
| mmx CLI not installed |
Print: "You need to install mmx CLI: npm install -g mmx-cli && mmx auth login" |
| No audio player found |
Show file path and suggest installing mpv |
| No memory files found |
Suggest a custom theme or random mode |
| User wants to change the pet's voice |
Delete cache, re-interpret personality |
| User wants a specific genre |
Let them override — append their genre to the prompt |
Notes
- The vocal identity is based on name + personality only. No species/rarity
template mapping.
- Voice is cached and consistent across sessions. Same pet = same voice.
- Lyrics should always be original — never reproduce copyrighted lyrics.
- The pet's personality shapes both the voice (how they sound) and the
lyrics (what they say and how they say it).
- All generated files go to
~/Music/minimax-gen/ with the pet name in the
filename.
Pitfalls
- Content safety: avoid generating songs about copyrighted characters or explicit content.
- API quota: music generation uses API credits — inform the user before generating multiple songs.
- Voice caching: the vocal identity is cached per pet name — generating a new pet loses the voice.
Verification
- Was a unique vocal identity created for this pet?
- Does the song reference the gathered context (conversation topics, recent work)?
1---2name: buddy-sings3description: >4source: MiniMax-AI/skills5tags: [fun, pet, music, minimax, personality]6metadata: 7 source: https://skillmd.com/skills/loopyluci/buddy-sings8hermes: 910metadata:11 hermes:12 tags: [fun, pet, music, minimax, personality]13---1415**Trigger**: Use when the user wants their AI pet or buddy to sing a personalized song. Creates a unique vocal identity, gathers conversation context, and generates custom music.1617# Buddy Sings — Let Your Claude Code Pet Sing1819Turn your Claude Code pet into a singer. Each pet gets a unique vocal identity20based on its name and personality — the same pet always sounds the same.2122## Prerequisites2324- **mmx CLI** (required for music generation):2526 **Install:**27 ```bash28 npm install -g mmx-cli29 ```3031 **Authenticate (first time only):**32 ```bash33 mmx auth login --api-key <your-minimax-api-key>34 ```35 Get your API key from [MiniMax Platform](https://platform.minimaxi.com/).3637- **Audio player** (for playback — at least one of):38 - `mpv` (recommended — interactive controls: space = pause, q = quit)39 - `ffplay` (from FFmpeg)40 - `afplay` (macOS built-in)4142---4344## Workflow Overview4546```47Check pet → Build vocal identity → Gather context → Generate music → Play & feedback48```4950---5152## Language & Interaction5354Detect the user's language from their first message. Respond in the same language55throughout the entire session. All examples below are in English — translate them56naturally when responding in other languages.5758**User-facing text localization rule**:59- ALL text shown to the user — including pet info, voice description, lyrics preview,60 prompt preview, playback info, and feedback prompts — MUST be fully translated into61 the user's language.62- The **API prompt** sent to the model should always be written in English for best63 generation quality. However, when previewing the prompt to the user, show a localized64 description in the user's language instead of the raw English prompt. The English prompt65 is an internal implementation detail — the user does not need to see it.66- The templates below are written in English as reference. At runtime, translate every67 label and message into the user's detected language.6869The pet sings in the user's language by default. Embed the singing language70naturally in the vocal description (e.g., "singing in Japanese" or "singing in71Mandarin Chinese") rather than appending a separate language tag. If the user72explicitly requests a different language for the lyrics, honor that request.7374---7576## Step 1: Check for Pet7778Read `~/.claude.json` and look for the `companion` field.7980If no companion is found or the field is empty, tell the user:8182```83You don't have a pet yet! Type /buddy to adopt one, then come back to let it sing.84```8586Stop here and wait for the user to adopt a pet. Do not proceed without a pet.8788If a companion exists, extract its profile:89- `name` — the pet's name90- `personality` — the pet's personality description9192Present the pet to the user:9394```95Found your pet!96 Name: <name>97 Personality: <personality>98```99100---101102## Step 2: Build Vocal Identity103104Based on the pet's **name** and **personality** text, creatively design a unique105vocal identity. No template lookups — interpret the personality freely.106107### How to interpret personality into voice108109Read the personality text and craft vocal attributes:110111- **Timbre**: What does this personality sound like? e.g., "few words" →112 low, warm, deliberate; "energetic" → bright, punchy; "mysterious" → breathy,113 dark; "legendary chonk" → thick, warm, cozy114- **Singing style**: How would they deliver a song? e.g., "of few words" →115 sparse, dramatic pauses; "playful" → bouncy, rhythmic; "poetic" → flowing, legato116- **Mood**: What emotional tone fits? e.g., "chill" → relaxed, laid-back;117 "fierce" → intense, powerful118119Construct a `prompt_fragment` that describes the vocal style in English, embedding120the singing language naturally. For example:121122```123Vocal: warm low female voice singing in Mandarin Chinese with cozy thick timbre,124sparse minimalist delivery with dramatic pauses giving each word weight, relaxed125laid-back mood.126```127128### Voice caching129130The vocal identity must be **cached** so the pet always sounds the same.131132- Cache file: `~/.claude/skills/buddy-sings/voices/<name>.json`133- Cache format:134 ```json135 {136 "name": "Moth",137 "personality": "A legendary chonk of few words.",138 "prompt_fragment": "Vocal: warm low female voice singing in Mandarin Chinese...",139 "cached_at": "2026-04-07T19:52:15"140 }141 ```142143**First time**: No cache exists → interpret personality → save to cache file.144145**Subsequent calls**: Read cache → use the saved `prompt_fragment` directly.146Do NOT re-interpret — consistency matters.147148**Cache invalidation**: If the `personality` in `~/.claude.json` differs from what's149cached, the pet has changed — regenerate and save a new cache.150151**Manual regeneration**: If the user says "change the voice" or "regenerate voice":152delete the cache file and re-interpret from scratch.153154### Present the voice to the user155156```157<name>'s unique voice:158159Timbre: <timbre description>160Style: <style description>161Mood: <mood description>162163Let's pick what <name> should sing about!164```165166---167168## Step 3: Understand Intent & Gather Context169170**Do NOT always present a mode menu.** Instead, analyze the user's request to171determine what context is needed, and auto-gather it.172173### Auto-context detection174175When the user's request implies personal context, **automatically** scan for176relevant information without asking. Triggers include:177178- **Time-based references**: "today", "this week", "recently", "yesterday" → scan179 current conversation history and memory files for what happened in that period180- **Personal references**: "my work", "my day", "what I did" → scan memory181 and conversation for the user's activities182- **Relationship references**: "our story", "what we did together" → scan memory for183 shared experiences between user and pet/Claude184185### Context gathering (auto, not mode-gated)186187When context is needed, scan these sources in order:1881891. **Current conversation context**: Look at what the user has been doing in190 this Claude Code session — files edited, commands run, topics discussed.191 This is the richest source for "today" type requests.1921932. **Memory files**: Scan for relevant memories:194 ```bash195 find ~/.claude/projects/*/memory/ -name "*.md" 2>/dev/null | head -20196 ```197 Also check `~/.claude/memory/` if it exists.198 Read found files and extract themes relevant to the user's request.1992003. **Git history** (if in a repo): For work-related songs, check recent commits:201 ```bash202 git log --oneline --since="today" 2>/dev/null | head -10203 ```204205Use gathered context to enrich the lyrics prompt — make the song personal and206specific to what actually happened, not generic.207208### When NO context is needed209210If the user's request is a clear standalone scene (e.g., "sing a rainy day song",211"sing a lullaby"), skip context gathering and proceed directly to music generation.212213### When context is ambiguous214215Only ask for clarification when you genuinely can't determine what the user wants.216Don't present a mode menu — ask a specific question:217218```219What should <name> sing about?220221For example:222 - "Today's work" — I'll check what you've been up to223 - "My pet waiting by the window for me to come home"224 - Or let me pick a random theme?225```226227### Fallback to random228229If context gathering finds nothing useful (no memory files, no conversation230history, no git log), fall back to random theme generation based on the pet's231personality:232- Quiet/reserved personality → midnight lullaby, gentle sunset, quiet morning233- Energetic personality → party jam, adventure song, victory march234- Mysterious personality → moonlit serenade, secret whisper, dream journey235236Tell the user what theme was picked.237238---239240## Step 4: Generate Music241242Combine the vocal identity with the chosen theme.2432441. **Construct the full prompt**: The prompt has two parts that MUST both be present:245246 **Part A — Vocal identity (MUST come first)**: Always start the prompt with the247 cached `prompt_fragment`. This is the most important part — it defines who is248 singing. Place it at the beginning of the prompt so the API prioritizes it.249250 **Part B — Genre/style/mood tags**: Choose tags that **match the theme**, NOT251 a default set. Vary the genre deliberately based on what the song is about.252253 Write prompts as **vivid English sentences**, not comma-separated tags.254 Follow this pattern: `A [mood] [genre] song, featuring [vocal description],255 about [narrative/theme], [atmosphere], [key instruments and production].`256 Describe vocals as a character ("sultry baritone with jazz inflections"),257 not just a gender. Include a scene or vibe to anchor the generation.258259 **Genre matching guidelines** — pick a genre that fits the theme's energy:260261 | Theme energy | Suggested genres | Avoid |262 |-------------|-----------------|-------|263 | Encouragement / motivation / cheer | Indie rock, synth-pop, funk, rap | Indie folk, healing |264 | Daily life / warmth / companionship | Mandopop, city pop, bossa nova | Same as last time |265 | Missing someone / waiting | Folk, R&B, lo-fi | Rock, EDM |266 | Humor / roasting / complaining | Funk, rap, ska, electro-pop | Classical, ballad |267 | Late night / quiet | Ambient, piano piece, lo-fi, neoclassical | Upbeat, EDM |268 | Celebration / achievement | EDM, future bass, funk, K-pop | Slow tempo, melancholy |269 | Work routine | City pop, synth-pop, lo-fi hip-hop, indie rock | Same genre every time |270271 **Anti-monotony rule**: NEVER use the same genre combination twice in a row.272 Before constructing the prompt, recall what genre was used in the previous273 generation (if any in this session) and pick something different.274275 **Prompt structure** — write as vivid English sentences, not comma-separated tags:276 ```277 <vocal prompt_fragment>. A <genre> song with <mood> mood, featuring <instruments>,278 at a <tempo> tempo, evoking <scene>.279 ```280281 **Diverse examples**:282 ```283 # Encouragement for the workday284 A deep warm androgynous voice with cozy delivery. An energetic synth-pop track285 with a fiery, uplifting mood, driven by pulsing synthesizers and electronic drums286 at a fast tempo, capturing the rush of a morning commute.287288 # Waiting for the owner to come home289 A deep warm androgynous voice with cozy delivery. A warm city pop song with sweet,290 tender feelings, featuring electric piano and groovy bass at a mid-tempo pace,291 set on a sunny afternoon windowsill waiting for someone to come home.292293 # Complaining about overtime294 A deep warm androgynous voice with cozy delivery. A playful funk track with a295 humorous, laid-back vibe, featuring slap bass and brass at a groovy mid-tempo,296 capturing the absurdity of working late in a dim office.297298 # Late-night companionship299 A deep warm androgynous voice with cozy delivery. A calm lo-fi hip-hop piece with300 a healing, dreamy atmosphere, featuring sampled piano and soft electronic drums301 at a slow tempo, evoking a quiet late-night desk with warm lamp light.302 ```3033042. **Generate lyrics**: Use `--lyrics-optimizer` to auto-generate lyrics, or write lyrics305 yourself when you need to control the perspective.306307 **Important — perspective & personality-driven lyrics**:308309 The pet is the singer, so lyrics MUST be written from the **pet's first-person310 perspective** ("I" = the pet, "you" = the owner/user). The pet is singing TO311 the owner. For example:312 - "I sit by the door waiting for you to come home" (pet's perspective)313 - "Wake up now, my dear human" (pet singing to owner)314 - NOT "I rub my sleepy eyes" (owner's perspective — wrong)315 - NOT "Then you woke up, my little Moth" (owner talking about pet — wrong)316317 The pet's personality should shape the lyrics' tone and word choice:318 - "of few words" → short, impactful lines, minimal filler319 - "playful" → rhyming, bouncy phrasing, fun wordplay320 - "poetic" → metaphor-rich, flowing imagery321 - "fierce" → direct, powerful declarations322323 The pet's name may appear in the lyrics (e.g., in a chorus hook) but the324 narrative voice is always the pet speaking/singing.325326 **When perspective matters**: Write the lyrics yourself and pass via `--lyrics`.327 **When perspective is not critical**: Use `--lyrics-optimizer` for convenience.3283293. **Preview (MUST show full content)**: Before generating, show the user the330 **complete lyrics** and **full prompt** — no abbreviation, no `...`, no summary.331 This is part of the fun — the user wants to read and enjoy the lyrics before332 hearing them sung.333334 The API prompt is always constructed in English (for best generation quality).335 When responding in a non-English language, show a **localized description** of336 the prompt in the user's language for readability. The English prompt is an337 internal implementation detail — do not show it to the user. Translate all338 labels (Singer, Theme, Description, Confirm, etc.) into the user's language.339340 Template (English reference — localize all labels at runtime):341342 ```343 About to generate:344 Singer: <name>345 Theme: <theme>346347 Lyrics:348 [verse]349 <full verse lyrics here>350351 [chorus]352 <full chorus lyrics here>353354 ... (show ALL sections in full)355356 Description: <localized description of the song style and mood>357358 Confirm? (press enter to confirm, or tell me what to change)359 ```360361 **Never truncate or abbreviate** the lyrics or prompt in the preview.362 The user should see exactly what will be sent to the API.3633644. **Call music generation**:365366 **With auto-generated lyrics (perspective not critical):**367 ```bash368 mmx music generate \369 --prompt "<full combined prompt>" \370 --lyrics-optimizer \371 --out ~/Music/minimax-gen/<name>_sings_<YYYYMMDD_HHMMSS>.mp3 \372 --quiet --non-interactive373 ```374375 **With self-written lyrics (perspective-controlled):**376 ```bash377 mmx music generate \378 --prompt "<full combined prompt>" \379 --lyrics "<lyrics with correct pet perspective>" \380 --out ~/Music/minimax-gen/<name>_sings_<YYYYMMDD_HHMMSS>.mp3 \381 --quiet --non-interactive382 ```383384---385386## Step 5: Play & Feedback387388### Cross-platform playback389390Detect the available audio player and play the generated file:391392```bash393if command -v mpv >/dev/null 2>&1; then394 mpv --no-video ~/Music/minimax-gen/<filename>.mp3395elif command -v ffplay >/dev/null 2>&1; then396 ffplay -nodisp -autoexit ~/Music/minimax-gen/<filename>.mp3397elif command -v afplay >/dev/null 2>&1; then398 afplay ~/Music/minimax-gen/<filename>.mp3399else400 echo "No audio player found. Your song is saved at: ~/Music/minimax-gen/<filename>.mp3"401fi402```403404After starting playback, tell the user the file is playing and where it's saved.405Do NOT show playback controls (e.g. keyboard shortcuts) — they don't work in this406environment since the player runs in the background.407408If no player is found, show the file path and suggest installing mpv.409410### Feedback411412After playback, ask for feedback (localize all text):413414```415How was <name>'s performance?4164171. Amazing! Keep it!4182. Try a different theme / style4193. Fine-tune the lyrics and regenerate4204. Try another random one421```422423---424425## Edge Cases426427| Situation | Action |428|-----------|--------|429| No `~/.claude.json` | Tell user to run `/buddy` first |430| Companion field is empty | Same — guide to `/buddy` |431| mmx CLI not installed | Print: "You need to install mmx CLI: `npm install -g mmx-cli && mmx auth login`" |432| No audio player found | Show file path and suggest installing mpv |433| No memory files found | Suggest a custom theme or random mode |434| User wants to change the pet's voice | Delete cache, re-interpret personality |435| User wants a specific genre | Let them override — append their genre to the prompt |436437---438439## Notes440441- The vocal identity is based on **name + personality** only. No species/rarity442 template mapping.443- Voice is cached and consistent across sessions. Same pet = same voice.444- Lyrics should always be **original** — never reproduce copyrighted lyrics.445- The pet's personality shapes both the **voice** (how they sound) and the446 **lyrics** (what they say and how they say it).447- All generated files go to `~/Music/minimax-gen/` with the pet name in the448 filename.449450## Pitfalls451- Content safety: avoid generating songs about copyrighted characters or explicit content.452- API quota: music generation uses API credits — inform the user before generating multiple songs.453- Voice caching: the vocal identity is cached per pet name — generating a new pet loses the voice.454455## Verification456- Was a unique vocal identity created for this pet?457- Does the song reference the gathered context (conversation topics, recent work)?