Game-Sound-Effect-for-Claude

agent
Guvenlik Denetimi
Uyari
Health Uyari
  • License รขโ‚ฌโ€ License: MIT
  • Description รขโ‚ฌโ€ Repository has a description
  • Active repo รขโ‚ฌโ€ Last push 0 days ago
  • Low visibility รขโ‚ฌโ€ Only 6 GitHub stars
Code Gecti
  • Code scan รขโ‚ฌโ€ Scanned 12 files during light audit, no dangerous patterns found
Permissions Gecti
  • Permissions รขโ‚ฌโ€ No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

๐Ÿ”Š Claude Code skill that designs game sound effects that don't sound like raw beeps: click-proof synth, CC0 foley pipeline, and a doctor that lets an AI 'hear' via metrics + spectrograms. Unity, Godot, Unreal, Phaser.

README.md

๐Ÿ”Š game-sfx

Game sound effects your AI agent can actually design.

License: MIT
Python 3.8+
Zero dependencies
Claude Code plugin
Live demo
Engines

Ask Claude for a coin sound and you usually get a raw beep that clicks, hisses and lasts too long. Claude can't hear, so it can't tell.

Before โ†’ after

โ–ถ Listen to every recipe in your browser

Same request, "a coin pickup sound". The doctor report and spectrogram are what Claude sees:

What an agent usually writes With game-sfx (coin_cartoon)
naive beep spectrogram coin spectrogram
FAIL clipped ยท WARN clicks at start/end ยท WARN flat, no transient ยท 0 dBFS, 0.6 s of buzz OK ยท -16 LUFS ยท a two-note FM bell that rings out and decays to silence
๐ŸŽง naive_beep.wav ๐ŸŽง coin_cartoon.wav

Top strip: amplitude. Below: log-frequency spectrogram (50 Hz to 22 kHz). Dotted lines mark 100 Hz, 1 kHz and 10 kHz.

What's inside

game-sfx is a Claude Code skill that works around the fact that Claude can't hear:

  • Recipes. Layered patches (transient + body + tail) built from sound-design practice and sfxr's own presets.
  • Synth. A click-proof synth with band-limited oscillators, envelopes that always end at zero, DC removal, LUFS-matched loudness and tail trimming.
  • Sample pipeline. For real-world foley, it finds CC0 recordings on Freesound, cuts out the cleanest single hits, and layers them as shared impact + surface texture + small room.
  • Doctor. Measures peak and true peak, LUFS, crest, brightness and harsh/aliasing energy, then draws a spectrogram PNG. Claude reads that picture to check its own work. It also checks intent: which way the pitch moves (a jump must rise, a hit must fall), attack and decay, how many hits it holds, whether a loop clicks at its seam, and whether a set of variants is evenly loud. It reads WAV (including float), OGG and MP3.
  • Preview. Lays sounds out the way the game plays them (gallop, walk, sequence), old vs new, so your ears make the final call.
  • Typo-proof patches. An unknown key fails with "did you mean 'filters'?" instead of silently producing a wrong sound.

The synth is pure Python stdlib: no pip install, no API key, works offline. For realistic foley (hooves, footsteps, water) the sample pipeline finds CC0 recordings on Freesound, cuts out the cleanest hits and makes them game-ready (needs a free Freesound key + ffmpeg). Output is game-ready WAV for Godot, Unity, Unreal, Phaser and anything else.

Install

In Claude Code:

/plugin marketplace add GhazaGG/Game-Sound-Effect-for-Claude
/plugin install game-sfx@game-sfx

Or copy skills/game-sfx/ into ~/.claude/skills/.

Other agents (Codex, Cursor, Gemini CLI, Copilot, OpenCode and more) read the same Agent Skills format:

npx skills add GhazaGG/Game-Sound-Effect-for-Claude

Add -a codex (or cursor, claude-code...) to pick the agent.

Use

Just ask:

make a coin pickup sound for my platformer, with 4 variants

my hit sounds are weak, audit assets/sfx/ and fix them

I need a looping horse gallop for a courier game

Claude picks a recipe, renders it, reads the doctor report and spectrogram, iterates, and writes the files into your project. The JSON patch stays in your project too, so you can tweak it later.

You can also run the scripts yourself:

