
music-generator
Generate AI music with ElevenLabs Music API. Use for: background music, soundtracks, jingles, theme songs, instrumental tracks, AI music composition.
- Installs
- 167
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/aviz85/claude-skills-library --skill music-generator- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads music-generator automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Music Generator
First time? If
setup_complete: falseabove, run./SETUP.mdfirst, then setsetup_complete: true.
Generate custom AI music using ElevenLabs Music API with detailed composition control.
Features
- Simple Mode: Generate music from a text prompt
- Detailed Mode: Create multi-section compositions with precise control over styles, moods, and transitions
- Instrumental or Vocal: Support for both instrumental and vocal tracks
- Custom Duration: Generate tracks from 15 seconds to 5 minutes
Quick Start
cd ~/.claude/skills/music-generator/scripts
# Simple prompt-based generation
npx ts-node generate_music.ts \
--prompt "Uplifting corporate music with electronic beats" \
--duration 60 \
--output /path/to/music.mp3
# List available styles
npx ts-node generate_music.ts --list-styles
Composition Modes
1. Simple Mode (--prompt)
Generate music from a single text prompt:
npx ts-node generate_music.ts \
--prompt "Energetic workout music with driving beats and motivational synths" \
--duration 90 \
--output workout.mp3
2. Detailed Mode (--composition)
Create multi-section compositions with JSON config:
npx ts-node generate_music.ts \
--composition /path/to/composition.json \
--output epic-track.mp3
Composition JSON Format:
{
"duration_ms": 80000,
"instrumental": true,
"positive_global_styles": ["corporate", "motivational", "electronic"],
"negative_global_styles": ["sad", "aggressive", "heavy metal"],
"sections": [
{
"section_name": "Intro",
"duration_ms": 20000,
"positive_local_styles": ["building momentum", "soft start"],
"negative_local_styles": ["loud", "intense"],
"lines": []
},
{
"section_name": "Main Theme",
"duration_ms": 40000,
"positive_local_styles": ["energetic", "uplifting", "driving rhythm"],
"negative_local_styles": ["slow", "mellow"],
"lines": []
},
{
"section_name": "Outro",
"duration_ms": 20000,
"positive_local_styles": ["triumphant", "resolution"],
"negative_local_styles": ["abrupt ending"],
"lines": []
}
]
}
Style Guide
Positive Global Styles (Overall Track Feel)
Moods:
- uplifting, inspiring, motivational, peaceful, energetic
- dramatic, epic, emotional, nostalgic, mysterious
- playful, cheerful, romantic, melancholic
Genres:
- corporate, cinematic, electronic, ambient, orchestral
- pop, rock, jazz, classical, world music
- lo-fi, hip-hop, EDM, acoustic, folk
Instruments:
- piano, guitar, strings, synths, drums
- brass, woodwinds, percussion, bass
Negative Global Styles (What to Avoid)
- aggressive, dark, scary, chaotic
- heavy metal, death metal, harsh noise
- explicit, profane
Section-Specific Styles
Use positive_local_styles and negative_local_styles to control individual sections:
Intro Styles:
- soft opening, building momentum, atmospheric
- gentle start, mysterious intro
Peak/Chorus Styles:
- energetic peak, driving rhythm, powerful
- emotional climax, triumphant
Outro Styles:
- gentle fade, triumphant ending, resolution
- nostalgic close, hopeful conclusion
Command Options
| Option | Short | Description |
|---|---|---|
--prompt | -p | Text prompt for simple mode |
--composition | -c | JSON file for detailed mode |
--duration | -d | Duration in seconds (simple mode) |
--output | -o | Output file path (required) |
--instrumental | -i | Generate instrumental track |
--format | -f | Output format (mp3_44100_192, mp3_44100_128) |
--list-styles | Show available styles | |
--help | -h | Show help |
Examples
Corporate Background Music
npx ts-node generate_music.ts \
-p "Professional corporate background music, uplifting and modern, suitable for presentations" \
-d 120 \
-i \
-o corporate-bg.mp3
Podcast Intro
npx ts-node generate_music.ts \
-p "Catchy podcast intro music, energetic and memorable, with electronic elements" \
-d 15 \
-o podcast-intro.mp3
Video Game Theme
npx ts-node generate_music.ts \
-p "Epic fantasy adventure theme with orchestral instruments and heroic melodies" \
-d 180 \
-i \
-o game-theme.mp3
Multi-Section Composition
Create a file my-composition.json:
{
"duration_ms": 120000,
"instrumental": true,
"positive_global_styles": ["cinematic", "epic", "orchestral"],
"negative_global_styles": ["electronic", "modern"],
"sections": [
{
"section_name": "Dawn",
"duration_ms": 30000,
"positive_local_styles": ["soft", "mysterious", "building anticipation"],
"negative_local_styles": ["loud", "fast"],
"lines": []
},
{
"section_name": "Battle",
"duration_ms": 50000,
"positive_local_styles": ["intense", "driving", "heroic"],
"negative_local_styles": ["peaceful", "slow"],
"lines": []
},
{
"section_name": "Victory",
"duration_ms": 40000,
"positive_local_styles": ["triumphant", "emotional", "uplifting"],
"negative_local_styles": ["sad", "mellow"],
"lines": []
}
]
}
Then generate:
npx ts-node generate_music.ts \
-c my-composition.json \
-o epic-journey.mp3
API Limits
- Maximum duration: 330 seconds (5.5 minutes)
- Minimum duration: 15 seconds
- Generation time: ~30-60 seconds per track
- Cost: ~$0.05-0.15 per generation (varies by duration)
Troubleshooting
"Invalid API key": Check .env file has valid ELEVENLABS_API_KEY
"Duration too long": Maximum is 330 seconds (5.5 minutes)
"Validation error": Ensure composition JSON has all required fields:
positive_global_styles(array)negative_global_styles(array)sectionswithsection_name,duration_ms,positive_local_styles,negative_local_styles,lines
FAQ
What does the music-generator skill do?
Generate AI music with ElevenLabs Music API. Use for: background music, soundtracks, jingles, theme songs, instrumental tracks, AI music composition.
How do I install music-generator?
Run npx skills add https://github.com/aviz85/claude-skills-library --skill music-generator in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/music-generator/ (personal) or .claude/skills/music-generator/ (project).
Which AI agents can use music-generator?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is music-generator safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains music-generator?
It is published by aviz85 in aviz85/claude-skills-library. It has 167 recorded installs.
More from aviz85/claude-skills-library
html-to-pdf
aviz85/claude-skills-library
Convert HTML to PDF with pixel-perfect rendering and excellent Hebrew/RTL support. Use when the user asks to 'convert HTML to PDF', 'generate PDF from HTML', 'create PDF from webpage', 'export to PDF', or needs PDF generation with Hebrew text support.
youtube-uploader
aviz85/claude-skills-library
Upload videos to YouTube with title, description, tags. Use for: youtube upload, publish video, share on youtube.
gh-pages-deploy
aviz85/claude-skills-library
Deploy static or interactive frontend content to GitHub Pages using gh CLI. Use when the user wants to publish, share, or make accessible any HTML/CSS/JS content - including demos, prototypes, visualizations, landing pages, portfolios, documentation, interactive tools, games, or any browser-based project. Activate whenever content needs to be publicly viewable via URL, not just when "website" is explicitly mentioned.
presentation-architect
aviz85/claude-skills-library
Open the skill to read its SKILL.md instructions.
wordpress-publisher
aviz85/claude-skills-library
Publish posts to WordPress. Use for: publish blog post, upload to WordPress, פרסם בבלוג.
html-to-pptx
aviz85/claude-skills-library
Convert HTML to PowerPoint (PPTX) with excellent Hebrew/RTL support. Use when the user asks to 'convert HTML to PowerPoint', 'create presentation from HTML', 'generate PPTX', 'make slides from HTML', or needs to create PowerPoint presentations programmatically.
Popular media & creative skills
hyperframes
heygen-com/hyperframes
Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.
media-use
heygen-com/hyperframes
Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.
hyperframes-registry
heygen-com/hyperframes
About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.
hyperframes-creative
heygen-com/hyperframes
Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.
ai-video-generation
101-skills/superpowers
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse
ai-image-generation
101-skills/superpowers
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image