optimize-audio
Skill2 starsChanged 58 days agoMITView on GitHub
Shrink audio files (mp3, wav, ogg, m4a, flac) by re-encoding with ffmpeg at lower bitrates / fewer channels. Use when the user wants to reduce audio file size, compress audio, optimize mp3/wav/etc for the web, or mentions an audio file being too large.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Unity-Technologies/skillstheir own version, first seen Sep 22, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Unity-Technologies/skills★ 1ksame 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.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- zk-model-passSkill
- bootstrap-agents-mdSkill
- update-agents-mdSkill
- zk-design-critiqueSkill
- us-math-standardsSkill
- three-game-starterSkill
- create-prSkill
- gh-cliSkill
- update-prSkill
- zk-app-store-linksSkill
- tanstack-querySkill
- tanstack-routerSkill
- tailwind-to-stylexSkill
- implement-plan-phaseSkill
- zk-claude-artifactSkill
- study-writing-styleSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
If missing, stop and tell the user:
- Distinctive: line 25
Do not proceed until they confirm.
- Distinctive: line 38
Always include one "sweet spot" (~60% size reduction, near-transparent).
- Very specific: line 70
Run all encodes in parallel within one Bash call (&& chain) to save time.
- Very specific: line 75
Check the repo for an audio registry (e.g.
- Distinctive: line 76
Don't git add until the user confirms the preview sounds acceptable.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
optimize-audio
Re-encode audio via ffmpeg to cut file size. Offer a few bitrate/channel options, preview them, then replace the original with the user's pick.
Preflight: ffmpeg
command -v ffmpeg >/dev/null || echo "MISSING"If missing, stop and tell the user:
ffmpeg is required. Install it:
- macOS:
brew install ffmpeg- Ubuntu/Debian:
sudo apt install ffmpeg- Windows:
winget install ffmpegor https://ffmpeg.org/download.htmlLet me know once it's installed.
Do not proceed until they confirm.
Workflow
- Inspect the source — report current size + codec + bitrate + channels + duration:
ls -lh <file> ffprobe -v error -show_entries stream=codec_name,sample_rate,channels,bit_rate -show_entries format=duration,bit_rate <file> - Generate 3–4 options into
/tmp/<basename>-test/spanning quality tiers. Pick defaults from the source:- Current bitrate is a ceiling — don't re-encode higher.
- Skip options that would make the file larger.
- Always include one "sweet spot" (~60% size reduction, near-transparent).
- Present a comparison table with size, % savings, and a one-line tradeoff per option. Recommend one explicitly. Give the user the
/tmp/...paths and tell them macOS Finder hides/tmp(Cmd+Shift+G to navigate, oropen /tmp/<basename>-test/). - Replace on approval — copy the chosen preview over the original. Use an absolute path for
cp(shell cwd can drift between Bash calls).
Option presets
| Use case | Preset | Typical savings vs 256k stereo |
| Ambient / background music loop | 96k stereo mp3 | ~60% |
| Speech / narration | 64k mono mp3 | ~75% |
| Short SFX (<2s) | 96k mono mp3 | — |
| Need smallest with good quality | 64k opus (.ogg) | ~70% (check player/browser support first) |
| Transparent fallback | 128k stereo mp3 | ~50% |
ffmpeg commands
# mp3, N kbps, stereo (N = 64/96/128/192)
ffmpeg -y -i in.mp3 -b:a 96k -ac 2 out.mp3
# mp3, N kbps, mono
ffmpeg -y -i in.mp3 -b:a 64k -ac 1 out.mp3
# opus in ogg container (best quality/size, but check codec support)
ffmpeg -y -i in.mp3 -c:a libopus -b:a 64k out.ogg
# aac in m4a (good for Safari-first pipelines)
ffmpeg -y -i in.mp3 -c:a aac -b:a 96k out.m4aRun all encodes in parallel within one Bash call (&& chain) to save time.
Notes
- Opus/ogg: verify the app's audio library supports it before recommending (Howler.js does, but needs a format hint on Safari).
- Check the repo for an audio registry (e.g.
audio.ts) — if the file extension changes, the import path changes too. - Don't
git adduntil the user confirms the preview sounds acceptable.
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.

