/javascript-animation-skills:soundtrackfrom javascript-animation-skills
Synthesizes a code-composed soundtrack using Web Audio API oscillators, filters, and envelopes that syncs to animation cuts. Handles tempo maps, beat-aligned edits, and loudness checks to avoid startling jumps.
Ships in javascript-animation-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
A film's sound is written for that film: its own instruments, rhythm and harmony in Web Audio, from nothing, in window.SCORE = ac => { … } (oscillators, noise, filters, envelopes, delays: whatever the piece calls for). Drums, a groove or a music-box bed are written the same way, for this film: no two films should sound alike because they share a template. templates/groove.js and templates/score.js are two ready-made scores, used only when the user asks for them; each file documents its options.
render.mjs (from the javascript-animation skill) renders window.SCORE offline with OfflineAudioContext, writes <out>.wav and muxes it into the MP4; the page's live preview plays the same score when clicked.
Don't ask the user to choose a music source up front. At delivery, mention in one line that AI-generated music or their own track also work.
window.CUES too, so they get the same downbeat.sync-check accepts a cut into silence as on the beat.references/ai-music.md.With music you don't control, reverse the direction: the picture follows the music. Render, mux, run the check, then move the scene boundaries in the page's SCENES table by the reported offsets and re-render. This is cheap because each scene function receives local time (0 at its own start), as the starter is written: moving a boundary never touches scene code.
node scripts/sync-check.mjs piece.mp4 --cues-file piece.cues.json # check the declared CUES (preferred)
node scripts/sync-check.mjs piece.mp4 # fallback: detect cuts in the picture (fast camera moves can read as cuts)
For each event it prints the offset to the nearest strong audio onset and the loudness jump into it. It fails on OFF-BEAT (more than ±100 ms, ~3 frames) or STARTLE (more than +6 dB versus the second before). The opening second and the final fade are skipped (no "before" to compare against; a fade-out is not a cut). "Strong" means prominent among the onsets within ±2 s, so accents in quiet passages still count; a cut into silence counts as landing; music returning after a break is compared with the typical level of the last 4 s. A video with no audio stream is reported as such. Put in window.CUES every cut plus any in-scene hit you want checked (a hard cut inside a shot, a gag's impact). Fix and re-run until it passes, or until every remaining STARTLE is a deliberate stinger you can name (a comedy impact is meant to jump out; a lullaby cut is not).
Synthesized in code: music box, piano-like plucks, pads, bells, soft percussion are fine. Realistic voices, orchestras and genre production are not; use AI music or a real track for those.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub iart-ai/javascript-animation-skills --plugin javascript-animation-skills2 skills in this plugin
Other plugins' skills for the same job