optimize-web
An agent skill by Unity-Technologies, from Unity-Technologies/unity-agent-plugin. Tags: build-tool, cdn, optimization, performance, web.
What it does
Optimizes Unity 6 WebGL and WebGPU builds for smaller download size, faster initial load, and efficient browser runtime performance. Use when the user's web build is too large, stutters in a specific browser, consumes excessive battery, needs CDN/server compression configured, or needs guidance on resource stripping, shader variant reduction, KTX textures, quality settings, or web profiling.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add Unity-Technologies/unity-agent-plugin --skill optimize-web
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/Unity-Technologies/unity-agent-plugin
cp -r unity-agent-plugin/skills/optimize-web ~/.claude/skills/optimize-web
Safety box score
Grade C, moderate risk: 18 of 100 risk points, rated 2026-10-20. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill optimizes Unity WebGL/WebGPU projects by reading and writing Player Settings from a live Unity Editor and by shipping an editor script that applies a bundle of release settings. The main risks are that it can execute C# inside the open Editor and persist project-setting changes; the only network exposure is incidental, via an example `npx` dev-server command.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 3 (high) | It explicitly runs C# in the live Editor with `unity command eval --caller plugin --skill optimize-web --code '<snippet>'`, and ships `resources/WebOptimizer.cs` as an executable `[MenuItem]` editor script. |
| Network access | 1 (low) | The skill itself does not exfiltrate data, but it includes an example local-server command `npx serve path/to/build -l 3001`, which can fetch a package from the npm registry if not already installed. |
| Filesystem reach | 1 (low) | It writes persistent Unity project state under `Assets/Editor/` and `ProjectSettings/`, and the shipped script also saves `Library/EditorUserBuildSettings.asset` via `AssetDatabase.SaveAssets()`. |
| Secrets & credentials | 0 (none) | There is no instruction to read or request tokens, passwords, `.env` files, keychains, or browser sessions. |
| Privilege & persistence | 0 (none) | No sudo, global installs, services, scheduled tasks, or OS-level settings changes are required. |
| Instruction hijack surface | 0 (none) | The files do not contain prompt-injection content or instructions to ignore safeguards or follow remote instructions. |
| Irreversible actions | 0 (none) | It does not publish, post, deploy, pay, book, or delete; it only tunes local Unity build settings. |
| Transparency | 0 (none) | All shipped files are readable text; there are no binaries, encoded blobs, or opaque installers. |
Before installing
- Read `resources/WebOptimizer.cs` first; it will change WebGL Player Settings and save them.
- Confirm you are comfortable with a skill that can run C# in your open Unity Editor via `unity command eval`.
- Decide whether the `npx serve` example is acceptable on your machine, since it may fetch a package from npm.
Rated 2026-10-20 by an automated review of 4 files from the skill's repository.
Source
- Repository
- Unity-Technologies/unity-agent-plugin (all skills from this repository)
- Path
- skills/optimize-web/SKILL.md
- Branch
- main
- Updated
- 2026-09-22
Related skills
- cro — When the user wants to optimize, improve, or increase conversions on any marketing page or form — including homepage, landing pages, pricing pages.
- popups — When the user wants to create or optimize popups, modals, overlays, slide-ins, or banners for conversion purposes.
- seo-images — Image optimization analysis for SEO and performance.
- seo-page — Deep single-page SEO analysis covering on-page elements, content quality, technical meta tags, schema, images, and performance.
- manage-sprite-atlas — Manage SpriteAtlas using prebuild pipeline with IPreprocessBuildWithReport (DEFAULT approach).
- optimize-audio — Optimizes Unity 6 audio memory, CPU cost, and playback quality through correct import settings and mixer configuration.