# Optimize Web

Optimizes Unity WebGL and WebGPU builds for smaller downloads, faster loading, and...

- Repository: https://github.com/Unity-Technologies/skills (1197 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add Unity-Technologies/skills --skill optimize-web -g -a claude-code -y`
Codex: `npx skills add Unity-Technologies/skills --skill optimize-web -g -a codex -y`
Cursor: `npx skills add Unity-Technologies/skills --skill optimize-web -g -a cursor -y`
Gemini CLI: `npx skills add Unity-Technologies/skills --skill optimize-web -g -a gemini-cli -y`

## Description

Optimizes Unity WebGL and WebGPU builds for smaller downloads, faster loading, and smoother browser performance. Use when asked to shrink a web build, speed up its load, or fix stutter, memory or battery problems in the browser.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

Audit and apply the Player Settings, compression, stripping, and server setup that make a Unity Web build smaller and faster.

## Important

- Use the unity cli (`unity command --format json`) and the `unity-cli` skill for each step. Use `unity-pipeline` too when it is available.
- Before making changes, establish a baseline of the current behavior so you can tell whether a later result is actually caused by your change.
- Create a restore point you can roll back to if your changes fail.
- Do only what's asked. Don't change unrelated assets or files.
- If the changes affect runtime behavior, add `Debug.Log` lines that will prove the actual scene behaviour (not just your changes) is now working - you'll read these when you enter Play mode to validate later. For example, log a GameObject's Transform scale if your fix is meant to make sure it changes size.
- Avoid long explanations.

## Performance Notes
- Take your time to do this thoroughly.
- Quality is more important than speed.

## Full topic map

Before you go forward with a workflow or diagnosis:

1. Open and read the [documentation page(s)](#full-topic-map) that cover the specific subject related to what you intend to do or fix and check if you've missed anything.
2. Name the file(s) you read in your response.

This is because your training knowledge about Unity might be out of date, incorrect, or for the wrong Unity version.

If the Editor install folder has a `Data/Documentation` folder (eg `...Unity/Hub/Editor/6000.6.0b2/Editor/Data/Documentation`), read the html files from the `<editor-install>/Editor/Data/Documentation/en/Manual` folder. Otherwise the docs pages are online at `https://docs.unity.com/en-us/engine/<VERSION>/manual/`.

The rest: https://github.com/Unity-Technologies/skills/blob/HEAD/skills/optimize-web/SKILL.md