python skills/game-sfx/scripts/sfx.py skills/game-sfx/recipes/coin_cartoon.json -o out --variants 4 --png
python skills/game-sfx/scripts/doctor.py path/to/your/*.wav --png

# straight into a Godot project: 4 variants, OGG, an AudioStreamRandomizer .tres, console loudness
python skills/game-sfx/scripts/sfx.py skills/game-sfx/recipes/laser_retro.json -o mygame/audio/sfx \
  --variants 4 --ogg --godot --target console

--ogg needs ffmpeg. For Unity and Phaser/Howler, SKILL.md has drop-in playback snippets that pick a variant at random, never the same one twice in a row.

coin_cartoon.wav  0.594s
  peak -6.4 dBFS (true -6.1) | -16.0 LUFS (max momentary -14.2) | crest 12.1 dB | centroid 3452 Hz
  energy <80Hz 0% | 2-5kHz 41% | >16kHz 0.0% | lead 0 ms
  attack 5 ms | decay 400 ms | hits 1 | pitch rising +7.1 st (994->1495 Hz)
  OK no problems found

Included recipes

Listen to them in examples/.

Recipe Style What it is
coin_cartoon cartoon FM-bell "bling" with shimmer and a small room
jump_cartoon cartoon Springy "boing" with a decaying wobble
hit_cartoon cartoon Rounded "bonk": thump plus woodblock knock
horse_gallop_cartoon cartoon Coconut-shell clip-clop, seamless loop
coin_retro retro Two-note square pickup
jump_retro retro Detuned square sweeping up
hoof_dirt_foley grounded Recorded CC0 hoof impact + dirt texture, 4 paired variants (approved by ear in a Unity prototype)
laser_retro retro Square zap diving 1500 โ†’ 300 Hz with a tick
powerup_retro retro Fast rising square arpeggio, two octaves up
explosion_retro retro Noise crack, closing rumble, driven sub drop
ui_error retro Two muted squares falling, a gentle "no"
ui_click any Tiny tick + blip
ui_confirm any Two soft triangle notes rising a 5th
hit synth placeholder Noise snap + saturated thump + crunch. Replace with recordings for a grounded game
horse_gallop synth placeholder Procedural gallop loop. It sounds toy-like next to real hooves; use only as a stand-in

Styles are first-class. Tell Claude your game's look and every sound comes from the same palette (see SKILL.md).

SKILL.md has a recipe table for more categories: hurt, death, jingle, footstep, whoosh, magic and UI hover.

It learns your game

Claude doesn't make sounds blind. On first use it does three things:

  1. Detects your engine (Godot, Unity, Unreal, Phaser, GameMaker, Lร–VE, Pygame) and its audio folder.
  2. Reads your project. It looks at the README, design docs and art, audits the sounds you already have, and greps your code for gameplay events (jump, collect, hit...) that have no sound yet.
  3. Writes sfx/SOUND_STYLE.md, a short sound bible covering style, palette, world materials, music key and loudness tiers. Every future sound follows it, so they all sound like one game.

Every sound keeps its editable source in sfx/patches/<name>.json. To change one, say "the coin is too shrill" and Claude edits the patch, re-renders it to the same file and logs the decision. Or edit the JSON yourself.

How it works

request โ†’ synth or samples?
   synth:   recipe โ†’ sfx.py
   samples: freesound.py โ†’ slice.py โ†’ sfx.py (impact + texture layers)
โ†’ doctor.py (metrics + spectrogram) โ†’ Claude looks โ†’ tweak โ†’ variants
โ†’ preview.py (A/B in the game's rhythm) โ†’ you listen โ†’ your assets/

Privacy & network

  • Offline by default. sfx.py, doctor.py, slice.py and preview.py never touch the network. They read and write only the files you point them at.
  • freesound.py is the only script that goes online. It calls https://freesound.org/apiv2 (search, similar sounds, sound info) and downloads the preview files it links to. It sends nothing else: no telemetry, no project files.
  • Your Freesound key is read from the FREESOUND_API_KEY environment variable. On Windows, if it isn't in the environment, it is read from the user's registry environment. The key is sent only to freesound.org in the Authorization header and is never printed or written to disk.
  • External programs: ffmpeg / ffprobe (if installed) decode non-WAV audio. They are called with argument lists, never through a shell.

Roadmap

  • Click-proof synth, doctor and spectrograms
  • CC0 sample pipeline (Freesound search, hit slicer, hybrid foley layers)
  • Game-rhythm A/B previews
  • Intent checks: pitch direction, true peak, loop seams, set loudness; loop points in the WAV
  • More recipes approved by ear (explosion, laser, magic, footsteps per surface)
  • OGG export, Godot AudioStreamRandomizer files, Unity and Howler playback snippets, console/mobile loudness targets
  • Optional AI backends for realistic sounds (ElevenLabs SFX v3, Stable Audio 3)
  • Web demo page: every recipe playable, side by side with a naive beep

Contributing

Recipes improve when people listen to them.

  • Tried a recipe in your game? Open an issue saying what sounded off ("coin too shrill", "hit has no weight"), plus your engine and style.
  • Made a sound you're proud of? Share the patch JSON in Discussions. The best ones become recipes.
  • Code changes: run python tests/test_recipes.py before a PR.

If game-sfx saved your game from raw beeps, a โญ helps other devs find it.

MIT licensed. Sounds you make with it are yours.

Yorumlar (0)

Sonuc bulunamadi