# optimize-audio

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 5600 installs · ★ 1149
- Author: Unity-Technologies
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Unity-Technologies/skills/tree/HEAD/skills/optimize-audio/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/optimize-audio

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Unity-Technologies/skills --skill optimize-audio -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/optimize-audio/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/optimize-audio/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Unity-Technologies/skills --skill optimize-audio -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/optimize-audio/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Unity-Technologies/skills --skill optimize-audio -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/optimize-audio/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Unity-Technologies/skills optimize-audio
```

2. **Manually: put the files in place**
- File: `.github/skills/optimize-audio/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Unity-Technologies/skills --skill optimize-audio -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Unity-Technologies/skills --path skills/optimize-audio
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/optimize-audio/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Unity-Technologies/skills --skill optimize-audio -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Unity-Technologies/skills/tree/HEAD/skills/optimize-audio/SKILL.md

## When to use it
- 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
- 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.

## Similar
- [orbit-card](https://affpapa.org/en/nevibecode/skills/orbit-card.md) — skill · 10000 installs
- [cad](https://affpapa.org/en/nevibecode/skills/cad.md) — skill · 14000 installs
- [step-parts](https://affpapa.org/en/nevibecode/skills/step-parts.md) — skill · 11200 installs
- [sdf](https://affpapa.org/en/nevibecode/skills/sdf.md) — skill · 10500 installs
- [urdf](https://affpapa.org/en/nevibecode/skills/urdf.md) — skill · 10500 installs
- [hatch-pet](https://affpapa.org/en/nevibecode/skills/hatch-pet.md) — skill · 3300 installs

From the same set: [unity-technologies/skills](https://affpapa.org/en/nevibecode/by/unity-technologies/skills.md) — 28 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
