npx skills add ...
npx skills add earthtojake/text-to-cad --skill sdf
SDFormat/SDF model and world authoring, validation, and simulator handoff. Use for `.sdf` files, SDFormat XML, models, worlds, links, joints, poses, frames, inertials, visual/collision geometry, mesh URIs, sensors, lights, physics, plugins, includes, Gazebo, static SDF review, or simulator-specific metadata. Do not use for signed-distance-field geometry.
npx skills add earthtojake/text-to-cad --skill sdf
Provenance: maintained in earthtojake/text-to-cad. Use the installed local skill files as the runtime source of truth; the repository link is only for provenance and release review.
Use this skill when the deliverable is an SDFormat document. SDFormat describes simulator and world behavior: models, worlds, frames, poses, links, joints, inertials, visuals, collisions, sensors, lights, physics, plugins, includes, and simulator metadata.
This skill is for SDFormat, not signed-distance-field geometry.
The .sdf file is the source of truth: author and edit the XML directly. There is no gen_sdf() contract.
This skill's commands are thin entrypoints over the cadgen distribution, which
carries the Python build runtime and the JavaScript it executes. Install it once:
Rendering additionally needs a browser, which pip cannot supply:
.sdf XML directly and validate every created or modified file with cadgen sdf validate before reporting completion.version="1.12" for new outputs unless the target consumer constrains the version..sdf. Use references/design-ledger.md and references/llm-guardrails.md.relative_to / expressed_in explicitly on every nontrivial pose and axis. Implicit frame defaults are the top SDF failure mode. See references/frame-semantics.md.references/interoperability.md.gz sdf --check, simulator load, joint motion, and plugin/sensor startup.Use this skill for SDFormat outputs. Do not use it for signed-distance-field modeling, raw geometry generation, planning semantics, or to paper over incorrect upstream robot/source data unless the task is explicitly simulator-only.
After completing SDF work that creates or modifies a .sdf, you must ALWAYS hand the explicit file path to $cad-viewer when that skill is installed. $cad-viewer must start CAD Viewer if it is not already running and return link(s) to the relevant created or updated file(s); if $cad-viewer is unavailable or startup fails, report that instead of silently omitting the handoff.
.sdf and its consumers.references/frame-semantics.md before editing any <pose>, <frame>, joint axis, relative_to, expressed_in, nested scope, sensor frame, or plugin frame.references/examples.md.cadgen sdf validate; treat bundled validation as a guardrail, not simulator proof.references/smoke-tests.md).$cad-viewer. Static rendering does not execute SDF plugins or read file-authored motion metadata.Run with the project or workspace Python environment. Treat python in examples as an interpreter placeholder; if bare python is unavailable, substitute python3, a project virtualenv interpreter, or the configured interpreter path. The validator uses only the Python standard library.
The validator checks document shape, name scopes, pose/frame graphs, joints, geometry, mesh URIs, inertials, sensors, and plugins, and prints its findings plus a summary. One run validates ONE file: --strict treats warnings as failures and --json emits the machine-readable findings document. It exits nonzero if the target fails.
Optional external checking:
gz sdf --check is optional target-consumer validation. It should be reported as skipped when unavailable unless explicitly required.
When finishing an SDF task, include a compact report:
cadgen sdf snapshot renders the robot to a PNG still, using the same shared
CLI and headless browser runtime every rendering skill uses — so a snapshot matches what
the CAD Viewer shows.
It accepts .sdf only (a format door, same TARGET [OUT] grammar as the rest). Pose the robot with --joint-values — {joint: degrees} JSON,
joints you do not name staying at the rest pose (the "jointValues" job field is the same
thing in a packet). Robots are authored in metres and are framed on the robot scene scale
automatically.
Theme settings live under one --theme, mirroring the viewer's Theme tab. The default
theme is snapshot — Workbench Light with the ground grid, origin axis and shadows
removed, because in a still image those read as geometry. There is no --display: display
settings (mode, clip, exploded, edges) are CAD topology settings, and a robot carries none.
Link meshes are resolved relative to the description, so they must be present: an
unhydrated Git LFS pointer fails as "No link mesh loaded for robot". Run
git lfs checkout <mesh dir> first.
The grammar is cadgen sdf snapshot TARGET [OUT] [flags], the same one every
format door uses. Use cadgen sdf snapshot --help for the complete current
interface — the flags a robot cannot act on are absent from it, not refused by it.
references/sdf-workflow.mdreferences/examples.mdreferences/llm-guardrails.mdreferences/design-ledger.mdreferences/frame-semantics.mdreferences/validation.mdreferences/smoke-tests.mdreferences/interoperability.md