Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
opusgamelabs avatar

Add Audio

  • 528 installs
  • 305 repo stars
  • Updated May 25, 2026
  • opusgamelabs/game-creator

add-audio is an OpusGameLabs game-creator skill at version 1.3.0 that adds background music, sound effects, and spatial audio to browser games using the Web Audio API with zero external dependencies.

About

add-audio is a Claude Code skill from opusgamelabs/game-creator version 1.3.0 under the MIT license for adding audio to existing browser games. It generates procedural background music, gameplay themes, and sound effects through the Web Audio API with no third-party audio libraries required. The skill accepts a path-to-game argument and includes validation steps emphasizing thorough quality over speed. Developers invoke add-audio when users ask to add music, BGM, SFX, or spatial audio and the game already exists but lacks sound design. The skill explicitly excludes gameplay feature work and visual design changes.

  • Adds audio assets and integrates them into game code automatically
  • Supports background music, UI sounds, and gameplay sound effects
  • Handles asset loading, volume controls, and cross-platform playback
  • Works with popular game engines via agent-driven code changes
  • 470 developers have installed this skill from the catalog

Add Audio by the numbers

  • 528 all-time installs (skills.sh)
  • +19 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #45 of 247 Game Development skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/opusgamelabs/game-creator --skill add-audio

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs528
repo stars305
Last updatedMay 25, 2026
Repositoryopusgamelabs/game-creator

How do you add Web Audio API music to a game?

Add background music, sound effects, and spatial audio to their game project with a single agent command.

Who is it for?

Developers with an existing browser game who want procedural music and SFX via Web Audio API without audio middleware.

Skip if: Games needing FMOD or Wwise pipelines, native mobile audio engines, or projects that still require core gameplay or visual design work.

When should I use this skill?

A user asks to add music, BGM, sound effects, spatial audio, or SFX to an existing game project.

What you get

Integrated BGM loops, gameplay sound themes, SFX triggers, and spatial audio hooks inside the target game codebase.

  • BGM audio modules
  • SFX trigger code
  • spatial audio hooks

By the numbers

  • Version 1.3.0
  • Zero external audio dependencies

Files

SKILL.mdMarkdownGitHub ↗

Performance Notes

  • Take your time to do this thoroughly
  • Quality is more important than speed
  • Do not skip validation steps

Add Audio

Add procedural music and sound effects to an existing game. BGM uses a Web Audio API step sequencer for looping patterns. SFX use the Web Audio API directly for true one-shot playback. No audio files or npm packages needed — everything is synthesized in the browser.

Instructions

Analyze the game at $ARGUMENTS (or the current directory if no path given).

First, load the game-audio skill to get the full Web Audio patterns and integration guide.

Step 1: Audit

  • Read src/core/EventBus.js to see what game events exist (flap, score, death, etc.)
  • Read all scene files to understand the game flow (gameplay, game over)
  • Identify what music and SFX would fit the game's genre and mood

Step 2: Plan

Present a table of planned audio:

Event / SceneAudio TypeStyleDescription
GameSceneBGMChiptuneUpbeat square wave melody + bass + drums
GameOverSceneBGMSomberSlow descending melody
Player actionSFXRetroQuick pitch sweep
ScoreSFXRetroTwo-tone ding
DeathSFXRetroDescending crushed notes

Explain in plain English: "Background music will automatically loop during each scene. Sound effects will play when you do things like jump, score, or die. The first time you click/tap, the audio system will activate (browsers require a user interaction before playing sound)."

Step 3: Implement

1. Create src/audio/AudioManager.js — AudioContext init, master gain node, BGM sequencer play/stop 2. Create src/audio/AudioBridge.js — wires EventBus events to AudioManager for BGM, calls SFX functions directly 3. Create src/audio/music.js with BGM patterns for each scene (Web Audio step sequencer — note arrays that loop continuously) 4. Create src/audio/sfx.js with SFX for each event (Web Audio API — OscillatorNode + GainNode + BiquadFilterNode for true one-shot playback) 5. Add audio events to EventBus.js if not present (AUDIO_INIT, MUSIC_GAMEPLAY, MUSIC_GAMEOVER, MUSIC_STOP, AUDIO_TOGGLE_MUTE) 6. Wire initAudioBridge() in main.js 7. Emit AUDIO_INIT on first user interaction (game starts immediately, no menu) 8. Emit music events at scene transitions and SFX events at game actions 9. Add mute toggle — AUDIO_TOGGLE_MUTE event, UI button, M key shortcut

Step 4: Verify

  • Run npm run build to confirm no errors
  • List all files created/modified
  • Remind the user: "Click/tap once to activate audio, then you'll hear the music"

Example Usage

Full audio pass

/add-audio examples/flappy-bird

Result: Creates src/audio/AudioManager.js, music.js (gameplay + game-over BGM patterns), sfx.js (flap, score, death, button SFX) → wires via AudioBridge → mute toggle on M key. First click activates audio.

Troubleshooting

No sound plays

Cause: AudioContext not resumed after user interaction (browser autoplay policy). Fix: Ensure AudioContext.resume() is called on first user input (click/tap/keydown). Check for AUDIO_INIT event wiring.

Audio causes lag spikes

Cause: Creating new OscillatorNodes every frame. Fix: SFX should be one-shot (create, connect, start, stop). BGM uses a single looping sequencer. Never create nodes in update().

Next Step

Tell the user:

Your game now has music and sound effects! Next, run /game-creator:qa-game to add automated tests that verify your game boots correctly, scenes transition properly, scoring works, and visuals haven't broken.

>

Pipeline progress: ~~/viral-game~~ → ~~/design-game~~ → ~~/add-audio~~ → /qa-game/review-game

>

(This is the `/viral-game` one-shot pipeline — not the `/make-game` multi-session, milestone-driven workflow.)

Related skills

How it compares

Use add-audio for lightweight Web Audio API integration in browser games; use dedicated audio middleware skills when targeting native engines or licensed asset pipelines.

FAQ

Does add-audio require external audio libraries?

add-audio uses the Web Audio API with zero dependencies, generating procedural background music, gameplay themes, and sound effects directly inside the existing browser game codebase.

What triggers add-audio in game-creator workflows?

add-audio activates when users request music, BGM, sound effects, spatial audio, or phrases like make it sound good, and is not intended for gameplay features or visual design tasks.

Game Developmentintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.