music-gen
Skill0 starsChanged 6 months agoMITView on GitHub
Generate music and audio from scratch — melodies, chord progressions, full arrangements, sound effects, or simple tones. Produces playable audio files (WAV/MP3) using system utilities. Use this skill whenever the user wants to create, compose, generate, or synthesize music or sound, mentions MIDI, melodies, chords, beats, a "track", a "tune", a jingle, background music, or asks to turn a musical idea/description into an audio file — even if they don't say the word "music" explicitly.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- zditor/zditor-docstheir own version, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- zditor/zditor-docs★ 275same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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
- Distinctive: line 18
No SoundFont needed. See "Direct synthesis" below.
- Distinctive: line 26
Run the probe before composing so you know which route is viable:
- Very specific: line 45
Write a Python script using mido that builds the MIDI programmatically.
- Distinctive: line 87
Write deliverables the user keeps to the outputs directory if one exists.
- Distinctive: line 89
Default to WAV for fidelity.
- Distinctive: line 91
Keep generated MIDI alongside the audio — it's the editable source.
- Distinctive: line 97
Do not claim "AI-generated music" — this is algorithmic composition + sampled instruments, which is a different (and honest) thing.
≈ “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.
Files
Music Generation
This skill generates music by composing it as MIDI (where Claude's music-theory knowledge is strongest), then rendering MIDI to real instrument sounds with a SoundFont. It falls back to direct waveform synthesis when no MIDI toolchain is available.
Decision: which route?
- Melodies, chords, arrangements, songs → MIDI route (default). Compose with
mido, render withscripts/render.sh. Best quality, real instruments. - Tones, beeps, sirens, sweeps, simple SFX → direct synth with
sox/ffmpeg. No SoundFont needed. See "Direct synthesis" below. - "Generate a track that sounds like <artist/genre>" (AI text-to-music) → this
skill does NOT do that. Tell the user it needs a model (local MusicGen via
audiocraft, or a cloud service like Suno/Replicate behind an MCP server), not system utilities, and offer to help set that up separately.
Step 0 — Detect the toolchain (always do this first)
Run the probe before composing so you know which route is viable:
bash scripts/render.sh --checkIt reports which of fluidsynth, timidity, sox, ffmpeg, python3 + mido
are present, and whether a SoundFont was found. Do not assume tools exist — Claude
Code runs on many machines. If something needed is missing, tell the user the exact
install command for their OS instead of failing silently:
- macOS (Homebrew):
brew install fluid-synth sox ffmpeg && pip install mido - Debian/Ubuntu:
sudo apt install fluidsynth fluid-soundfont-gm sox ffmpeg && pip install mido - The GM SoundFont (
FluidR3_GM.sf2ordefault-GM.sf2) is the one part people most often lack.render.shlooks in common locations; if none found, point the user to thefluid-soundfont-gmpackage (Linux) or a free download.
Step 1 — Compose the MIDI
Write a Python script using mido that builds the MIDI programmatically. Keep
real musical structure in mind: pick a key and tempo, build chord progressions,
voice them across tracks (melody / chords / bass / drums on channel 9), use note
velocities for dynamics, and respect note-off timing so notes don't hang.
scripts/melody_example.py is a working reference — a short multi-track piece in
C major. Read it for the patterns (track setup, program changes, note on/off
deltas, the channel-9 drum convention) and adapt rather than copying blindly.
General MIDI program numbers matter: e.g. 0 = Acoustic Grand Piano, 24 = Nylon
Guitar, 32 = Acoustic Bass, 48 = Strings. Drums always go on channel 9.
Save the generated MIDI to the working directory (e.g. song.mid).
Step 2 — Render to audio
bash scripts/render.sh song.mid song.wav # WAV via best available renderer
bash scripts/render.sh song.mid song.mp3 # auto-converts to MP3 if ffmpeg presentrender.sh tries fluidsynth first (best), then timidity, picks up a SoundFont
automatically, renders at 44.1 kHz, and converts to MP3 with ffmpeg if the output
name ends in .mp3. It exits non-zero with a clear message if no renderer or no
SoundFont is available — read its stderr and relay the fix to the user.
Direct synthesis (route 2, no MIDI)
For tones and effects, skip MIDI entirely:
sox -n tone.wav synth 3 sine 440 # 440 Hz, 3 s
sox -n chord.wav synth 4 sine 261 sine 329 sine 392 fade 0 4 1 # Cmaj chord, fade out
sox -n sweep.wav synth 2 sine 200-2000 # rising sweep
ffmpeg -f lavfi -i "sine=frequency=440:duration=3" tone.wav # ffmpeg equivalentFor melodies without a SoundFont, you can also generate raw samples in pure Python
with wave + numpy (additive synthesis / simple envelopes) — usable but sounds
synthetic; prefer the MIDI route when a SoundFont exists.
Output conventions
- Write deliverables the user keeps to the outputs directory if one exists; tell them the path and present the file.
- Default to WAV for fidelity; offer MP3 if they want something smaller/shareable.
- Mention tempo, key, and instrumentation in your summary so the result is editable.
- Keep generated MIDI alongside the audio — it's the editable source.
Notes
- This skill is deterministic: same script → same audio. There is no randomness unless you add it. If the user wants variation, seed and expose it.
- Do not claim "AI-generated music" — this is algorithmic composition + sampled instruments, which is a different (and honest) thing.
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
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.

