acquiring-skills
Discover and install skills from Hermes, ClawHub, GitHub, and other registries. Load this skill whenever a user asks for a…
Generate music using ElevenLabs Music through Letta. Use when creating instrumental tracks, songs with lyrics, background music, jingles, theme songs, or any AI-generated music composition. Supports prompt-based generation and composition plans for section-by-section control.
$ npx -y skills add letta-ai/letta-code --skill music-generation --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/music-generationContext preview
The summary Claude sees to decide when to auto-load this skill.
Generate music using ElevenLabs Music through Letta. Use when creating instrumental tracks, songs with lyrics, background music, jingles, theme songs, or any AI-generated music composition. Supports prompt-based generation and composition plans for section-by-section control.
name: music-generation description: Generate music using ElevenLabs Music through Letta. Use when creating instrumental tracks, songs with lyrics, background music, jingles, theme songs, or any AI-generated music composition. Supports prompt-based generation and composition plans for section-by-section control. license: MIT
Generate music from text prompts: instrumental tracks, songs with lyrics, and fine-grained control via composition plans. Examples use `music_v2_5`, the most advanced ElevenLabs music model and the endpoint's default.
This skill is adapted from ElevenLabs' `music` skill ([elevenlabs/skills](https://github.com/elevenlabs/skills), MIT; see `LICENSE`). Instead of calling ElevenLabs with your own key, you call Letta's hosted endpoint `POST /v1/audio/music` (or `POST /v1/audio/music/stream`). It forwards the request to ElevenLabs with Letta's key and charges the organization's Letta credits, so you do not need an ElevenLabs API key. The request and response are the same as ElevenLabs "Compose music": a JSON body with the same field names, `output_format` as a query parameter, and the audio file as the response body.
base_url="${LETTA_BASE_URL%/}"
curl -sS -X POST "$base_url/v1/audio/music/stream?output_format=mp3_48000_192" \
-H "Authorization: Bearer $LETTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"A chill lo-fi hip hop beat with jazzy piano chords","music_length_ms":30000,"model_id":"music_v2_5"}' \
--output output.mp3 \
--write-out '%{http_code} %{content_type}\n'A `200` with an `audio/...` content type means `output.mp3` is the song. Any other status means `output.mp3` holds a JSON error with a `message` instead; read it (see "Error Handling") and do not share the file.
Use the runtime-provided `LETTA_BASE_URL` and `LETTA_API_KEY` together. Build URLs relative to `${LETTA_BASE_URL%/}` and do not hardcode `https://api.letta.com`. If either variable is missing, the user needs to authenticate with Letta Cloud; do not ask for an ElevenLabs key.
Generation takes a while (roughly 10-30 seconds per minute of music). Prefer `/v1/audio/music/stream`: it sends audio as it is generated, so long songs do not sit on an idle connection. `/v1/audio/music` takes the same request and returns the same file, but may send nothing until the whole song is done, so use it only for short songs. Do not set a short client timeout either way.
Share the saved file the way your current surface supports: attach or upload it to the conversation or channel you are replying in. Keep credit amounts out of replies unless the user asks about cost.
choose a length that suits the prompt.
`duration_ms` values; do not also send `music_length_ms`.
ElevenLabs' per-minute price. Before generating, the organization needs enough credits for the longest song the request allows: `music_length_ms`, the plan total, or 10 minutes when a prompt sets no length. Setting `music_length_ms` lowers that requirement.
| Model ID | Best For | |----------|----------| | `music_v2_5` | **Default.** Most advanced: best audio quality and prompt adherence. Chunk-based composition plans. | | `music_v2` | Previous generation. Chunk-based composition plans. | | `music_v1` | Oldest. Section-based composition plans. Use only when explicitly requested. |
Describe the music the way a producer would brief a session:
to control which lines land in which section.
`music_v2_5` composition plans are an ordered list of `chunks`. Each chunk specifies its own `text` (section label, lyrics, inline cues), `duration_ms`, `positive_styles`, `negative_styles`, and `context_adherence` (`low`, `medium`, or `high`, default `high`). Up to 30 chunks per plan, each 3,000–120,000 ms. Each chunk's `text` supports up to 6,132 characters, with up to 30 lines of 200 characters each. Send the plan instead of `prompt` and `music_length_ms`:
{
"model_id": "music_v2_5",
"composition_plan": {
"chunks": [
{
"text": "[Verse]\nWalking down an empty street",
"duration_ms": 15000,
"positive_styles": ["pop", "upbeat", "female vocals", "acoustic guitar", "120 BPM", "polished production"],
"negative_styles": ["dark", "slow"],
"context_adherence": "high"
},
{
"text": "[Chorus]\nThis is my moment",
"duration_ms": 15000,
"positive_styles": ["powerful vocals", "full band"],
"negative_styles": [],
"context_adherence": "high"
}
]
}
}`text`. The first chunk's styles set the overall tone — include 6–7 styles there.
For `music_v1`, plans use `positive_global_styles`, `negative_global_styles`, a
Letta Code is a stateful agent harness for creating agents that are more like people than tools. Letta Code agents have memory, identity, and a sense of experience over time.
Discover and install skills from Hermes, ClawHub, GitHub, and other registries. Load this skill whenever a user asks for a…
Control a real browser to navigate pages, click, type, fill forms, inspect rendered UI, take screenshots, or record video. Load…
Investigate and repair an agent's context — memory, system prompt, and skills — using observed behavior as evidence. Use when the…
Creates and edits trusted local Letta Code mods, including tools, slash commands, local-only model providers, lifecycle/turn…
Guide for creating effective skills. Use when creating a new skill or updating an existing one that extends Letta Code's…
Creates, edits, and enables Letta Code mod-provided slash commands. Use when the user asks to add a custom /command, slash…