threejs-asset-pipeline covers shrinking 3D assets for three.js r186 with the gltf-transform command line. It explains how to inspect where the bytes are, validate a file, run the combined optimize command, and choose between Draco, meshopt and quantization for geometry and between KTX2, WebP and AVIF for textures.
Each compressed output needs matching runtime wiring, so the skill pairs every codec with the loader setup it requires and mentions gltfjsx for React projects.
What You Get
- A quick start that compresses a model with Draco and WebP and loads it with a DRACOLoader
- Inspect and validate commands, including validation as a CI gate
- A flag-by-flag guide to the optimize command
- Guidance on Draco, meshopt and quantize for geometry, and KTX2, WebP and AVIF for textures
- Scene commands such as weld, simplify, join, instance, dedup and prune, plus the runtime wiring each output needs
Common Use Cases
- Cutting the download size of a large glTF before shipping a web page
- Reducing GPU memory with KTX2 textures
- Validating exported models in a build pipeline
- Reducing draw calls with join and instance commands
- Choosing the right decoder setup for a compressed model
What Makes It Unique
Most three.js references stop at loading a model. This skill covers the step before it, the command line work of making the file smaller, and ties every codec to the loader code it requires. It also warns about ordering: compression commands should run last in a chain, because any later rewrite decodes the geometry again.
Under The Hood
The skill is a single SKILL.md of explanation, shell commands and JavaScript examples, with no scripts of its own. It tells the agent to run shell commands through npx that download and run the gltf-transform command line tool, which reads a model file and writes a new optimized file next to it. Compressing to KTX2 also needs the ktx tool from KTX-Software installed on the machine. The loader examples are code the agent writes into your project.