wasm-optimizer

Optimize WebAssembly modules with wasm-opt to reduce binary size and improve load times.

1|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/hdkz-dev/multi-game-engines --skill wasm-optimizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wasm-optimizer
Source: https://github.com/hdkz-dev/multi-game-engines/tree/main/.agent/skills/wasm-optimizer
Command: npx skills add https://github.com/hdkz-dev/multi-game-engines --skill wasm-optimizer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides guidelines and tools for optimizing WebAssembly modules used in the project, particularly for game engine adapters (e.g., Stockfish).

Core Features & Use Cases

  • Size optimization: Strategies to minimize .wasm binary size (e.g., using wasm-opt, compiler flags).
  • Loading Performance: Best practices for fetching, compiling, and instantiating Wasm modules (streaming compilation).
  • Memory Management: Guidelines for managing Wasm memory from JavaScript/TypeScript to prevent leaks.
  • Integration: Patterns for seamless communication between Wasm and the main JS thread or Web Workers.

Quick Start

Run the wasm optimizer on your Stockfish WebAssembly build to minimize size and improve streaming load performance.

Frequently Asked Questions about wasm-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce WebAssembly binary size for game engine adapters?

Reduce WebAssembly binary size for game engine adapters by applying wasm-opt compiler flags and size optimization strategies. This minimizes the .wasm file footprint during build pipelines to improve overall load times.

What is the best way to optimize WASM streaming instantiation for web games?

Optimize WASM streaming instantiation by following best practices for fetching, compiling, and instantiating WebAssembly modules directly during runtime loading. This approach ensures faster compilation and reduces game startup delays.

How does WebAssembly memory management work with JavaScript in game adapters?

WebAssembly memory management with JavaScript requires specific guidelines to prevent memory leaks when handling Wasm module memory from TypeScript. Proper integration patterns ensure seamless communication between Wasm and the main JS thread or Web Workers.

Can I use wasm-opt to optimize Stockfish WebAssembly builds?

Yes, you can use wasm-opt to optimize Stockfish WebAssembly builds by running the optimizer on your compiled module. This enforces size reduction and improves streaming load performance for the game engine adapter.

When do I need to optimize WebAssembly modules for web-based game engines?

Optimize WebAssembly modules for web-based game engines during build pipelines and runtime loading scenarios when binary size and load times impact performance. This is especially critical for adapters like Stockfish that require fast execution.