/text-to-cad:sdffrom text-to-cad
Authors and validates SDFormat XML for robot models and simulation worlds. Handles links, joints, poses, frames, inertials, sensors, lights, physics, and plugins for Gazebo and other simulators.
Ships in text-to-cad. 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.
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.
Run cadgen through uv, so this skill's commands share one installation, and its warm build daemon, with the CAD app's server:
cadgen below means uvx --no-config --managed-python --python 3.13 --from cadgen==0.7.21 cadgenpython below means uvx --no-config --managed-python --python 3.13 --from cadgen==0.7.21 pythonThe first run downloads that installation and the first snapshot its headless browser; later runs reuse both.
.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 itself whenever gz is on PATH), 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.
Show the user each file you create or change, and any they ask to see. Snapshots and validation don't replace this.
If your tools include cad_show (your host may prefix it), use it with the file's
absolute path, and follow its description for when to call it again. cad_view reads
what the user selected; cad_screenshot shows you what they see. Neither is a review
of your own work.
Otherwise run the CAD Viewer, from any folder:
cadgen viewer --host 127.0.0.1 --json --detach
--detach returns once the viewer answers requests and leaves it running in the
background: always pass it, since a foreground viewer never exits (and piping its
output through tail can hide the URL for good). It starts this machine's one viewer,
or reuses it. Read url from its one JSON line (never guess the port), and for each
file return url?file=<its URL-encoded absolute path>. If it fails to launch, say so.
Review placement, resources and joints. The viewer does not execute simulator plugins or validate dynamics; keep simulator checks separate.
.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).Run cadgen as Setup defines it. cadgen doctor <skill-dir> reports the installation in use and checks that it is the one this skill pins — docs drift silently on another. Validation itself needs nothing beyond the Python standard library; only snapshots need the browser. Use cadgen <verb> --help for the complete current interface.
cadgen sdf validate path/to/model.sdf
cadgen sdf validate path/to/model.sdf --strict
cadgen sdf validate path/to/model.sdf --json
cadgen sdf snapshot path/to/model.sdf review.png
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 prints one line of {"ok", "path", "issues": [{"severity", "code", "message", "element", "hint"}], "summary"}, where element is the XML path. It exits nonzero if the target fails.
External checking is on by default:
cadgen sdf validate path/to/model.sdf --gz-check required
cadgen sdf validate path/to/model.sdf --gz-check never
gz sdf --check is target-consumer validation. --gz-check auto is the default: it runs when gz is on PATH, reporting gz_check_passed or the tool's own output as the error gz_check_failed, and otherwise notes info: gz_check_unavailable and carries on. An absent optional tool says nothing about the file, so it never fails a clean document and --strict does not change that. --gz-check required makes the tool mandatory — a missing gz is then an error — and --gz-check never skips it outright.
When finishing an SDF task, include a compact report:
Validated: path/to/model.sdf
Checks run:
- bundled SDF validation: passed
- gz sdf --check: skipped, gz not installed
- simulator load: skipped, target simulator unavailable
- viewer review: live link returned, or explicit launch failure
Assumptions:
- Assumed mesh units are meters.
- Assumed lidar frame is coincident with lidar_link.
Risks:
- Camera plugin filename was not verified in the target simulator environment.
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.
cadgen sdf snapshot path/to/robot.sdf review.png
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 their defaults, where the CAD Viewer opens the robot (the
"jointValues" job field is the same thing in a packet). The snapshot draws the robot with the
viewer's own scene, so it shows what the viewer shows, and a link mesh that cannot be loaded
fails it rather than leaving the link out. Robots are authored in metres and are framed on the
robot scene scale automatically.
A normal snapshot uses the Solid preset and Light appearance; omitted groups inherit preset defaults.
Pass --display render for the shared photographic scene. Inline display JSON and
JSON files use grouped settings such as lighting, background, and floor;
appearance is light (default) or dark. Projection and focal length belong
in display.camera. Top-level --camera and --joint-values remain active in every display
mode. The display modes are solid and render: edges, clip, exploded, the
xray, hidden-line and wireframe modes and the hidden/off surface styles
describe a STEP model's CAD edges, parts and solids, and are refused by name here.
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.mdLICENSE (opens in a new tab)agents/openai.yaml (opens in a new tab)references/design-ledger.md (opens in a new tab)references/examples.md (opens in a new tab)references/frame-semantics.md (opens in a new tab)references/interoperability.md (opens in a new tab)references/llm-guardrails.md (opens in a new tab)references/sdf-workflow.md (opens in a new tab)references/smoke-tests.md (opens in a new tab)references/validation.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sdf, sdf-format, gazebo, simulation, robot-modeling, xml-authoring
12 skills in this plugin
/bambu-labsSend prints to Bambu Lab printers through Bambu Connect, Bambu Lab's official app for printing from other software, or Bambu Studio. Use when the user wants to print a sliced `.gcode.3mf`, a Bambu `.gcode` or an unsliced model on a Bambu Lab printer, over Bambu Cloud or LAN. The agent opens the file in the app; the user picks the printer and starts the print there./cadCreate/edit parametric CAD models, organize CAD projects, export STEP/STL/3MF/GLB files, resolve prompt references, and measure geometry with cadgen. Open and visually review existing STEP/STP, STL, 3MF and GLB files in CAD Viewer./dfam-checkMeasure mesh files against Design for Additive Manufacturing (DfAM) rules and report printability findings per process (FDM, SLS, SLA/DLP, metal PBF, MJF). Use when the user asks whether a part is printable, wants overhang/wall-thickness/support analysis of an `.stl`, `.obj`, `.ply`, or `.3mf` mesh, wants a build-orientation recommendation, or wants DfAM redesign guidance before slicing with `$gcode` or regenerating geometry with `$cad`.npx claudepluginhub patel-sahil-001/text-to-cad --plugin text-to-cadOther plugins' skills for the same job