guidance-webgpu-performance
Installation
SKILL.md
Optimize WebGPU Performance
Find the limiting resource before changing the renderer. Produce a reproducible diagnosis that separates JavaScript preparation, browser/API submission, data transfer, and GPU execution, then make only changes supported by measurements.
Required context
- Read the repository
AGENTS.mdand the affected project'sDEVELOPMENT.md. - Inspect the render loop, update path, buffer and texture ownership, shader code, and resource lifecycle involved in the representative workload.
- Before adding or changing a benchmark, inspect the affected package's
package.json, local Vitest benchmark configuration, existing*.test.bench.tsfiles, and any shared configuration they import. Do not assume another project's harness applies unchanged. - Read the performance diagnostic playbook when classifying a bottleneck, selecting instrumentation, or proposing an optimization.
- Read the reusable WebGPU test suite guide when adding or reviewing a
*.test.webgpu.tssuite, choosing a test mode, or deciding whether a performance task belongs in CI.
Establish the performance question
Define the workload and target before measuring: