/byted-music-generate
Generate music using Volcengine Imagination API. Supports vocal songs, instrumental BGM, and lyrics generation. Use when the user wants to create songs, background music, soundtracks, write lyrics, or mentions "music generation", "BGM", or "songwriting".
$ npx -y skills add bytedance/agentkit-samples --skill byted-music-generate --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/byted-music-generate
Context preview
The summary Claude sees to decide when to auto-load this skill.
Generate music using Volcengine Imagination API. Supports vocal songs, instrumental BGM, and lyrics generation. Use when the user wants to create songs, background music, soundtracks, write lyrics, or mentions "music generation", "BGM", or "songwriting".
SKILL.md
byted-music-generate.SKILL.mdname: byted-music-generate
description: Generate music using Volcengine Imagination API. Supports vocal songs, instrumental BGM, and lyrics generation. Use when the user wants to create songs, background music, soundtracks, write lyrics, or mentions "music generation", "BGM", or "songwriting".
license: Complete terms in LICENSE
Music Generate Skill
Generate music using the [Volcengine Music Generation API](https://www.volcengine.com/docs/84992). Supports vocal songs, instrumental BGM, and AI lyrics generation.
Trigger Conditions
1. User wants to generate a song (with lyrics or a text prompt) 2. User needs background music, instrumental tracks, or soundtracks 3. User wants AI-generated lyrics 4. User mentions "write a song", "music generation", "BGM", "background music", "lyrics"
Environment Variables
Two authentication methods are supported (gateway takes priority):
**Option 1: API Gateway (recommended)**
- `ARK_SKILL_API_BASE` — API gateway base URL
- `ARK_SKILL_API_KEY` — API gateway authentication key
**Option 2: Direct AK/SK**
- `VOLCENGINE_ACCESS_KEY` — AccessKey ID
- `VOLCENGINE_SECRET_KEY` — AccessKey Secret
- How to obtain: [Volcengine Console](https://console.volcengine.com/) → Account → Key Management → Create Key
Usage
1. Determine user intent and select the mode (`song` / `bgm` / `lyrics`). 2. `cd` to the skill directory: `skills/byted-music-generate`. 3. Run the script. The script polls the API internally and may take **several minutes** to complete (typically 1–5 minutes for song/bgm). 4. **Monitor execution**: If the runtime environment moves the command to background, you MUST periodically (every 10 seconds) read the terminal output to check whether the script has finished. The script prints polling progress to stderr and outputs a single JSON line to stdout upon completion. 5. Once completed, return the `audio_url` or `lyrics` from the JSON output to the user.
Three Modes
1. song — Vocal Song
User provides lyrics (Lyrics) or a text prompt (Prompt) to generate a vocal song.
# With text prompt
python scripts/music_generate.py song --prompt "A song about summer at the beach" --genre Pop --gender Female
# With lyrics
python scripts/music_generate.py song --lyrics "[verse]\nMoonlight on the windowsill\nMemories flowing like water\n[chorus]\nYou are my moonlight" --genre Folk --mood "Sentimental/Melancholic/Lonely"
**Note**: `--lyrics` and `--prompt` are mutually exclusive; lyrics takes priority. If the user hasn't provided lyrics, you can first use the `lyrics` mode to generate them, then pass the result to the `song` mode.
2. bgm — Instrumental BGM
Describe the desired music in natural language. The v5.0 model does not require Genre/Mood parameters — just describe everything in the `--text` field.
python scripts/music_generate.py bgm --text "Relaxed coffee shop ambiance music with piano and guitar" --duration 60
# With song structure segments
python scripts/music_generate.py bgm --text "Epic game soundtrack" --segments '[{"Name":"intro","Duration":10},{"Name":"chorus","Duration":30}]'3. lyrics — Lyrics Generation
Returns synchronously (no polling needed). Can be used standalone or as a pre-step for the `song` mode.
python scripts/music_generate.py lyrics --prompt "A song about graduation farewell" --genre Folk --mood "Sentimental/Melancholic/Lonely" --gender Female
Manual Task Query (timeout fallback)
python scripts/music_generate.py query --task-id "202601397834584670076931"
Mode Detection Logic
User Request
↓
Contains "instrumental/BGM/background music/soundtrack"?
├─ Yes → bgm mode
└─ No → Contains "lyrics/write lyrics" and does NOT request audio?
├─ Yes → lyrics mode
└─ No → song mode
├─ User provided lyrics → --lyrics
└─ User only described a theme → --prompt (or lyrics first, then song)Script Parameters
song mode
| Parameter | Required | Description | |-------------------|----------|------------------------------------------------------| | `--lyrics` | either | Lyrics with structure tags | | `--prompt` | either | Text prompt (Chinese, 5-700 chars) | | `--model-version` | no | `v4.0` or `v4.3` (default: v4.3) | | `--genre` | no | Music genre | | `--mood` | no | Music mood | | `--gender` | no | `Female` / `Male` | | `--timbre` | no | Vocal timbre | | `--duration` | no | Duration in seconds [30-240] | | `--key` | no | Musical key (v4.3 only) | | `--kmode` | no | `Major` / `Minor` (v4.3 only) | | `--tempo` | no | Tempo (v4.3 only) | | `--instrument` | no | Instruments, comma-separated (v4.3 only) | | `--genre-extra` | no | Secondary genres, comma-separated, max 2 (v4.3 only) | | `--scene` | no | Scene tags, comma-separated (v4.3 only) | | `--lang` | no | Language (v4.3 only) | | `--vod-format` | no | `wav` / `mp3` (v4.3 only) | | `--billing` | no | `prepaid` / `postpaid` (default: postpaid) | | `--timeout` | no | Max wait seconds (default: 300) |
bgm mode
| Parameter | Required | Description | |--------------------------|----------|----------------------------------------| | `--text` | yes | Natural language description
Read more
name: byted-music-generate description: Generate music using Volcengine Imagination API. Supports vocal songs, instrumental BGM, and lyrics generation. Use when the user wants to create songs, background music, soundtracks, write lyrics, or mentions "music generation", "BGM", or "songwriting". license: Complete terms in LICENSE
Music Generate Skill
Generate music using the [Volcengine Music Generation API](https://www.volcengine.com/docs/84992). Supports vocal songs, instrumental BGM, and AI lyrics generation.
Trigger Conditions
1. User wants to generate a song (with lyrics or a text prompt) 2. User needs background music, instrumental tracks, or soundtracks 3. User wants AI-generated lyrics 4. User mentions "write a song", "music generation", "BGM", "background music", "lyrics"
Environment Variables
Two authentication methods are supported (gateway takes priority):
**Option 1: API Gateway (recommended)**
- `ARK_SKILL_API_BASE` — API gateway base URL
- `ARK_SKILL_API_KEY` — API gateway authentication key
**Option 2: Direct AK/SK**
- `VOLCENGINE_ACCESS_KEY` — AccessKey ID
- `VOLCENGINE_SECRET_KEY` — AccessKey Secret
- How to obtain: [Volcengine Console](https://console.volcengine.com/) → Account → Key Management → Create Key
Usage
1. Determine user intent and select the mode (`song` / `bgm` / `lyrics`). 2. `cd` to the skill directory: `skills/byted-music-generate`. 3. Run the script. The script polls the API internally and may take **several minutes** to complete (typically 1–5 minutes for song/bgm). 4. **Monitor execution**: If the runtime environment moves the command to background, you MUST periodically (every 10 seconds) read the terminal output to check whether the script has finished. The script prints polling progress to stderr and outputs a single JSON line to stdout upon completion. 5. Once completed, return the `audio_url` or `lyrics` from the JSON output to the user.
Three Modes
1. song — Vocal Song
User provides lyrics (Lyrics) or a text prompt (Prompt) to generate a vocal song.
# With text prompt python scripts/music_generate.py song --prompt "A song about summer at the beach" --genre Pop --gender Female # With lyrics python scripts/music_generate.py song --lyrics "[verse]\nMoonlight on the windowsill\nMemories flowing like water\n[chorus]\nYou are my moonlight" --genre Folk --mood "Sentimental/Melancholic/Lonely"
**Note**: `--lyrics` and `--prompt` are mutually exclusive; lyrics takes priority. If the user hasn't provided lyrics, you can first use the `lyrics` mode to generate them, then pass the result to the `song` mode.
2. bgm — Instrumental BGM
Describe the desired music in natural language. The v5.0 model does not require Genre/Mood parameters — just describe everything in the `--text` field.
python scripts/music_generate.py bgm --text "Relaxed coffee shop ambiance music with piano and guitar" --duration 60
# With song structure segments
python scripts/music_generate.py bgm --text "Epic game soundtrack" --segments '[{"Name":"intro","Duration":10},{"Name":"chorus","Duration":30}]'3. lyrics — Lyrics Generation
Returns synchronously (no polling needed). Can be used standalone or as a pre-step for the `song` mode.
python scripts/music_generate.py lyrics --prompt "A song about graduation farewell" --genre Folk --mood "Sentimental/Melancholic/Lonely" --gender Female
Manual Task Query (timeout fallback)
python scripts/music_generate.py query --task-id "202601397834584670076931"
Mode Detection Logic
User Request
↓
Contains "instrumental/BGM/background music/soundtrack"?
├─ Yes → bgm mode
└─ No → Contains "lyrics/write lyrics" and does NOT request audio?
├─ Yes → lyrics mode
└─ No → song mode
├─ User provided lyrics → --lyrics
└─ User only described a theme → --prompt (or lyrics first, then song)Script Parameters
song mode
| Parameter | Required | Description | |-------------------|----------|------------------------------------------------------| | `--lyrics` | either | Lyrics with structure tags | | `--prompt` | either | Text prompt (Chinese, 5-700 chars) | | `--model-version` | no | `v4.0` or `v4.3` (default: v4.3) | | `--genre` | no | Music genre | | `--mood` | no | Music mood | | `--gender` | no | `Female` / `Male` | | `--timbre` | no | Vocal timbre | | `--duration` | no | Duration in seconds [30-240] | | `--key` | no | Musical key (v4.3 only) | | `--kmode` | no | `Major` / `Minor` (v4.3 only) | | `--tempo` | no | Tempo (v4.3 only) | | `--instrument` | no | Instruments, comma-separated (v4.3 only) | | `--genre-extra` | no | Secondary genres, comma-separated, max 2 (v4.3 only) | | `--scene` | no | Scene tags, comma-separated (v4.3 only) | | `--lang` | no | Language (v4.3 only) | | `--vod-format` | no | `wav` / `mp3` (v4.3 only) | | `--billing` | no | `prepaid` / `postpaid` (default: postpaid) | | `--timeout` | no | Max wait seconds (default: 300) |
bgm mode
| Parameter | Required | Description | |--------------------------|----------|----------------------------------------| | `--text` | yes | Natural language description
欢迎来到 AgentKit 代码工坊(Samples)仓库! AgentKit 是火山引擎推出的企业级 AI Agent 开发平台,为开发者提供完整的 Agent 构建、部署和运维解决方案。平台通过标准化的开发工具链和云原生基础设施,显著降低复杂智能体应用的开发部署门槛。 本代码库包含了一系列示例和教程,帮助您理解、实现和集成 AgentKit 的各项功能到您的应用中。
Other skills on agentkit-samples.
- /code-optimization
Optimize code performance through iterative improvements (max 2 rounds). Benchmark execution time and memory usage, compare against baseline implementations, and generate detailed optimization reports. Supports C++, Python, Java, Rust, and other languages.
Open skill - /image-video-gen
根据文字描述生成视频,一个生成图片和视频的工作流技能。依赖 skills: byted-web-search, image-generate, video-generate。注意:此 workflow 没有执行脚本,只是一个描述性的文档。
Open skill - /skills-management
Manage AgentKit skills, SkillHub/skillhub, skill centers, and skill spaces. Use this skill whenever the user has a management intent for AgentKit skills, skill中心, skill 空间, skill space, or skill hub, including listing, inspecting, downloading, fetching, uploading, publishing,
Open skill - /tos-file-access
Upload files or directories to TOS-compatible object storage for Volcano Engine or BytePlus and download files from URLs. Use this skill when (1) Upload Agent-generated files or directories for sharing, (2) Download files from URLs before Agent processing.
Open skill - /veadk-go-skills
根据用户的功能需求,完成与 VeADK-Go 相关的功能; 包括:直接根据需求生成 Agent;将Enio Agent转换为VeADK-Go Agent。
Open skill - /veadk-skills
根据用户的功能需求,完成与 VeADK 相关的功能。
Open skill

