/ls-clad:build-meshfrom ls-clad
Generates 3D meshes, models, and assets (GLB/TypeScript) for Lens Studio via four backends: SPECS text-to-3D, FAST3D, code-authored MeshBuilder, and Blender voxel. Selects backend per asset based on need for texture fidelity, speed, articulation, or rigged skeletons.
Ships in ls-clad. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
/build-mesh produces a 3D asset. GLB backends write Assets/GeneratedMeshes/<Name>.glb and report AABB metadata; the code-authored backend hands off to the mesh-builder-scripting skill and yields a TypeScript artifact instead.
Four peer backends. Choose per asset, by what the asset needs — not by a fixed priority order. This menu is the single source of backend selection: the build orchestrator and project-init defer here.
GenerateFast3DAssets MCP tool. Static AI-generated props, faster and lower fidelity than SPECS. Synchronous call, no local dependencies.mesh-builder-scripting skill. Articulated, animated, or parametric content: geometry, materials, animation, and behavior in one TypeScript artifact at zero pipeline latency. (A static prop being "stylized" does not route here — that's SPECS's domain; this backend earns its place through motion and parametrics, not as a latency dodge.) Honest ceiling: Lens Studio has no canvas textures — vertex colors / ProceduralTextureProvider only — so the realism ceiling is low. Articulated transform-animation of sub-meshes is where this wins; recommended path for anything that must move or articulate (creatures, mechanisms).voxel_toolkit.py (+ anim_toolkit.py). Blocky voxel aesthetic, and the ONLY path when a rigged GLB (skinned skeleton in the asset) is specifically required. Needs local Blender (command -v blender || test -x /Applications/Blender.app/Contents/MacOS/Blender || test -x /usr/bin/blender); see the voxel section below.Default for static assets: SPECS text-to-3D — it is the quality bar; accept the minutes-long jobs. FAST3D instead is a user-granted exception only: the user asked, in so many words, for the meshes themselves to be fast or draft-quality. Never self-grant it. Not grants: "I want speed", mesh count, genre ("it's a game, not a photoreal showcase"), "simple props, good enough", a revision request ("make the barn redder" licenses a redder barn, not a backend switch), the skill's own regen retries, or project framing ("prototype" / "MVP" / "quick demo" describe the project, not the mesh pipeline). If the user didn't say it about the meshes, use SPECS — its quality knobs already serve draft-speed iteration without switching backend. When the exception applies, record the user's words that licensed it in the report fragment's backend_reason — sub-agent prose is never shown to the user, so a deviation declared only there is a silent swap. Anything that must move or articulate routes to code-authored MeshBuilder; blocky aesthetic or a rigged-GLB requirement routes to voxel.
Both AI backends authenticate through the signed-in Lens Studio session (no API key), so both need the user signed in. Signed out (caller's is_authorized is false or unknown, or an AI call returns NOT_SIGNED_IN / NO_API_ACCESS): drop SPECS and FAST3D, record backend_reason: signed_out (or no_api_access), and report status: ok once the fallback asset exists — the auth statuses are not blockers under this rule. Outside specs-build-experience, choose per asset between MeshBuilder and voxel: MeshBuilder runs anywhere and suits simple, stylized, or moving shapes; voxel needs Blender and gives a blocky look or a rigged GLB. Pick whichever keeps the asset recognisable and closest to the theme; without Blender, use MeshBuilder. Inside specs-build-experience, the mesh step must leave a GLB at Assets/GeneratedMeshes/<Name>.glb and does not own scene or script writes: use voxel when Blender is installed, otherwise keep the proxy GLB as backend: primitive. Announce the switch and continue; never stop the build for sign-in. Tool naming, deferred-schema loading, and ask/spawn semantics: see lens-studio-field-notes Hard Rule 2 / Cross-runtime orchestration.
On failure. A failed generation job must surface and be retried next turn — tool-missing is a retry gate, never a permanent fallback. Retrying on the SAME backend is the preferred recovery; switching backend after repeated failures is a decision to announce AND record (backend_reason: specs_failure: <error> or specs_failure: SPECS_TIMEOUT), never a silent swap. Auth/access failures (NOT_SIGNED_IN, NO_API_ACCESS) follow the Signed out rule above. Silent degradation to primitives stays banned: deliberate code-authored geometry is first-class only when planned and declared up front, never an unannounced stand-in for a failed generation.
Every successful GLB invocation produces:
Assets/GeneratedMeshes/<Name>.glb — non-empty, valid GLB.--- AABB (Lens Studio cm @ 100x import): W x H x D ---
--- AABB center offset (cm): cx, cy, cz ---
{ name, path, status, backend, backend_reason, aabb_cm, aabb_center_offset_cm, aabb_min_cm, forward_axis, upright, completeness, grounded, animation_available, normalized, size_warning }
status — ok, or a blocker: GLB_MISSING, NOT_SIGNED_IN, NO_API_ACCESS, SPECS_TIMEOUT. NOT_SIGNED_IN / NO_API_ACCESS are blockers only when the Signed out fallback itself could not produce an asset.backend — specs | fast3d | voxel | primitive (signed-out proxy kept, specs-build-experience only). (MeshBuilder output follows mesh-builder-scripting's own contract.)backend_reason — REQUIRED whenever backend ≠ specs: what licensed the choice — the user's words for the FAST3D speed exception, specs_failure: <error> for an announced failure-driven switch, signed_out / no_api_access for the Signed out rule, the need (animated/articulated, rigged GLB required) or the user's ask (blocky aesthetic requested) for the other backends. Omit when backend: specs.normalized: true iff target_size_cm was passed and the GLB was rewritten by normalize_glb.js.size_warning: true iff target_size_cm was NOT passed and max(aabb_cm) > 60 (the AI backends generate at arbitrary scale).aabb_min_cm — the min-corner offset from the origin (cm). Place the mesh at (x, ground_y - aabb_min_cm.y, z) for foot-on-floor without re-baking; or pass ground_contact: yes and place directly at ground_y (then aabb_min_cm.y == 0).forward_axis — -Z | +Z | +X | -X | unknown | n/a. upright — true | unknown. completeness — verified | suspect | unverified. grounded: true iff re-seated to min-Y = 0. See the pose contract below.animation_available — voxel backend only: true when a rigged clip was exported. The caller must not wire playAnimation / clip-trigger calls when false.finalization_receipt — emitted only for async_stage=finalize_collected, after this skill has run the post-processing and quality gates. Shape: { mesh_name, source: "service_collected", status: "ok" | "refinement_required", path }. This is the orchestrator's evidence that the collected file went through /build-mesh; a service READY result or direct calls to the helper scripts are not a substitute.Verify before reporting success:
test -s Assets/GeneratedMeshes/<Name>.glb && stat -f%z Assets/GeneratedMeshes/<Name>.glb
If missing or 0 bytes, return status: GLB_MISSING. Never report a mesh as created without this gate.
-Z. Raw GLBs import facing +Z (toward the viewer) across all backends, so /build-mesh bakes each mesh to face -Z and stamps it canonical — facing is a property of the asset, fixed once, not re-derived at every call site.ground_contact resolves to yes, the GLB is re-seated (normalize_glb.js --ground) so its min-Y is exactly 0. Resolve auto as yes for objects that rest on a surface (props, characters, vehicles, platforms); no for things described as floating / flying / hovering / orbiting and for UI.verified = visually checked or deterministic backend; suspect = a shape heuristic tripped; unverified = no visual check possible this run (caller confirms post-instantiation).Bake facing exactly once. The voxel template's rot_180z lands the raw mesh at net +Z (same as the AI backends) and the canonicalize --yaw=180 carries it the rest of the way to -Z — don't add a second flip downstream or you'll send it back to facing the viewer. External meshes (user-imported GLB, asset-library pick) go through the same canonicalize loop on ingest: check the stamp with analyze_glb.js --orient-meta and treat an unstamped mesh as un-oriented.
For async_stage=finalize_collected, require backend=specs, an explicit mesh_name, and a non-empty service-collected Assets/GeneratedMeshes/<Name>.glb.
Skip remote generation and download, then enter Post-processing (SPECS + FAST3D output) with backend: specs and run the existing quality gates and output contract unchanged. A successful result MUST include finalization_receipt: { mesh_name: "<Name>", source: "service_collected", status: "ok", path: "Assets/GeneratedMeshes/<Name>.glb" }. Where that path would regenerate for a rejected shape or incomplete subject, return status: REFINEMENT_REQUIRED plus the same receipt with status: "refinement_required"; never create, poll, download, or switch backend in this mode.
The SPECS text-to-3D inference API, driven through ExecuteEditorCode + authorized HTTP — the credential comes from the signed-in Lens Studio session, so there is no API key to handle. Async: create → poll → download → analyze. Full request/response schema, status values, errors, and quality tiers: references/text-to-3d-api.md. Tools: tools/text-to-3d-request.ts, tools/download-glb.js.
Create. Execute the pinned script by absolute path with this explicit shape, which requires method, requestPath, and a body:
ExecuteEditorCode({
path: "<absolute skill-dir>/tools/text-to-3d-request.ts",
args: {
method: "POST",
requestPath: "/v1/generations",
body: { prompt: "…" }
}
})
body holds prompt, plus output_quality / preview_quality / reconstruction_quality / seed / style / negative_prompt when set. Do not hand-roll a shortened request: the pinned body carries the auth classification and unknown-typed HTTP response handling required by the Editor API.
balanced. output_quality accepts compact / balanced / standard; preview_quality and reconstruction_quality accept fast / balanced / high.OK → keep data.job_id. ACTION_REQUIRED → apply the Signed out rule in the backend menu, branching on the result's reason for backend_reason: not_signed_in / no_auth_interface / 401 → signed_out; forbidden / 403 → no_api_access (the account is signed in but lacks inference-API access; do not tell the user to sign in again). FAILED → retry once if retryable, else handle per On failure.findInterface by string name throws InternalError: Object with 'interfaceId' expected, and require(...) fails strict-TS in ExecuteEditorCode (TS2591 — use await import(...)). The create result IS the authoritative auth signal; text-to-3d-request.ts already checks auth correctly.Poll (no streaming endpoint exists). Re-run the pinned script with a fresh invocation object; a GET still supplies the required ordinary empty body:
ExecuteEditorCode({
path: "<absolute skill-dir>/tools/text-to-3d-request.ts",
args: { method: "GET", requestPath: "/v1/generations/<job_id>", body: {} }
})
Read data.status and data.progress.overall_percent. Wait ~30 s after the create before the first poll — asset generation reliably takes at least 30 s, so earlier GETs just burn turns. Then poll every ~5 s (sleep 5-style waits) and interleave other independent work between polls.
succeeded → data.asset_url is set → download.failed / canceled → classify data.error_message per the reference's Errors tables (most first-attempt failures are transient infra, not terminal): bad prompt → re-create with a tightened prompt / negative_prompt; transient server (dev-queue flush; 5xx) → re-create once on SPECS; these commonly succeed on the retry. Still failing → handle per On failure.queued/0% or pinned at a fixed overall_percent for minutes is expected backlog, not a failure — it never trips failed and usually still completes. Keep polling (the 30 s first-poll delay + 5 s cadence above) up to a ~5 min/job ceiling. If it has not succeeded by ~5 min, do NOT silently time out or switch backends: ask the user whether to keep waiting (AskUserQuestion; if running as a sub-agent that can't prompt the user, surface the still-pending job and the keep-waiting question to the caller rather than deciding silently). User says continue → poll another ~5 min and ask again if still pending; user says stop → status: SPECS_TIMEOUT, announce it, then retry next turn or switch backend for that mesh — announced, never silent. A job whose overall_percent is actively climbing keeps waiting without prompting.Download. Fetch the asset only with the node script — it writes the bytes straight to the path with no UI and no prompts:
node <skill-tools-dir>/download-glb.js --url "<data.asset_url>" --out Assets/GeneratedMeshes/<Name>.glb
Never open the asset_url, open it in a browser, or import it through an interactive Lens Studio file picker — those pop a macOS Save dialog. If download-glb.js reports HTTP 401/403 or the signed asset_url has expired (it lasts ~1 h), re-poll GET /v1/generations/<job_id> for a fresh asset_url, then re-download.
Analyze. Run the shared post-processing below with backend: specs. Two SPECS carve-outs: (1) the FAST3D prompt Defaults are FAST3D-specific and do NOT apply — SPECS takes prompt plus the optional style / negative_prompt as given; (2) on a suspect shape or a fragment, regenerate the SPECS way — re-issue the create with a refined prompt / negative_prompt (name the missing parts, or discourage the flat/disc result via negative_prompt), max 2 regen retries.
How an asset sits in the world is the plan's decision, carried on each mesh's rest field (upright | flat_on_surface | wall_mounted | held) — do not reverse-engineer it from dimensions. Read rest and shape the prompt to it. This applies to every backend, SPECS included — it is about the generated shape, not backdrop framing, so shape it into the positive prompt before the create call regardless of backend.
rest: upright / held (the default) → describe the freestanding form and append the all-angle isolation (Default 1 for FAST3D; the same framing helps SPECS imagine back/side silhouettes).rest: wall_mounted → describe a flat front face meant to be seen head-on.rest: flat_on_surface → the flat / low-relief rules below apply.Fallback when rest is absent (legacy plan): infer flat_on_surface only when the plan's target_size_cm has one axis much thinner than the other two (a flat slab — e.g. 8×1.7×7.6) or the description names a mark / tile / inlay / decal / symbol / glyph / plaque / rune / board face; otherwise treat as upright. An explicit rest from the plan always wins over this guess.
When rest: flat_on_surface:
a single flat <shape>, thin low-relief tile lying flat face-up — e.g. a single flat X-shaped tile, thin low-relief, lying flat face-up; for a ring, a single flat donut/ring tile with a clear open hole through the centre, thin low-relief, lying flat face-up. Naming the outline (an X, a ring with a hole, a letter) makes the model render the silhouette rather than a chunky solid.single freestanding 3D asset, complete from every angle). For a flat mark that phrasing is actively harmful: it tells the model to make a stand-alone all-angle object, which it satisfies by standing the mark upright on a base plate / pedestal — measured directly (both tic-tac-toe marks generated as vertical shapes on unwanted base plates and had to be re-rolled). Use single flat asset lying flat framing instead. Per Default 1, never negate base / pedestal / stand in negativePrompt — the noun leaks into positive conditioning; rely on the positive flat / thin / low-relief / lying flat language, which leaves no room for a pedestal.normalize_glb --rotate … --ground --mark-canonical), not a regeneration. Regenerate (carve-out 2) only for structural defects a transform can't fix — an added base plate, a solid where a hole belongs, a chunky sculpture instead of a flat tile.Step 1. Resolve mesh_name if not provided — PascalCase from mesh_description (e.g. "red apple" → "RedApple").
Step 2 — Construct the final prompts (MANDATORY pre-processing). The user's mesh_description is the subject, not the final positive prompt. FAST3D's raw behavior reliably produces (a) a black backdrop card / framing plane intersecting the subject, (b) a hollow enclosing shell / dome / sphere wrapped around the subject (same failure mode, 3D-ified — from the front the camera sees a black husk, from a 3/4 angle the camera clips through and reveals the actual model inside), and (c) flat alpha-cutout planes for any foliage / hair / fur / feathers, and (d) an unsolicited cartoon / kawaii face (eyes, smiling mouth, blush) stamped onto inanimate subjects — food, produce, plants, props, furniture, vehicles. All four look wrong in Lens Studio when the user didn't ask for them. The agent MUST apply these defaults before every MCP call — never pass prompt: mesh_description through unchanged.
Default 1 — Anti-backdrop / anti-shell framing (always apply, every call).
Both the flat-card and enclosing-shell artifacts come from the model "composing a scene" around the subject. The defense is positive-only isolation language: describe the desired result (single, freestanding, all-angle), not the unwanted one (no backdrop, no shell). Diffusion tokenizers don't reliably honor "no X" anywhere in the prompt — the X concept still leaks. The negative prompt is even worse: scene nouns there get re-conditioned into the positive stream and make the artifact louder.
, single freestanding 3D asset, complete from every angle, viewable from all 360 degrees, asset onlysingle freestanding 3D asset plus complete from every angle forces the model to imagine the back/side silhouettes, which is incompatible with wrapping a shell around the subject. asset only reads as "no other geometry" without using the word "no". Avoid adding transparent background here — it conflicts with Default 2's no transparency for foliage and confuses the model.background, backdrop, floor, ground plane, shadow plane, black box, shell, dome, container, husk, environment) in negativePrompt. The FAST3D tokenizer leaks these into positive conditioning and makes the artifact worse — the model latches onto the noun and renders it. Negate backdrops/shells via the positive prompt's isolation language only."lush garden scene; palette: greens & grass tones. <subject>" or "underwater coral reef; ...", the locale noun lands before the isolation defaults and biases FAST3D toward composing that scene around the subject — defeating Default 1. Before the MCP call, scan the leading clause (everything before the first . or the palette: / mood: markers) for place/locale nouns: garden, forest, jungle, desert, dungeon, city, room, kitchen, bedroom, lab, underwater, reef, cave, mountain, ocean, sky, indoor scene, outdoor scene, landscape, environment, scene. Also scan palette: for the same plus foliage nouns (grass, leaves, foliage). Strip the offending word(s) and emit a WARN line so the caller can fix their theme. Style adjectives (stylized, cartoon, low-poly, painterly, voxel, PBR, cel-shaded) and color words stay.Default 2 — Anti-flat-foliage (apply when mesh_description contains any of these keywords, case-insensitive):
tree, plant, leaf, leaves, foliage, grass, hair, fur, feathers, flower, petals, bush, shrub, vine, moss, herb, tomato, fruit, vegetable, garden, jungle, forest, palm, fern, cactus, weed, ivy, branch, branches
, fully opaque surfaces, solid sculpted <foliage-noun> as rounded chunky clumps, volumetric 3D geometry, watertight mesh, no transparency (substitute the matching foliage noun from the keyword list, or foliage if multiple match).negativePrompt (or append to caller-supplied negative) to this empirically validated block:
flat planes, billboards, billboard leaves, alpha cutout, alpha cards,
transparent textures, transparency, opacity maps, cutout foliage,
crossed quads, intersecting planes, paper-thin geometry, 2D leaves,
flat cards, sprite leaves, decals, thin sheets
Default 3 — Anti-anthropomorphism / neutral subject (apply by default; skip only on explicit opt-in or a subject that naturally has a face).
FAST3D strongly biases toward personifying inanimate subjects — it stamps a cartoon / kawaii face (eyes, smiling mouth, blush) onto food, produce, plants, props, vehicles, and furniture even when nothing in the description asks for one (a plain tomato plant reliably comes back smiling). This is almost never wanted for crops, props, structures, or scenery, and it can't be removed downstream — the face is baked into the mesh. So suppress it by default. Render style and personification are independent: cartoon / low-poly / stylized is an art style, NOT a request for a face — keep the requested style, drop the face.
fox, astronaut, dragon, robot, teddy bear); ORface, eyes, eyeball, mouth, smile, smiling, smiley, teeth, grin, wink, winking, expression, kawaii, chibi, googly, anthropomorphic, personified, mascot, emoji, blush, with a face.cheerful, friendly, happy, cute, cartoon, stylized, playful set tone or look, not a face — they must NOT disable this default. (This is the common orchestrator case: a prepended mood: cheerful theme should still yield a faceless crop.), naturalistic and physically accurate, plain unadorned surface, realistic proportions. For plants / produce, use botanically accurate, true-to-life in place of physically accurate. Positive realism is the reliable lever here, just as positive isolation is in Default 1.negativePrompt (after the Default 2 block if present, else create it): face, eyes, eyeballs, mouth, smile, smiling, teeth, grin, facial features, cartoon face, kawaii, chibi, anthropomorphic, personified, googly eyes, cute face, blushing cheeks, emoji, mascot. These are surface-feature terms (like Default 2's alpha cutout / decals), NOT the scene nouns Default 1 forbids in negativePrompt, so they're safe to negate here.Default 4 — If a caller passes negativePrompt explicitly: append the Default 2 foliage block (when foliage keywords match) and the Default 3 anti-anthropomorphism block (when Default 3 applies) to it — don't replace. If the caller-supplied negative contains scene nouns from Default 1's forbidden list, STRIP them and emit a WARN line.
Tool signature (from MCP schema; tool naming per lens-studio-field-notes Hard Rule 2):
GenerateFast3DAssets({
assetDirectory: "GeneratedMeshes", // path is RELATIVE TO Assets/ — do NOT prefix with "Assets/"
assets: [{
simpleName: <mesh_name>, // required
prompt: <final_positive_prompt>, // mesh_description + Defaults 1 & 3 (+ Default 2 if foliage)
shadowless: true, // default true — keep true to avoid baked shadow planes
negativePrompt: <final_negative_prompt>, // Default 2 (foliage) + Default 3 (faces) + caller's; omit only if all three empty
}],
})
assetDirectory is relative to the project's Assets/ folder, NOT the project root. Passing "Assets/GeneratedMeshes" produces Assets/Assets/GeneratedMeshes/ — a duplicated folder bug. The MCP tool's own default is "GeneratedModels" (no prefix); follow that convention. The on-disk file ends up at <project>/Assets/GeneratedMeshes/<Name>.glb, which is what every other path in this skill references.
Edge case — wrong-subject drift. When the model keeps producing a generic neighbor (e.g. asked for a tomato plant, getting a generic berry bush), the caller MAY pass an explicit negativePrompt naming the near-miss ("berries, grapes, cherries, bush of berries") and add species-specific anatomy to mesh_description ("tomato plant with central stem, branching stalks, ripe red tomato fruits as solid spheres, serrated tomato leaves"). The Default 2 block still gets appended on top.
The MCP tool writes the GLB into the project's Assets/GeneratedMeshes/. Error classes have different recovery rules:
401, unauthorized, not authorized, mentions sign-in / auth / IsAuthorized, or otherwise looks like an authentication failure, do NOT retry. Apply the Signed out rule in the backend menu — auth state can change mid-build (user signs out, token expires), so defend in depth here even though sign-in was checked earlier.Then run the shared post-processing below with backend: fast3d.
1 — AABB. Extract from the freshly written GLB:
node <skill-tools-dir>/analyze_glb.js Assets/GeneratedMeshes/<Name>.glb --aabb
This emits the two unified AABB lines, calculated from the GLB's accessor min/max walked through the scene-graph transforms.
2 — Normalize size at the asset boundary (CRITICAL). AI output is often human-scale (~100 cm) — usually too big for the Specs 53×77 cm viewport. Do not let the caller fix this with setLocalScale. Scale on a SceneObject leaks into every component on the node: ColliderComponent.shape.size is read in local units, so a 12 cm collider on a node scaled 1/12 becomes 144 cm in world space (Hard Rule 6.2 in specs-experience-builder). The wrapper pattern is one mitigation, but the root cause is using node scale as units conversion — fix it here, at import.
If target_size_cm was passed → ALWAYS normalize, regardless of current size:
node <skill-tools-dir>/normalize_glb.js \
Assets/GeneratedMeshes/<Name>.glb Assets/GeneratedMeshes/<Name>.glb \
--max-dim=<N> # for single-number target_size_cm
# OR
--target=<W>,<H>,<D> # for "W,H,D" target_size_cm
# AND, when ground_contact resolves to yes:
--ground # re-seat min-Y → 0 (foot-on-floor)
normalize_glb.js rewrites POSITION accessor data (and translation components of node transforms) so the resulting AABB matches the target. Rotations are preserved. The output overwrites the input — same path, normalized. After normalization, re-parse the new AABB via analyze_glb.js --aabb.
When a mesh needs BOTH a rotation and target sizing, do it in ONE invocation — pass --rotate/--yaw and --target/--max-dim together (the tool scales in the authored, pre-rotation frame first, then bakes the rotation, so give --target dimensions in the pre-rotation frame). Do not run two passes ("rotate, then re-normalize to target"): a per-axis --target in the second pass scales the basis columns of the matrix the first pass rotated, which shears the geometry (a mark that comes back standing upright and is fixed this way arrives corrupted, forcing a full regeneration). The tool now refuses this — a per-axis --target on an already-rotated mesh exits with an error pointing back to the single-pass call — so if you hit it, re-run the rotation and target as one invocation on the original, un-rotated GLB rather than re-normalizing the rotated output.
If target_size_cm was NOT passed AND max(aabb_cm) > 60 → set size_warning: true and WARN: the caller should pass target_size_cm so the GLB is normalized at the asset boundary, or accept the size and use the wrapper pattern (scaled visual child, unit-scale collider parent) — downstream setLocalScale is NOT a fix.
Otherwise → no normalization, no warning.
If target_size_cm was omitted but ground_contact resolves to yes, run normalize_glb.js <in> <out> --ground on its own. (--max-dim/--target, --ground, --yaw/--rotate, and --mark-canonical all live in normalize_glb.js, so size, foot-on-floor, and facing are one code path for every backend — baked into the asset and stamped once, then trusted downstream.)
3 — Completeness & orientation: detect → bake → verify → stamp. Generative output can return wrong proportions (a sphere as a flat disc), an arbitrary facing, or a fragment of the subject (asked for a spaceship, got only a cockpit). The AABB is blind to all three.
node <skill-tools-dir>/analyze_glb.js <glb> --shape. If it reports flat=true or sliver=true and the subject is NOT meant to be flat/thin (a coin, plate, blade, platform legitimately are), set completeness: suspect and regenerate once (FAST3D: with the Default 2 anti-flat block; SPECS: with a refined prompt)."$(command -v blender || echo /Applications/Blender.app/Contents/MacOS/Blender)" --background --python <skill-tools-dir>/preview_glb.py -- Assets/GeneratedMeshes/<Name>.glb
Read the front/side/¾ PNGs in Assets/GeneratedMeshes/preview/ and confirm: (a) the whole subject is present — if a "spaceship" is just a cockpit, regenerate with explicit whole-object language ("complete spaceship with fuselage, wings, and engines, full body"); (b) which view is the front; (c) proportions match the description. Max 2 regen retries.--rotate=<rx,ry,rz> if it imported on its side) that turns the front to -Z, then:
node <skill-tools-dir>/normalize_glb.js Assets/GeneratedMeshes/<Name>.glb Assets/GeneratedMeshes/<Name>.glb --yaw=<deg> --mark-canonical
--mark-canonical writes asset.extras.lsCanonical = { forward_axis: "-Z", upright, grounded, version }; downstream reads it via analyze_glb.js --orient-meta and trusts an oriented mesh instead of re-detecting. Re-render and confirm the front actually faces -Z; set forward_axis: -Z only if the re-render clearly shows it.unknown, never a hopeful -Z — and movers are not exempt. "It rotates at runtime via faceDirection, so static facing matters less" is false: runtime yaw composes with the baked baseline, so an unverified baseline makes the mover face wrong every frame — the tail-first-helicopter failure. When Blender is NOT reachable, skip the bake: set completeness: unverified, forward_axis: unknown, leave the mesh unstamped — the consumer falls back to a post-instantiation CaptureRuntimeViewTool check. Never bake a blind guess: an unstamped mesh is honest, a wrongly-baked one is a silent defect.Read references/voxel-pipeline.md when this backend is selected — Blender invocation, the static and animation templates, axis reference, toolkit APIs, animation pitfalls and patterns. Raw-Blender escape hatch (bmesh, modifiers, booleans, PBR materials): references/voxel-raw-blender-api.md. Pose comes mostly free: build(center=True) already puts Y at the floor, and the template's known rotation is baked + stamped without a detection render (raw net is +Z, same as the AI backends).
Voxel scripts are authored in meters in Blender; Lens Studio imports at 100×, so 0.2 m = 20 cm aabb_cm. The unified AABB (Lens Studio cm @ 100x import) line IS the final displayed size — the caller does NOT call setLocalScale for default sizing, and AABB center offset (cm) tells the wrapper-pattern collider where the visual centroid sits relative to the origin. Every backend follows the same sizing rule: pass target_size_cm to normalize at the asset boundary; never fix an oversize asset with downstream setLocalScale (post-processing step 2).
Prefabs instantiated from any /build-mesh GLB carry localScale = vec3(100, 100, 100). Wrap the prefab and tween the wrapper's scale 0..1; never tween the prefab transform directly (a naive 0.2 reads as 0.2 cm of authored scale → a sub-millimeter speck). See references/prefab-scale-trap.md for the wrapper pattern, the inline × 100 fallback, and the FarmGame.ts bug post-mortem.
FAST3D has a server-side concurrency cap: run at most 4 simultaneous generations, then wait for all GLBs before starting more — exceeding the cap risks timeouts/5xx. Apply the same ≤ 4 jobs per turn ceiling to SPECS (fan out the creates, then poll and download together). /build-mesh is single-mesh — the caller batches; local voxel runs have no server-side cap.
$ARGUMENTS
Resolve mesh_name if not provided — PascalCase from the description. Parse the flags after |: backend= (specs | fast3d | meshbuilder | voxel — a direct per-asset choice; omit to choose from the menu yourself), async_stage= (only finalize_collected), target_size_cm= (single number = uniform max-dimension cap, preserves proportions; W,H,D = per-axis — you almost always want to pass the caller's size estimate), ground_contact= (yes | no | auto), and the SPECS knobs (output_quality, preview_quality, reconstruction_quality, seed, style, negative_prompt). Dispatch finalize_collected directly to its section above. For meshbuilder, invoke the mesh-builder-scripting skill instead of producing a GLB. Otherwise run the matching pipeline and return the per-mesh output contract.
references/orientation-lscapture.md (opens in a new tab)references/prefab-scale-trap.md (opens in a new tab)references/rebind-after-overwrite.md (opens in a new tab)references/text-to-3d-api.md (opens in a new tab)references/verify-one-glb.md (opens in a new tab)references/voxel-pipeline.md (opens in a new tab)references/voxel-raw-blender-api.md (opens in a new tab)tools/analyze_glb.js (opens in a new tab)tools/anim_toolkit.py (opens in a new tab)tools/download-glb.js (opens in a new tab)tools/gen-proxy-glb.py (opens in a new tab)tools/measure-world-aabb.ts (opens in a new tab)tools/normalize_glb.js (opens in a new tab)tools/orient-probes.schema.json (opens in a new tab)tools/orient-probes.ts (opens in a new tab)tools/preview_glb.py (opens in a new tab)tools/text-to-3d-request.ts (opens in a new tab)tools/verify_facing.js (opens in a new tab)tools/voxel_toolkit.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub lens-studio-devs/ls-extensions --plugin ls-clad74 skills in this plugin
/build-imageGenerate a 2D image from a text prompt via SPECS text-to-image, to Assets/GeneratedImages/<Name>.png (build-mesh reference, texture, or screen-space). Transparent RGBA cutout, cropped tight, by default; opt out for an opaque image.
/build-musicGenerate musical phrases, chord progressions, beats, jingles, and short pieces via local algorithmic synthesis. Sample-free, license-clean, fully offline. Scale-degree composition, pattern-based arrangement, frequency-separated mixing rules. Outputs 44.1 kHz stereo WAV to Assets/GeneratedSFX/./build-sfxGenerate non-pitched sound effects (UI, impacts, sweeps, foley, ambient textures, retro 8-bit) via local algorithmic synthesis. Outputs 44.1 kHz WAV to Assets/GeneratedSFX/. For musical phrases or chord progressions use /build-music instead.Other plugins' skills for the same job