agentleFS
DojoCodingLabsDojoCodingLabs/remotion-superpowers/skills/add-music/SKILL.md

add-music

Skill153 starsChanged 16 days agoMITView on GitHub

Generate background music and add it to your Remotion project. Describe the mood/genre you want, and this will generate a commercially licensed track with Eleven Music (official ElevenLabs music skill) and wire it into your composition with proper fade in/out.

  • Reads credentials
  • Installs packages

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If not already described, ask the user:

    line 16
  2. Very specific:

    If ELEVENLABS_API_KEY isn't set for the project, run npx -y @elevenlabs/cli@latest onboard init from the project root and follow what it …

    line 26
  3. Very specific:

    Run node scripts/generate-audio.ts from the project root.

    line 36
  4. Distinctive:

    Don't name artists, bands or song lyrics in the prompt.

    line 44
  5. Very specific:

    Place it with <Audio> from @remotion/media (install with npx remotion add @remotion/media), following the official remotion-markup skill …

    line 52
  6. Very specific:

    If the project has a voiceover, implement volume ducking — lower music to 0.1 during narration, 0.3 during silent parts.

    line 74
  7. Very specific:

    If Studio isn't running, start it with npx remotion studio (or --no-open with an in-app browser, then open the URL it prints).

    line 78

≈ “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

Add Music — Generate & Integrate Background Music

You are helping the user add background music to their Remotion project.

Load the remotion-production skill for the music-scoring and audio-integration rules, and the official ElevenLabs music skill (npx skills add elevenlabs/skills) for the API details.

Workflow

1. Understand the Mood

If not already described, ask the user:

  • Genre — Electronic, jazz, classical, lo-fi, ambient, rock, orchestral, pop?
  • Mood — Upbeat, calm, dramatic, inspiring, playful, cinematic?
  • Tempo — Fast, medium, slow?
  • Vocals — Instrumental only (recommended for background), or with vocals?

2. Generate Music

Generate with Eleven Music (music_v2_5). It's cleared for commercial use on paid ElevenLabs plans, and the Music API needs one.

  1. If ELEVENLABS_API_KEY isn't set for the project, run npx -y @elevenlabs/cli@latest onboard init from the project root and follow what it prints. Never ask for the key in chat.
  2. npm i @elevenlabs/elevenlabs-js, then add a music entry to scripts/generate-audio.ts (create it from the audio-integration rule if it doesn't exist):
const music = [
  { name: "music-bg", prompt: "[genre] background music, [mood], [tempo], [additional descriptors]", lengthMs: 30_000 },
];
  1. Set lengthMs to the video length plus a few seconds (measure the voiceover first if there is one). The script forces instrumental output; for a track with vocals, set forceInstrumental: false.
  2. Run node scripts/generate-audio.ts from the project root. The track lands at public/music-bg.mp3. To regenerate it, delete the file and run the script again.

Good prompt examples:

  • "upbeat electronic background music, energetic, modern tech startup vibe"
  • "calm acoustic guitar, warm and friendly, coffee shop atmosphere"
  • "epic cinematic orchestral, building tension and release, trailer style"
  • "chill lo-fi hip hop beats, relaxed and dreamy, study music vibe"

Don't name artists, bands or song lyrics in the prompt; Eleven Music rejects them and suggests a rewording.

Alternatives:

  • The ElevenLabs MCP compose_music tool is deprecated (archived upstream) but still ships for quick interactive one-offs. It writes into public/; rename its output to music-bg.mp3.
  • KIE generate_music (remotion-media, Suno) for cheap drafts: prompt, output_name: music-bg, instrumental: true. Suno and the other KIE-resold models aren't licensed by their owners through KIE. Use KIE audio for drafts and internal work, and generate final commercial audio with ElevenLabs.

3. Wire into Composition

Place it with <Audio> from @remotion/media (install with npx remotion add @remotion/media), following the official remotion-markup skill (audio.md), with fade in/out:

import { Audio } from "@remotion/media";
import { interpolate, staticFile, useCurrentFrame, useVideoConfig } from "remotion";

const frame = useCurrentFrame();
const { durationInFrames, fps } = useVideoConfig();

<Audio
  src={staticFile("music-bg.mp3")}
  volume={interpolate(
    frame,
    [0, fps, durationInFrames - 2 * fps, durationInFrames],
    [0, 0.25, 0.25, 0],
    { extrapolateLeft: "clamp", extrapolateRight: "clamp" },
  )}
/>

4. Adjust for Voiceover (if present)

If the project has a voiceover, implement volume ducking — lower music to 0.1 during narration, 0.3 during silent parts. See audio-integration rule for the pattern.

5. Preview in Studio

If Studio isn't running, start it with npx remotion studio (or --no-open with an in-app browser, then open the URL it prints). Ask the user to listen there. Don't render unless they ask for an MP4.

Offer adjustments:

  • Volume too loud/quiet?
  • Wrong mood? Change the prompt, delete public/music-bg.mp3 and run the script again.
  • Music too short? Regenerate with a longer lengthMs, or add loop to the <Audio>.
  • Need different music for different sections? Add more music entries (music-intro, music-main, …) and give each <Audio> its own from and durationInFrames, or use a composition plan (official music skill) for one track with sections.

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.