optimize-audio — Claude Code skill: audio checks and setup
This skill audits Unity audio settings and guides changes for memory use, mixer CPU load, and 3D playback issues. It reports findings before making edits.
npx skills add Unity-Technologies/skills --skill optimize-audio -a claude-codeWhat optimize-audio does
The skill checks the build target, output sample rate, mixer assets, and AudioListener count, then gathers AudioSource and mixer details. It routes the investigation toward clip import settings, spatial audio, mixer overhead, or compression quality. Separate paths cover mobile sample-rate changes and streaming.
It runs C# through the Unity CLI in a live Editor, using unity command eval --code '<snippet>'. The command catalog must include eval; otherwise, the workflow stops. The skill presents its assessment and waits for the user before changing anything. Editor statistics are only indicative, so the result must be checked in a device build.
Import settings cannot be changed by editing .meta files directly. They take effect through SaveAndReimport() in the Editor, so an unreachable Editor blocks that workflow.
What it helps with
- reduce memory used by audio clips
- investigate DSP spikes and Audio Mixer CPU load
- fix stereo playback on positioned 3D audio
- audit audio clip import settings
- trace artifacts in compressed audio
Example prompts for the agent
- Check why audio uses so much memory in this Unity build.
- Find the cause of Audio Mixer CPU spikes and show me the assessment before changing anything.
- Check stereo clips used with 3D positioning and recommend mono settings.
How to install optimize-audio
1Skills CLI (Vercel)
npx skills add Unity-Technologies/skills --skill optimize-audio -a claude-code2Manually: put the files in place
~/.claude/skills/optimize-audio/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/optimize-audio/
1Skills CLI (Vercel)
npx skills add Unity-Technologies/skills --skill optimize-audio -a codex2Manually: put the files in place
.agents/skills/optimize-audio/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Unity-Technologies/skills --skill optimize-audio -a cursor2Manually: put the files in place
.cursor/skills/optimize-audio/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Unity-Technologies/skills optimize-audio2Manually: put the files in place
.github/skills/optimize-audio/SKILL.md1Skills CLI (Vercel)
npx skills add Unity-Technologies/skills --skill optimize-audio -a gemini-cli2Platform CLI
gemini skills install https://github.com/Unity-Technologies/skills --path skills/optimize-audioManually: put the files in place
.devin/skills/optimize-audio/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Unity-Technologies/skills --skill optimize-audio -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about optimize-audio
How do I install optimize-audio in Claude Code?
Run npx skills add Unity-Technologies/skills --skill optimize-audio -a claude-code. The skill file is at ~/.claude/skills/optimize-audio/SKILL.md.
What does optimize-audio do?
It inspects Unity's audio setup and guides changes to clip imports or the mixer when investigating memory use, CPU load, or playback problems. It reports its findings and waits for approval before editing.
What does optimize-audio need to run?
It needs a Unity Editor reachable through the Unity CLI, with eval available in the command catalog. Import changes are applied in the Editor with SaveAndReimport(), and results must be checked in a device build.