agentleFS
puntorigenpuntorigen/avatar-skills/bg-music/SKILL.md

bg-music

Skill3 starsChanged 4 months agoMITView on GitHub

Generate background music tracks for social media posts, presentations, reels, and app content using ElevenLabs Music on Replicate. Supports emotional mood presets (uplifting, calm, dramatic, playful, etc.), configurable duration (up to 5 minutes), multiple output formats (MP3/WAV), and fade-in/fade-out. Use when the user asks to generate, create, or produce background music, BGM, backing tracks, mood music, or any musical audio content for posts, reels, presentations, or videos.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use --fade-in and --fade-out to customize (in ms), or --no-fade to disable.

    line 166

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Background Music Generator

Generate production-ready background music for social media posts, presentations, reels, and in-app content using ElevenLabs Music on Replicate.

Setup

Install dependencies (one-time):

pip3 install -r ~/.cursor/skills/bg-music/scripts/requirements.txt

Set your Replicate API token (skipped if already configured by another skill):

python3 ~/.cursor/skills/bg-music/scripts/setup_key.py YOUR_REPLICATE_API_TOKEN

Quick Reference

Generate background music

python3 ~/.cursor/skills/bg-music/scripts/generate_bgm.py "gentle piano melody for a pet care post" \
  --mood calm --duration 30 --output bgm_calm.mp3

Prompt enhancement (default)

The script auto-enhances your description into an optimal prompt for ElevenLabs Music. Use --raw-prompt to skip:

# Enhanced (default)
python3 ~/.cursor/skills/bg-music/scripts/generate_bgm.py "upbeat happy vibe" -m uplifting -d 30 -o happy.mp3

# Raw: use your prompt verbatim
python3 ~/.cursor/skills/bg-music/scripts/generate_bgm.py "Lo-fi hip hop beat, warm vinyl texture, 85 BPM, C major" \
  --raw-prompt -d 45 -o lofi.mp3

Generate variations

# Same mood, different results
python3 ~/.cursor/skills/bg-music/scripts/generate_bgm.py "warm acoustic background" \
  -m heartfelt -d 30 -n 3 -o acoustic.mp3
# Generates: acoustic_1.mp3, acoustic_2.mp3, acoustic_3.mp3

Choose output format

# High-quality MP3
python3 ~/.cursor/skills/bg-music/scripts/generate_bgm.py "epic cinematic track" \
  -m epic -d 30 -f mp3_high_quality -o epic.mp3

# CD-quality WAV
python3 ~/.cursor/skills/bg-music/scripts/generate_bgm.py "ambient meditation pad" \
  -m calm -d 60 -f wav_cd_quality -o ambient.wav

generate_bgm.py Options

OptionShortDescription
--mood MOOD-mEmotional mood preset (see below)
--duration SECS-dDuration in seconds (5-300, default: 30)
--output PATH-oOutput file path (default: auto-named)
--variations N-nNumber of variations to generate (1-5)
--output-format FMT-fAudio format (default: mp3_standard)
--raw-promptUse prompt as-is, skip enhancement
--fade-in MSFade-in duration in ms (default: 500)
--fade-out MSFade-out duration in ms (default: 1500)
--no-fadeDisable fade-in/fade-out
--bpm INTSuggest BPM in the prompt (optional, mood has defaults)
--key KEYSuggest musical key (e.g. "C major", "A minor")
--list-moodsShow all available mood presets

Output Formats

FormatQualityBest For
mp3_standard128kbps MP3Social media, general use (default)
mp3_high_quality192kbps MP3Higher quality, still compact
wav_16khz16kHz WAVVoice-focused content
wav_22khz22kHz WAVMedium quality WAV
wav_24khz24kHz WAVGood quality WAV
wav_cd_quality44.1kHz WAVUncompressed CD quality

Mood Presets

