feat: add the optimize-audio and optimize-web skills - #48
Merged
Conversation
ziyiunity
requested review from
AlisonDoucet,
DimaTym,
JodyMcAdams and
m-dejean-unity
August 11, 2026 23:01
AlisonDoucet
previously approved these changes
Aug 12, 2026
AlisonDoucet
left a comment
There was a problem hiding this comment.
Approving for Asset Transformer Toolkit skill
ziyiunity
requested review from
UnityAnthony
and removed request for
JodyMcAdams and
m-dejean-unity
August 12, 2026 15:57
ziyiunity
dismissed stale reviews from chris-addison and UnityAnthony
via
August 13, 2026 16:39
0080681
chris-addison
previously approved these changes
Aug 13, 2026
chris-addison
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two skills covering audio and web builds.
optimize-audiooptimize-webHow these were adapted
These skills were written for an agent that ran C# in the Editor through its own built-in tool. Here they run through the Unity CLI (
unity command evalagainst the project'scom.unity.pipelinepackage), so they work in any agent that can run a shell.optimize-audiocarried no host-specific C#, but all 20 of its Editor interactions went through host tools, and three things were wrong independently of that:t:AudioMixerwith a scene-object query, but anAudioMixeris a project asset. Now two recipes:FindObjectsByTypefor components,AssetDatabase.FindAssetsfor mixer assets.Debug.Logonly reaches the Editor console, so a caller reading stdout got nothing. They now return their values.audioSourceorclipthe recipe never resolves is a compile error. A resolution recipe was added.Its pointers to skills that don't exist in this repo now name the underlying Unity tool instead — the Memory Profiler package and the Profiler's Audio module.
optimize-webhad the same host-tool problem and, separately, three API names that don't exist. An agent following the original would have failed partway through its own pre-flight, and the failure would have looked like a broken snippet rather than a wrong instruction:PlayerSettings.WebGL.codeOptimizationUnityEditor.WebGL.UserBuildSettings.codeOptimizationPlayerSettings.WebGL.optimizationLevelPlayerSettings.managedStrippingLevelPlayerSettings.GetManagedStrippingLevel(NamedBuildTarget.WebGL)Its bundled
WebOptimizer.cshad the correct forms all along — only the prose was wrong, so the two are now consistent and the skill carries a short table to stop the wrong spellings coming back. Its fiveSee alsopointers referenced skills that don't exist in this repo; those now name the underlying Unity tooling instead.One line in that skill could not be verified:
UserBuildSettings.codeOptimizationlives in the WebGL build-support module, which wasn't installed in the Editor used for checking. The skill documents this and tells the agent to treat a resolution failure there as "the Web module isn't installed" rather than as a bad snippet.Verification
Every C# snippet in both skills was compile-checked against Unity 6000.5.7f1 by prefixing
if (true) return "OK";, which type-checks the whole block without executing it. A deliberately broken snippet was run as a control and failed withCS0103, so the passes are real rather than an unreachable-code artifact.Also checked: every relative
references/andresources/path resolves to a real file, all descriptions are within the 1,536-character listing cap, no frontmatter carries anauthor:field, and no skill refers to another as a slash command — they name each other instead, so the references work on hosts that don't expose skills as commands.