--- name: materialcraft description: > MaterialCraft is the ArtCraft team's open-source, pure-Rust node-based procedural material designer — build tileable PBR materials from native primitives, functions and a 171-function SBS library in a node graph, watch them cook in 2D and on a displaced 3D model, and export the maps for any engine. Its native documents are SBS XML packages (`.sbs`) and self-contained MaterialCraft Project archives (`.mcraft`); portable `.mcmat` materials let TextureCraft paint with the result. Trigger this skill whenever the user mentions MaterialCraft — or an `.sbs`, `.mcraft` or `.mcmat` material — asks what it can or cannot do, which primitives or bundled functions exist, how to script, automate, batch or headlessly drive it (`materialcraft-cli`, MCP, the JSON control channel), wants a tileable PBR material built or exported, wants an SBS graph imported or a material handed to TextureCraft, needs exported maps or a project archive verified, or troubleshoots it. Also when the job is described without naming the app — "make me a tileable brick material", "export base color/normal/roughness maps", "build this material as a node graph", "open this SBS file", "package this project as one file", "share this material with my texturing app". Do not guess its node library, command ids or parameters — read this, then ask the app. --- **Audit basis.** Re-pinned 2026-11-12 against tag **v0.4.1**, commit **`65f7bfd3e5f40d695d03162285879f0f8079ff6c`** — `git rev-parse HEAD` in the pinned checkout confirms — and the installed bundle matches (its binary prints `MaterialCraft 0.4.1 (65f7bfd 2026-11-12)`; bundle `0.4.1`, id `ai.storyteller.materialcraft`). This supersedes the v0.2.0 audit (`a1bbd4a83f62365d90f085e5f1ad61410f9cf11c`, 2026-11-07). Every count below was re-measured from this tree (the method is in `evidence.md`); the app's docs are cited only where the code agrees, and their drift is named. **Delta v0.2.0 → v0.4.1** (measured from `git diff v0.2.0..HEAD`: 434 files, +28 465/−3 661; the checkout carries both tags but a squashed history, so this is a tree diff). Five changes shape this skill. (1) **The container story changed**: `.sbs` stays the main format, and `.mcraft` is back — as a native *MaterialCraft Project* ZIP holding one root SBS plus `resources/`, with `mcraft://` references and `.mcraft` autosaves, not the old package (`crates/formats/src/project.rs`, `crates/engine/src/file_cmds.rs`; `docs/atomic-workflow.md` still says support was removed — stale). (2) **Packages, folders and links**: several packages can be open at once, Explorer edits SBS folder trees and resources, and `graph.instance.add` links a graph from another open package (`crates/engine/src/{package_commands,folder_commands,graph_instance_commands}.rs`). (3) **A reusable function library landed**: 171 function graphs / 2 334 nodes in `assets/sbs/functions.sbs`, reachable through `library.functions`, `library.tree` and `library.add` (`crates/engine/src/{function_library_commands,node_library_commands}.rs`). (4) **The registry grew from 86 ids over 19 modules to 119 over 37**, adding `package.*`, `folder.*`, `explorer.*` and five more `library.*` ids (`crates/engine/src/commands.rs`), while the primitive catalog shrank 30 → 29 because `motion_blur` was deleted (`crates/nodes/src/atomic/catalog.rs`). (5) **Export and the shell moved**: export lost TIFF (7 formats), gained `outputs`, `colorSpaces` and `[w,h]` size (`crates/engine/src/export_request.rs`), the Export window has MaterialX/MCMAT stubs (`crates/ui-egui/src/export/`), the 3D view displaces real geometry on the CPU (`crates/render/src/preview.rs`), undo has a configurable limit, the app self-updates, and the macOS build is signed, notarized and stapled. **Delta v0.1.0 → v0.2.0** (kept for history; 493 files then). That release made SBS XML the native document and retired `.mcraft`; replaced the Rust procedural library with **30 catalog entries** (25 atomic + 5 graph items), **85 function operations** and **4 pattern kinds**; moved `.mcmat` to manifest version 2 with `source.sbs`; added the `material_export` MCP tool and `material.export` method; split the command registry into 19 modules (68 → 86 ids); and added wire editing, export `size?`, colliding-name rejection, the token-authenticated control channel and English + Arabic locales (`crates/formats/src/sbs/`, `crates/nodes/`, `crates/engine/src/commands.rs`). **Verify against your installed version** — the ArtCraft Launcher auto-updates, so a newer build may differ. `materialcraft-cli commands`, `nodes` and `--help` are the live contract; if the CLI is not installed, the registry in `crates/engine/src/commands.rs` is the source of truth. # MaterialCraft ## Overview MaterialCraft is an open-source (MIT OR Apache-2.0), pure-Rust **node-based material designer** for procedural, tileable PBR materials — the ArtCraft suite's material-authoring app, built as a clean-room answer to the professional node-graph material workflow. It is SBS-first: the document is SBS XML (`.sbs`) or a self-contained MaterialCraft Project (`.mcraft`), and the Rust side implements only native primitives, while SBS library graphs — including 171 reusable functions — are loaded from the library folder. It is in active development: `ROADMAP.md` still states that reference-application rendering parity and arbitrary SBS round trips are **not** established, and that SBS import is not lossless for arbitrary files. It runs natively on macOS, Windows, Linux and FreeBSD and in the browser through WebAssembly. Source: GitHub `storytold/materialcraft`. The governing idea matches the rest of the suite: **every user-visible action is an engine command with a stable id** (`graph.wire.insertDot`, `graph.instance.add`, `file.exportMaterial`, … — `crates/engine/src/commands.rs`), and the UI, `materialcraft-cli`, the JSON control channel, the JSON-lines server and the MCP server all run commands through that one registry (a few workspace helpers such as `package.open` and `render` wrap it). A cook is content-addressed and cached, and only the nodes downstream of an edit re-cook. ## Capabilities (verified) ### One command registry, five ways in - **119 engine command ids over 37 registry modules** (`crates/engine/src/commands.rs` `command_specs()`): `graph.*` 65, `edit.*` 13, `file.*` 13, `view.*` 8, `library.*` 6, `folder.*` 5, `session.*` 3, `package.*` 3, `explorer.*` 3. The complete id list is in `references/commands.md`; `materialcraft-cli commands --filter ` prints params, menu paths, shortcuts and live enabled state. - **CLI `materialcraft-cli` — 11 subcommands, unchanged at v0.4.1** (`apps/materialcraft-cli/src/main.rs` `SUBCOMMANDS`): `info`, `commands [--filter]`, `nodes [--filter] [--category]`, `run [params] [-o out]`, `batch `, `new