minimax-music-gen
Skill4 starsChanged 59 days agoApache-2.0View on GitHub
Use when user wants to generate music, songs, or audio tracks. Triggers on any request involving music creation, song writing, lyrics generation, audio production, or covers. Also triggers when user provides lyrics and wants them turned into a song, or describes a mood/scene and wants background music. Supports multilingual triggers — match equivalent phrases in any language. Do NOT use for music playback of existing files, music theory questions, or music recommendation without generation.
- Reads credentials
- Installs packages
5 other projects use a version of this, 4 of them edited.
Adopted by
Most recently taken up by
- FimawLLC/fimaw-skillsedited, first seen Nov 15, 2026
- mini-yifan/open-source-video-gen-skilltheir own version, first seen Sep 8, 2026
- idexal/idexal-skillsedited, first seen Aug 26, 2026
- HZ6112/minimax-claude-skillsedited, first seen Apr 10, 2026
- MiniMax-AI/skillsedited, first seen Mar 24, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 4
- MiniMax-AI/skills★ 14k100% same
- FimawLLC/fimaw-skills★ 3100% same
- idexal/idexal-skills★ 2100% same
- HZ6112/minimax-claude-skills★ 171% same
Wrote their own version · 1
- mini-yifan/open-source-video-gen-skill★ 21same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- 3d-animation-short-generatorSkill
- brand-promo-video-generatorSkill
- co-op-game-intro-generatorSkill
- h3-prompt-writingSkill
- handdrawn-live-video-generatorSkill
- minimalist-product-ad-generatorSkill
- minimax-multimodal-toolkitSkill
- minimax-music-playlistSkill
- music-video-subtitle-generatorSkill
- paper-collage-explainer-generatorSkill
- papercraft-stop-motion-explainerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. 19 are common, 0 are distinctive, and 8 are very specific to this project.
19
Common
Most of the 5 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 59
Agent flags: Always add --quiet --non-interactive when calling mmx from agents.
- Very specific: line 68
All generated music is saved to ~/Music/minimax-gen/.
- Common: line 81
ALL text shown to the user — including preview labels, field names, confirmations, status messages, playback info, feedback prompts, and …
- Common: line 92
Default lyrics language = the user's language.
- Common: line 94
Only generate lyrics in a different language if the user explicitly requests it.
- Common: line 95
When a different lyrics language is needed, embed it naturally into the vocal or genre description in the prompt.
- Common: line 112
If ambiguous, ask using this decision tree:
- Common: line 125
If the user gives a clear one-liner like "make me a sad piano piece", skip the questions — infer instrumental + basic mode and proceed.
- Common: line 147
Show the user a preview: before generating. Translate all labels AND the prompt description into the user's language.
- Very specific: line 170
If user provided lyrics: display them formatted with section markers, ask for edits.
- Very specific: line 172
If user has a theme but no lyrics: will use --lyrics-optimizer to auto-generate.
- Very specific: line 226
Use structured flags (--genre, --mood, --vocals, --instruments, --bpm, --key, --tempo, --structure, --references, --avoid, --use-case) to …
- Common: line 236
After generation, detect an available audio player and play the file.
- Common: line 252
After starting playback, tell the user (localize all text):
- Common: line 259
Do NOT show playback controls (e.g.
- Common: line 262
If no player is found (localize all text):
- Common: line 274
After playback, ask for feedback:
- Very specific: line 286
Adjust & regenerate: Ask what to change (prompt?
- Common: line 289
Delete & restart: Remove the file, go back to Step 0.
- Common: line 298
If no lyrics are provided, the original lyrics are extracted via ASR automatically.
- Common: line 302
When the user selects Cover mode:
- Common: line 303
Ask for the source audio — a local file path or URL
- Common: line 304
Ask for the target cover style (e.g., "acoustic cover, stripped-down, intimate vocal")
- Common: line 379
Never reproduce copyrighted lyrics: When doing covers, always write original lyrics inspired by the song's theme.
- Very specific: line 385
File management: If ~/Music/minimax-gen/ has more than 50 files, suggest cleanup when starting a new session.
- Very specific: line 387
Structured params: Prefer using --genre, --mood, --vocals, --instruments, --bpm etc.
- Common: line 389
Lyrics language via style: When the user wants lyrics in a specific language, express it through the vocal description or genre (e.g., …
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MiniMax Music Generation Skill
Generate songs (vocal or instrumental) using the MiniMax Music API. Supports two creation modes: Basic (one-sentence-in, song-out) and Advanced Control (edit lyrics, refine prompt, plan before generating).
Prerequisites
mmx CLI (required): Music generation uses the
mmxcommand-line tool.Check if installed:
command -v mmx && mmx --version || echo "mmx not found"Install (requires Node.js):
npm install -g mmx-cliAuthenticate (first time only):
mmx auth login --api-key <your-minimax-api-key>The API key can be obtained from MiniMax Platform. Credentials are saved to
~/.mmx/credentials.jsonand persist across sessions.Verify:
mmx quota show- Audio player (recommended):
mpv,ffplay, orafplay(macOS built-in) for local playback.mpvis preferred for its interactive controls.
CLI Tool
This skill uses the mmx CLI for all music generation:
- Music Generation:
mmx music generate— model:music-2.6-free- Supports
--lyrics-optimizerto auto-generate lyrics from prompt - Supports
--instrumentalfor instrumental tracks - Supports
--lyricsfor user-provided lyrics - Structured params:
--genre,--mood,--vocals,--instruments,--bpm,--key,--tempo,--structure,--references
- Supports
- Cover:
mmx music cover— model:music-cover-free- Takes reference audio via
--audio-file <path>or--audio <url> --promptdescribes the target cover style
- Takes reference audio via
Agent flags: Always add --quiet --non-interactive when calling mmx from agents.
Pipeline:
- Vocal:
User description -> mmx music generate --lyrics-optimizer -> MP3 - Instrumental:
User description -> mmx music generate --instrumental -> MP3 - Cover:
Source audio + style -> mmx music cover -> MP3
Storage
All generated music is saved to ~/Music/minimax-gen/. Create the directory if it doesn't
exist. Files are named with a timestamp and a short slug derived from the prompt:
YYYYMMDD_HHMMSS_<slug>.mp3
Language & Interaction
Detect the user's language from their first message and respond in that language for the entire session. This applies to all interaction text, questions, confirmations, and feedback prompts.
User-facing text localization rule:
- ALL text shown to the user — including preview labels, field names, confirmations, status messages, playback info, feedback prompts, and the prompt/description preview — 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.
Lyrics language rule:
- Default lyrics language = the user's language. A Chinese-speaking user gets Chinese lyrics; an English-speaking user gets English lyrics.
- Only generate lyrics in a different language if the user explicitly requests it.
- When a different lyrics language is needed, embed it naturally into the vocal or genre description in the prompt. For example, instead of appending "with Korean lyrics", use "featuring a Korean female vocalist" or specify a genre that implies the language (e.g., "K-pop", "J-rock", "Mandopop", "Latin pop").
Workflow
Step 0: Detect Intent
Parse the user's message to determine:
- Song category: vocal (with lyrics), instrumental (no vocals), or cover
- Creation mode preference: did they provide detailed requirements (Advanced) or a casual one-liner (Basic)?
If ambiguous, ask using this decision tree:
Q1: What type of music?
- Vocal (with lyrics)
- Instrumental (no vocals)
- Cover
Q2: Creation mode?
- Basic — one-line description, auto-generate
- Advanced — edit lyrics, refine prompt, planIf the user gives a clear one-liner like "make me a sad piano piece", skip the questions — infer instrumental + basic mode and proceed.
Step 1: Basic Mode
Goal: User provides a short description, the skill auto-generates everything, then calls the API.
Expand the description into a prompt: Take the user's one-liner and expand it into a rich music prompt. Refer to the Prompt Writing Guide appendix at the end of this document for style vocabulary, genre/instrument references, and prompt structure. The API prompt should always be written in English for best generation quality, regardless of the user's language.
Follow this pattern:
A [mood] [BPM optional] [genre] song, featuring [vocal description], about [narrative/theme], [atmosphere], [key instruments and production].Show the user a preview before generating. Translate all labels AND the prompt description into the user's language. The English prompt is only used internally when calling the API — the user should never see it. Example template (English reference — localize everything at runtime):
About to generate: Type: Vocal / Instrumental Description: indie folk, melancholy, acoustic guitar, gentle female voice Lyrics: Auto-generated (--lyrics-optimizer) Confirm? (press enter to confirm, or tell me what to change)- Call mmx: Generate the music directly.
Step 2: Advanced Control Mode
Goal: User has full control over every parameter before generation.
- Lyrics phase:
- If user provided lyrics: display them formatted with section markers, ask for edits.
The final lyrics will be passed via
--lyricsto mmx. - If user has a theme but no lyrics: will use
--lyrics-optimizerto auto-generate. - Support iterative editing: "change the second chorus" -> only rewrite that section.
- User can also write lyrics themselves and pass via
--lyrics.
- If user provided lyrics: display them formatted with section markers, ask for edits.
The final lyrics will be passed via
- Prompt phase:
- Generate a recommended prompt based on the lyrics' mood and content.
- Present it as editable tags the user can add/remove/modify.
- Refer to the Prompt Writing Guide appendix for the full vocabulary.
- Advanced planning (optional, offer but don't force):
- Song structure: verse-chorus-verse-chorus-bridge-chorus or custom
- BPM suggestion (encode in prompt as tempo descriptor)
- Reference style: "something like X style" -> map to prompt tags
- Vocal character description
- Final confirmation: Show complete parameter summary, then generate.
Step 3: Call mmx
Generate music using the mmx CLI:
Vocal with auto-generated lyrics:
mmx music generate \
--prompt "<prompt>" \
--lyrics-optimizer \
--genre "<genre>" --mood "<mood>" --vocals "<vocal style>" \
--instruments "<instruments>" --bpm <bpm> \
--out ~/Music/minimax-gen/<filename>.mp3 \
--quiet --non-interactiveVocal with user-provided lyrics:
mmx music generate \
--prompt "<prompt>" \
--lyrics "<lyrics with section markers>" \
--genre "<genre>" --mood "<mood>" --vocals "<vocal style>" \
--out ~/Music/minimax-gen/<filename>.mp3 \
--quiet --non-interactiveInstrumental (no vocal):
mmx music generate \
--prompt "<prompt>" \
--instrumental \
--genre "<genre>" --mood "<mood>" --instruments "<instruments>" \
--out ~/Music/minimax-gen/<filename>.mp3 \
--quiet --non-interactiveUse structured flags (--genre, --mood, --vocals, --instruments, --bpm, --key,
--tempo, --structure, --references, --avoid, --use-case) to give the API
fine-grained control instead of cramming everything into --prompt.
Display a progress indicator while waiting. Typical generation takes 30-120 seconds.
Step 4: Playback
After generation, detect an available audio player and play the file.
Detect player:
command -v mpv || command -v ffplay || command -v afplayPlay based on detected player (in priority order):
| Player | Command | Controls |
mpv (preferred) | mpv --no-video ~/Music/minimax-gen/<filename>.mp3 | space = pause/resume, q = quit, left/right = seek |
ffplay | ffplay -nodisp -autoexit ~/Music/minimax-gen/<filename>.mp3 | q = quit |
afplay (macOS) | afplay ~/Music/minimax-gen/<filename>.mp3 | Ctrl+C = stop |
| None found | Do not attempt playback | Show file path only |
After starting playback, tell the user (localize all text):
Now playing: <filename>.mp3
Saved to: ~/Music/minimax-gen/<filename>.mp3Do 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 (localize all text):
No audio player detected.
File saved to: ~/Music/minimax-gen/<filename>.mp3
Tip: Install mpv for the best playback experience (brew install mpv).Step 5: Feedback & Iteration
After playback, ask for feedback:
How was this song?
1. Love it, keep it!
2. Not quite, adjust and regenerate
3. Fine-tune lyrics/style then regenerate
4. Don't want it, start overBased on feedback:
- Satisfied: Done. Mention the file path again.
- Adjust & regenerate: Ask what to change (prompt? lyrics? style?), apply edits,
re-run generation. Keep the old file with a
_v1suffix for comparison. - Fine-tune: Enter Advanced Control Mode with the current parameters pre-filled.
- Delete & restart: Remove the file, go back to Step 0.
Cover Mode
Generate a cover version of a song based on reference audio. Model: music-cover-free.
Reference audio requirements: mp3, wav, flac — duration 6s to 6min, max 50MB. If no lyrics are provided, the original lyrics are extracted via ASR automatically.
Workflow
When the user selects Cover mode:
- Ask for the source audio — a local file path or URL
- Ask for the target cover style (e.g., "acoustic cover, stripped-down, intimate vocal")
- Optionally ask for custom lyrics or lyrics file
Commands
Cover from local file:
mmx music cover \
--prompt "<cover style description>" \
--audio-file <source.mp3> \
--out ~/Music/minimax-gen/<filename>.mp3 \
--quiet --non-interactiveCover from URL:
mmx music cover \
--prompt "<cover style description>" \
--audio <source_url> \
--out ~/Music/minimax-gen/<filename>.mp3 \
--quiet --non-interactiveWith custom lyrics (text):
mmx music cover \
--prompt "<style>" \
--audio-file <source.mp3> \
--lyrics "<custom lyrics>" \
--out ~/Music/minimax-gen/<filename>.mp3 \
--quiet --non-interactiveWith custom lyrics (file):
mmx music cover \
--prompt "<style>" \
--audio-file <source.mp3> \
--lyrics-file <lyrics.txt> \
--out ~/Music/minimax-gen/<filename>.mp3 \
--quiet --non-interactiveOptional flags
| Flag | Description |
--seed <number> | Random seed 0-1000000 for reproducible results |
--channel <n> | 1 (mono) or 2 (stereo, default) |
--format <fmt> | mp3 (default), wav, pcm |
--sample-rate <hz> | Sample rate (default: 44100) |
--bitrate <bps> | Bitrate (default: 256000) |
After generation
Proceed with normal playback and feedback flow (Step 4 & 5).
Error Handling
| Error | Action |
| mmx not found | npm install -g mmx-cli |
| mmx auth error (exit code 3) | mmx auth login |
| Quota exceeded (exit code 4) | Report quota limit, suggest waiting or upgrading |
| API timeout (exit code 5) | Retry once, then report failure |
| Content filter (exit code 10) | Adjust prompt to avoid filtered content |
| Invalid lyrics format | Auto-fix section markers, warn user |
| No audio player found | Save file and tell user the path, suggest installing mpv |
| Network error | Show error detail, suggest checking connection |
Important Notes
- Never reproduce copyrighted lyrics. When doing covers, always write original lyrics inspired by the song's theme. Explain this to the user.
- Prompt language: The API prompt works best with English tags. Chinese tags are also acceptable. Mixing is OK.
- Section markers in lyrics: The API recognizes
[verse],[chorus],[bridge],[outro],[intro]. Always include them when providing--lyrics. - File management: If
~/Music/minimax-gen/has more than 50 files, suggest cleanup when starting a new session. - Structured params: Prefer using
--genre,--mood,--vocals,--instruments,--bpmetc. over embedding everything in--prompt. This gives the API better control. - Lyrics language via style: When the user wants lyrics in a specific language, express it through the vocal description or genre (e.g., "Japanese female vocalist", "Mandopop ballad") rather than appending a language directive to the prompt.
Appendix: Prompt Writing Guide
See references/prompt_guide.md for the complete prompt writing guide, including genre/vocal/instrument references and BPM tables.
<!-- QUALITY_BASELINE_V1 -->When to use(什么时候使用)
当用户需要 在明确输入、预算和交付约束后执行生成或写入操作 时加载本技能。先从请求中提取目标、输入、约束、交付格式和验收标准;描述摘要为:Use when user wants to generate music, songs, or audio tracks. Triggers on any request involving music creation, song writing, lyrics generation, audio production, or covers. Also triggers when user provides lyrics and wants them turned into a song, or describes a mood/scene and wants background music. Supports multilingual triggers — match equivalent phrases in any language. Do NOT use for music playback of existing files, music theory questions, or music recommendation without generation.。
Rules
- 先读后写:先确认当前状态与真实能力,再执行会改变外部状态的动作。
- 权限最小化:只使用完成当前步骤所需的文件、工具、账户与网络范围。
- 证据优先:运行结果、资源 ID、版本、哈希或测试输出缺失时,明确标记为
NOT_VERIFIED。 - 幂等优先:保留请求标识与阶段状态;结果不明确时先查询,不进行盲目重试。
- 隐私安全:日志、示例、回执和错误信息不得包含 token、cookie、密钥或个人敏感数据。
Workflow
Step 1:澄清意图
确认本技能是否匹配目标;若只是相邻需求,交给更精确的技能。
Step 2:执行预检
校验输入、模型/工具能力、输出路径、预算上限和审批状态;任一关键条件未知时停止在只读阶段。
Step 3:形成计划
列出将调用的工具、会改变的对象、成功标准以及失败后的安全退出方式。
Step 4:执行动作
按一次批准执行并记录请求标识;模糊结果先查询而不是重提;每个外部调用均保留可关联的状态或回执。
Step 5:验证交付
验证产物存在性、格式、哈希/标识、成本状态和质量门禁,并把事实、推断和未验证项分开陈述。
Validation checklist
- 技能触发条件与用户意图一致,没有把相邻任务误路由到本技能。
- 输入、目标对象、版本和输出位置均已明确,且没有使用猜测值替代必填值。
- 所有写入、付费、发布或不可逆动作都在用户授权范围内。
- 结果已用独立检查验证;仅有“命令成功”或“文件存在”不算完整验收。
- 输出包含实际证据、失败/跳过项、剩余风险和可执行的下一步。
Gotchas
- 把计划当结果:文档或提示词不等于真实执行;必须标明实际运行层级。
- 错误重试:超时或响应丢失可能已经产生远端状态,先查询再决定是否重试。
- 隐式扩大范围:批量、全量、发布、覆盖和付费不是普通读写的自然延伸。
- 版本漂移:引用外部资源时记录版本、tag 或提交;不要把可变分支当发布证据。
- 证据过期:缓存、旧截图和历史测试不能证明当前环境;在交付前刷新关键证据。
不适用与边界
付费、发布、覆盖、上传或外部写入必须使用当前任务的显式授权;不自动扩大次数和预算。 如果请求需要别的技能,不复制其正文;按技能名称进行交接,并保留当前任务上下文。
Progressive disclosure
- 需要确定输入/输出、状态和授权点时,读取
references/workflow-contract.md。 - 需要交付前自检时,读取
references/validation-checklist.md。 - 遇到超时、部分成功或恢复场景时,读取
references/error-recovery.md。 - 首次运行、拒绝越权和失败恢复分别参考
examples/happy-path.md、examples/boundary-refusal.md、examples/failure-recovery.md。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

