music-generation · bytedance — скилл для Claude Code: генерация музыки
Скилл music-generation собирает трек по описанию стиля и настроения через MiniMax music API — с вокалом на заданные слова или чисто инструментальный.
MIT 314 установок ★ 85 586 обновлён 2026-10-25
npx skills add bytedance/deer-flow --skill music-generation -a claude-codeЧто делает music-generation
Скилл превращает текстовый запрос в песню: агент пишет JSON-спецификацию с полями title, prompt (стиль, настроение, сцена) и опционально lyrics, затем запускает scripts/generate.py с путями к спеку и выходному MP3. Если лирику не задать, модель сама придумывает слова из prompt; флаг is_instrumental: true убирает вокал вовсе.
Для несущих языков текст пишется на целевом языке прямо в lyrics, со структурными тегами вроде [Verse] и [Chorus]. Готовый файл агент отдаёт пользователем через present_files и предлагает доработать стиль или слова.
Без переменной окружения MINIMAX_API_KEY скрипт не обратится к API; модель по умолчанию — music-2.6-free, для платных лимитов можно указать MINIMAX_MUSIC_MODEL=music-2.6.
Какие задачи решает
- сочинить фоновую музыку под сцену или настроение
- написать джингл или тему для проекта
- сгенерировать инструментальный трек без вокала
- положить готовую лирику на музыку в нужном стиле
- получить песню на выбранном языке по текстовому описанию
Примеры запросов агенту
- Сделай меланхоличный инди-фолк трек про дождливый вечер в кафе
- Сгенерируй инструментальную фоновую музыку в стиле лёгкого джаза
- Напиши песню с этими словами в стиле поп-баллады
Как установить music-generation
1Через Skills CLI (Vercel)
npx skills add bytedance/deer-flow --skill music-generation -a claude-code2Вручную: положить файлы
~/.claude/skills/music-generation/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/music-generation/
1Через Skills CLI (Vercel)
npx skills add bytedance/deer-flow --skill music-generation -a codex2Вручную: положить файлы
.agents/skills/music-generation/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add bytedance/deer-flow --skill music-generation -a cursor2Вручную: положить файлы
.cursor/skills/music-generation/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install bytedance/deer-flow skills/public/music-generation2Вручную: положить файлы
.github/skills/music-generation/SKILL.md1Через Skills CLI (Vercel)
npx skills add bytedance/deer-flow --skill music-generation -a gemini-cli2Командой платформы
gemini skills install https://github.com/bytedance/deer-flow --path skills/public/music-generationВручную: положить файлы
.devin/skills/music-generation/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add bytedance/deer-flow --skill music-generation -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о music-generation
Как установить music-generation в Claude Code?
Выполните npx skills add bytedance/deer-flow --skill music-generation -a claude-code, после чего скилл появится в ~/.claude/skills/music-generation/SKILL.md.
Что делает music-generation?
Скилл собирает JSON-спецификацию со стилем, настроением и опциональной лирикой, передаёт её в скрипт generate.py, который обращается к MiniMax music API и возвращает MP3-файл с треком.
Что нужно для работы music-generation?
Нужен ключ MINIMAX_API_KEY в переменных окружения; модель по умолчанию music-2.6-free, а для более высоких лимитов можно подключить music-2.6 на платном тарифе.
Исходный текст
SKILL.md · MIT
---
name: music-generation
description: Use this skill when the user requests to generate, create, compose, or produce music or songs — background music, theme songs, jingles, or instrumental tracks. Generates a song from a style/mood prompt and optional lyrics via the MiniMax music API.
---
# Music Generation Skill
## Overview
This skill generates songs (vocal or instrumental) from a structured JSON spec using the
MiniMax music generation API (`/v1/music_generation`). You describe the style/mood/scene in
`prompt`, optionally provide `lyrics`, and the script returns an MP3.
## Workflow
### Step 1: Understand Requirements
Identify the desired style, mood, scene, language, and whether the user wants vocals or a
pure instrumental track. Decide whether to supply lyrics or let the model write them.
### Step 2: Create the Spec JSON
Write a JSON file in `/mnt/user-data/workspace/` named `{descriptive-name}.json`:
```json
{
"title": "Rainy Night Cafe",
"prompt": "indie folk, melancholic, introspective, walking alone, cafe",
"lyrics": "[verse]\nStreetlights glow the night wind sighs\n[chorus]\nPush the wooden door warm air inside"
}
```
Fields:
- `title` (optional): a human-readable name.
- `prompt` (required): style, mood, and scene. Drives the musical character.
- `lyrics` (optional): song lyrics. Use `\n` between lines and structure tags such as
`[Intro]`, `[Verse]`, `[Pre Chorus]`, `[Chorus]`, `[Bridge]`, `[Outro]`.
- `is_instrumental` (optional, bool): set `true` for a pure instrumental track (no lyrics needed).
Behavior:
- `lyrics` provided → those lyrics are sung.
- `is_instrumental: true` → instrumental, no vocals.
- neither → the model auto-writes lyrics from `prompt` (`lyrics_optimizer`).
### Step 3: Execute Generation
```bash
python /mnt/skills/public/music-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/rainy-night-cafe.json \
--output-file /mnt/user-data/outputs/rainy-night-cafe.mp3
```
Parameters:
- `--prompt-file`: Absolute path to the JSON spec (required).
- `--output-file`: Absolute path for the output MP3 (required).
[!NOTE]
Do NOT read the python file, just call it with the parameters.
## Environment
- `MINIMAX_API_KEY` (required): your MiniMax interface key.
- `MINIMAX_API_HOST` (optional): default `https://api.minimaxi.com`.
- `MINIMAX_MUSIC_MODEL` (optional): default `music-2.6-free` (works for all API-key users);
paid/Token-Plan users can set `music-2.6` for higher limits.
## Output Handling
- Music is saved as MP3 (typically in `/mnt/user-data/outputs/`).
- Returned audio must decode to nonempty bytes and have an ID3 tag header or MPEG frame signature. This is a header sanity check, not complete audio decoding.
- Malformed, empty or unrecognized audio is rejected before creating the output directory or opening the output file; an existing output is preserved.
- Missing audio reports "MiniMax returned no audio data"; whitespace-only hex reports "MiniMax audio decoded to empty bytes".
- Share the generated file with the user using the present_files tool.
- Offer to iterate on style or lyrics if adjustments are needed.
## Notes
- Keep `prompt` focused on style/mood/scene; put the actual sung words in `lyrics`.
- For non-English songs, write `lyrics` in the target language.
© bytedance · MIT · bytedance/deer-flow
Похожие скиллы
Все скиллы по теме «ИИ и ML» →Сначала — music-generation от других авторов.