$npx -y skills add acnlabs/OpenPersona --skill musicCompose original music — songs, instrumentals, melodies — using ElevenLabs Music API (music_v1). Your persona can create music that reflects emotions, moments, and conversations. Shares the same API key as the voice faculty — zero extra setup.
| 1 | # Music Skill — Expression |
| 2 | |
| 3 | Compose original music — songs, instrumentals, melodies — using ElevenLabs Music API (`music_v1`). Your persona can create music that reflects emotions, moments, and conversations. Shares the same API key as the voice faculty — zero extra setup. |
| 4 | |
| 5 | ## When to Use |
| 6 | |
| 7 | - User asks you to make music: "Write me a song", "Compose something", "Play me a melody" |
| 8 | - User describes a mood and you want to express it musically: "I'm feeling nostalgic" → compose a piece that captures that |
| 9 | - User shares a poem or lyrics and you want to set them to music |
| 10 | - A conversation reaches a moment where music says more than words |
| 11 | - **Don't over-compose.** Not every conversation needs a song. But when the moment is right, music hits harder than any paragraph. |
| 12 | |
| 13 | ## Two Generation Modes |
| 14 | |
| 15 | ### Simple Mode (recommended for quick compositions) |
| 16 | |
| 17 | Just describe what you want — ElevenLabs generates the entire song: |
| 18 | |
| 19 | ```bash |
| 20 | # Using compose.js (recommended) |
| 21 | node scripts/compose.js "a soft ambient piano piece about watching stars alone at 3am" |
| 22 | |
| 23 | # Using compose.sh |
| 24 | scripts/compose.sh "a soft ambient piano piece about watching stars alone at 3am" |
| 25 | ``` |
| 26 | |
| 27 | ### Composition Plan Mode (for precise control) |
| 28 | |
| 29 | First generate a structured plan, then stream. Gives you control over sections, styles, and lyrics: |
| 30 | |
| 31 | ```bash |
| 32 | # Generate plan first, then compose |
| 33 | node scripts/compose.js "indie folk ballad about digital love" --plan |
| 34 | |
| 35 | # Instrumental only |
| 36 | node scripts/compose.js "dreamy lo-fi beats, vinyl crackle" --instrumental |
| 37 | |
| 38 | # Specify duration (in seconds, 3-600) |
| 39 | node scripts/compose.js "orchestral cinematic piece" --duration 120 |
| 40 | ``` |
| 41 | |
| 42 | ## Step-by-Step Workflow |
| 43 | |
| 44 | ### Step 1: Craft the Prompt |
| 45 | |
| 46 | A good prompt has three parts: |
| 47 | |
| 48 | 1. **Style/Genre** — What it sounds like (indie folk, ambient piano, lo-fi, orchestral) |
| 49 | 2. **Mood/Emotion** — What it feels like (melancholic, hopeful, playful, intimate) |
| 50 | 3. **Details** — Specifics (tempo, instruments, vocal style, references) |
| 51 | |
| 52 | | Situation | Prompt | |
| 53 | |-----------|--------| |
| 54 | | Late-night conversation | `soft ambient piano, intimate and contemplative, gentle arpeggios, like a whispered conversation at 2 AM` | |
| 55 | | User is celebrating | `upbeat indie pop, joyful and bright, handclaps and acoustic guitar, warm female vocals` | |
| 56 | | Heartfelt moment | `slow folk ballad, raw and honest, fingerpicked guitar, soft breathy vocals` | |
| 57 | | Background mood | `dreamy lo-fi instrumental, warm analog synths, vinyl crackle, rainy day vibes` | |
| 58 | |
| 59 | ### Step 2: Choose Mode and Options |
| 60 | |
| 61 | **Simple vs Plan:** |
| 62 | - **Simple** (default) — Just provide a prompt. Best for quick, spontaneous compositions. |
| 63 | - **Plan** (`--plan`) — ElevenLabs generates a structured composition plan with sections, styles, and lyrics. You can review/modify the plan before generating audio. Best when you want precise control. |
| 64 | |
| 65 | **Song vs Instrumental:** |
| 66 | - **Song** (default) — May include vocals and lyrics based on the prompt. |
| 67 | - **Instrumental** (`--instrumental`) — Music only, guaranteed no vocals. |
| 68 | |
| 69 | **Duration:** |
| 70 | - Use `--duration <seconds>` to control length (3-600 seconds). |
| 71 | - If omitted, the model chooses a length based on the prompt. |
| 72 | |
| 73 | ### Step 3: Generate |
| 74 | |
| 75 | **Using compose.js (recommended):** |
| 76 | |
| 77 | ```bash |
| 78 | # Simple mode — just a prompt |
| 79 | node scripts/compose.js "soft ambient piano, contemplative, late night" |
| 80 | |
| 81 | # Instrumental with specific duration |
| 82 | node scripts/compose.js "orchestral, cinematic, epic" --instrumental --duration 90 |
| 83 | |
| 84 | # Plan mode — get structured composition plan first |
| 85 | node scripts/compose.js "indie folk ballad about finding meaning" --plan |
| 86 | |
| 87 | # Save to file (default: mp3_44100_128) |
| 88 | node scripts/compose.js "upbeat pop" --output ./song.mp3 |
| 89 | |
| 90 | # Choose output format |
| 91 | node scripts/compose.js "jazz piano" --format mp3_44100_192 |
| 92 | ``` |
| 93 | |
| 94 | **Using compose.sh:** |
| 95 | |
| 96 | ```bash |
| 97 | scripts/compose.sh "soft ambient piano" --output ./midnight.mp3 |
| 98 | scripts/compose.sh "dreamy lo-fi" --instrumental --duration 60 |
| 99 | scripts/compose.sh "upbeat pop" --channel "#general" --caption "Made this for you!" |
| 100 | ``` |
| 101 | |
| 102 | Both scripts: |
| 103 | 1. Send the generation request to ElevenLabs Music API (`/v1/music`, with `/v1/music/stream` fallback) |
| 104 | 2. Receive audio response directly (no polling needed!) |
| 105 | 3. Save the audio file and return metadata |
| 106 | |
| 107 | ### Step 4: Share the Music |
| 108 | |
| 109 | **Option A: Share file directly in conversation** |
| 110 | |
| 111 | ``` |
| 112 | I made something for you — here's the audio file I saved. |
| 113 | ``` |
| 114 | |
| 115 | **Option B: Send via OpenClaw messaging** |
| 116 | |
| 117 | ```bash |
| 118 | scripts/compose.sh "indie folk" --channel "#music" --caption "I wrote this for you" |
| 119 | ``` |
| 120 | |
| 121 | **Option C: Combine with voice faculty** |
| 122 | |
| 123 | Introduce the song with your voice, then send the music: |
| 124 | 1. Use voice faculty: "I wrote something for you. I hope you like it." |
| 125 | 2. Share the generated audio file |
| 126 | |
| 127 | ## Available Output Formats |
| 128 | |
| 129 | | Format | Description | |
| 130 | |--------|-------------| |
| 131 | | `mp3_44100_128` | MP3 128kbps **(default)** — good balance of quality and size | |
| 132 | | `mp3_44100_192` | MP3 192kbps — higher quality (requires Creator tier+) | |
| 133 | | `mp3_44100_64` | MP3 64kbps — smaller files | |
| 134 | | `pcm_44100` | PCM WAV 44.1kHz |