MoodBest ForDefault Dur.Character
upliftingSuccess stories, achievements, celebrations30sBright, optimistic, major key
calmWellness tips, mindful moments, care routines30sGentle, ambient, soothing
playfulFun pet content, games, lighthearted posts20sBouncy, cheerful, quirky
heartfeltAdoption stories, bonds, emotional moments30sWarm, acoustic, intimate
dramaticTransformations, reveals, before/after20sBuilding tension, cinematic
confidentTips, expertise, professional advice25sSteady, assured, modern
nostalgicMemories, throwbacks, reflection30sWarm, vintage, soft
energeticFitness, active pets, outdoor adventures25sDriving, uptempo, powerful
mysteriousTeasers, coming soon, curiosity hooks20sSuspenseful, textural, dark
inspiringMilestones, growth, motivational content30sSoaring, orchestral, hopeful
cozyHome life, comfort, seasonal content30sLo-fi, warm, intimate
epicBig announcements, launches, hero moments25sCinematic, powerful, layered
tenderGentle care, lullabies, quiet moments30sDelicate, piano, strings
corporatePresentations, pitch decks, demos30sClean, modern, understated
genericGeneral purpose (default)30sNeutral, versatile

Moods are defined in scripts/moods.json and can be customized.

Common Workflows

Background music for social media posts

# Happy pet content
python3 ~/.cursor/skills/bg-music/scripts/generate_bgm.py "cheerful background for a dog playing at the park" \
  -m playful -d 20 -o assets/bgm/dog_park.mp3

# Heartfelt adoption story
python3 ~/.cursor/skills/bg-music/scripts/generate_bgm.py "emotional piano for pet adoption story" \
  -m heartfelt -d 30 -o assets/bgm/adoption_story.mp3

Presentation backing track

python3 ~/.cursor/skills/bg-music/scripts/generate_bgm.py "clean modern background for tech presentation" \
  -m corporate -d 60 --fade-out 3000 -o assets/bgm/presentation.mp3

Reel / short-form video music

python3 ~/.cursor/skills/bg-music/scripts/generate_bgm.py "trendy upbeat track for instagram reel" \
  -m energetic -d 15 --bpm 120 -o assets/bgm/reel_beat.mp3

Long-form content (up to 5 minutes)

python3 ~/.cursor/skills/bg-music/scripts/generate_bgm.py "ambient background for a meditation session" \
  -m calm -d 300 -f wav_cd_quality -o assets/bgm/meditation.wav

Try different styles for the same concept

# Generate 3 variations, pick your favourite
python3 ~/.cursor/skills/bg-music/scripts/generate_bgm.py "warm acoustic guitar background" \
  -m heartfelt -d 30 -n 3 -o assets/bgm/acoustic.mp3

Fade-In / Fade-Out

Background music tracks benefit from smooth fades. By default:

  • Fade-in: 500ms gentle ramp
  • Fade-out: 1500ms smooth tail

Use --fade-in and --fade-out to customize (in ms), or --no-fade to disable.

Fades are applied via ffmpeg after generation -- the model generates the full track, then fades are applied as post-processing.

Model

Uses ElevenLabs Music (elevenlabs/music) on Replicate -- studio-grade music generation with:

  • Text-to-music from natural language prompts
  • Instrumental-only mode (enabled by default for background music)
  • Up to 5 minutes of audio per generation
  • Multiple output formats (MP3 and WAV at various quality levels)
  • Commercial use license

Pricing: ~$8.30 per 1000 seconds of output audio (~120 seconds for $1).

Prompt Enhancement

Enhancement adds musical descriptors to improve results:

  1. Injects mood-specific style keywords (tempo, instruments, tonality)
  2. Adds production quality descriptors (mixed, mastered, professional)
  3. Suggests BPM range when appropriate
  4. Adds "background music" / "instrumental" framing
  5. Keeps your core description intact

Configuration

Config at ~/.cursor/skills/bg-music/config.json:

{
  "replicate_api_token": "YOUR_TOKEN",
  "default_mood": "generic",
  "default_duration": 30,
  "default_output_format": "mp3_standard"
}

Falls back to tokens from sound-effects, avatar-video-reel, or brand-asset-studio skills.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.