Skip to content
Skills Library
Programming · Testing

glb-diff

/glb-diff

Compare two glTF or GLB models structurally with the glb-diff CLI or @three-ws/glb-diff and gate CI on severity. Use when reviewing a 3D asset change, checking that an optimization or re-export did not break joints, clips or materials, or writing a model regression check.

Repository
three.ws ↗
Licence
Apache-2.0
Last repository change
13.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Compare two glTF or GLB models structurally with the glb-diff CLI or @three-ws/glb-diff and gate CI on severity. Use when reviewing a 3D asset change, checking that an optimization or re-export did not break joints, clips or materials, or writing a model regression check.

Original author description

Compare two glTF or GLB models structurally with the glb-diff CLI or @three-ws/glb-diff and gate CI on severity. Use when reviewing a 3D asset change, checking that an optimization or re-export did not break joints, clips or materials, or writing a model regression check.

How it works

  1. CLI
  2. Library
  3. Worked example
  4. Guidance
Original SKILL.md headings · 49 lines, 264 words
SKILL.md preview
---
name: glb-diff
description: Compare two glTF or GLB models structurally with the glb-diff CLI or @three-ws/glb-diff and gate CI on severity. Use when reviewing a 3D asset change, checking that an optimization or re-export did not break joints, clips or materials, or writing a model regression check.
---

# GLB diff

`@three-ws/glb-diff` (Node 18+, ESM) reports what actually changed between two models: geometry, materials, textures, skeletons and animations, with git-style rename and move detection.

Run without installing: `npx -y @three-ws/glb-diff before.glb after.glb`

## CLI

```
glb-diff <before> <after> [options]
  <before>, <after>   .glb/.gltf path or http(s) URL
  --json              full change set as JSON
  --markdown | --md   Markdown report for a pull-request comment
  --fail-on <level>   exit 1 when severity reaches: cosmetic | minor | major | breaking
  --verbose           include unchanged totals
  --no-color
```

Exit codes: `0` ran and stayed below `--fail-on` (default never fails on changes), `1` severity reached `--fail-on`, `2` the tool could not run (bad args, unreadable or unparseable input).

Severity ladder: `none`, `cosmetic` (metadata only), `minor` (appearance changed, still loads and animates), `major` (geometry or hierarchy changed), `breaking` (something referenced by name is gone, such as a joint, so clips stop moving).

## Library

```js
import { readFile } from 'node:fs/promises';
import { diffModels, formatText, formatMarkdown } from '@three-ws/glb-diff';

const changes = await diffModels(await readFile('v1.glb'), await readFile('v2.glb'), { nameA: 'v1', nameB: 'v2' });
console.log(formatText(changes));
if (changes.severity === 'breaking') process.exit(1);
```

Also exported: `describeModel`, `diffDescriptions`, `readDocument`, `isGLB`, `SEVERITIES`, `atLeast`, `maxSeverity`, `matchEntries`.

## Worked example

```bash
npx -y @three-ws/glb-diff avatar.v1.glb avatar.v2.glb --fail-on breaking
npx -y @three-ws/glb-diff base.glb https://cdn.example.com/live.glb --markdown > diff.md
```

## Guidance

- Use `--fail-on breaking` in CI to catch removed joints after an optimization pass, and `--markdown` to post the report on a pull request.
- Treat exit code 2 as a tooling failure, not a regression.
- The diff runs locally. A URL input is fetched with plain `fetch`.

Versions

The database has no other skills named glb-diff.

Database snapshot: 13.11.2026 · package version 2d3c7b0797c6 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100gltf-asset-pipeline-qa
    Use to inspect, validate and optimize glTF/GLB files, compression, assets and export pipeline; not runtime animations.
  • 90three-d-gltf-export
    Use when the task is to export GLB or glTF with materials, transforms, and texture validation.
  • 95melonjs-3d-assets
    Use this skill when loading 3D models into melonJS — glTF and GLB scenes, OBJ/MTL models, materials, imported lights, node animation, ground shadows and GPU instancing. Covers level.load options including the async flag, the rightHanded conversion, and exactly what the loader…
  • 100game-3d-assets
    3D asset engineer that finds, downloads, and integrates GLB/GLTF models into Three.js browser games. Use when a 3D game needs real models instead of primitive BoxGeometry/SphereGeometry shapes.
  • 100gltf-asset-pipeline
    glTF/GLB asset preparation pipeline — Blender export, gltfpack (Meshopt) and gltf-transform optimization, Draco geometry compression, KTX2 + Basis Universal textures, gltfjsx code generation, hosting & cache headers. Use when a 3D model is too heavy, you need to bake/export from…
  • 100three-dart-loaders
    three_dart loaders — GLTFLoader, loading GLTF/GLB models, textures, async patterns, Flutter asset loading. Use when loading 3D models, textures, or external assets into a Flutter three_dart scene.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.