Use when user wants their Claude Code pet (/buddy) to sing a song. Triggers on any request that combines the concept of their Claude Code buddy, pet, or companion with singing or music. Supports multilingual triggers — match equivalent phrases in any language.
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.
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)Check pet → Build vocal identity → Gather context → Generate music → Play & feedback
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:
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.
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 namepersonality — the pet's personality descriptionPresent the pet to the user:
Found your pet!
Name: <name>
Personality: <personality>
Based on the pet's name and personality text, creatively design a unique vocal identity. No template lookups — interpret the personality freely.
Read the personality text and craft vocal attributes:
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.
The vocal identity must be cached so the pet always sounds the same.
~/.claude/skills/buddy-sings/voices/<name>.json{
"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.
<name>'s unique voice:
Timbre: <timbre description>
Style: <style description>
Mood: <mood description>
Let's pick what <name> should sing about!
Do NOT always present a mode menu. Instead, analyze the user's request to determine what context is needed, and auto-gather it.
When the user's request implies personal context, automatically scan for relevant information without asking. Triggers include:
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.
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.
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?
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