Agent skill

SDFormat Model and World Authoring

by earthtojake in earthtojake/text-to-cad

Authors, validates and reviews SDFormat XML for simulator models and worlds, with explicit frames, SI units and a design ledger.

MITAuto-check passedDevelopment

Install SDFormat Model and World Authoring

skills CLI
$ npx skills add earthtojake/text-to-cad --skill sdf -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install earthtojake/text-to-cad sdf --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/earthtojake/text-to-cad.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/sdf .claude/skills/sdf && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sdf
GitHub stars
19k
Token cost
~2.6k tokens
SKILL.md length
1,257 words
Files
11 (incl. references)
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Authors, validates and reviews SDFormat XML for simulator models and worlds, with explicit frames, SI units and a design ledger.

  • Works in 12 steps: Author .sdf XML directly and validate… → Identify the target consumer before… → Decide document kind: model-level SDF,… → …
  • Writing a robot or object model as an .sdf file
  • SKILL.md covers Setup, Core rules, Scope and Show the model, plus 5 more sections
  • Calls uvx and git

What it does

This skill is for authoring and reviewing SDFormat documents, the XML format that describes simulator models and worlds: links, joints, poses, frames, inertials, visual and collision geometry, sensors, lights, physics, plugins and includes. It is not for signed-distance-field geometry. The .sdf file is the source of truth and the agent writes the XML directly.

Core rules include validating every created or modified file with the cadgen sdf validate command before reporting completion, identifying the target consumer such as a Gazebo version first, choosing between model-level, world-level or model-in-world documents, using SI units, and preferring SDF version 1.12 for new outputs unless a target constrains it. A design ledger kept as a comment block comes before poses, joint axes, mesh scales and sensors, and relative_to and expressed_in must be written explicitly because implicit frame defaults are the most common failure.

Commands run through uv with a pinned cadgen release, which downloads on first use along with a headless browser for snapshots. Reference files cover the ledger, examples, frame semantics, interoperability, LLM guardrails, workflow, smoke tests and validation, and existing files can be reviewed visually in the CAD Viewer.

When your agent uses it

  • Writing a robot or object model as an .sdf file
  • Building a Gazebo world with lights, physics and includes
  • Reviewing an SDF file for frame, pose or inertial mistakes
  • Preparing an SDF model for handoff to a simulator

Example prompts

  • “Create an SDF model of a two-wheeled robot with a lidar sensor and validate it.”
  • “Review this world file for frame and pose mistakes.”
  • “Add collision geometry and inertials to the links in arm.sdf, using SI units.”
  • “Prepare my model for Gazebo and list what the simulator needs.”

Requirements

  • uv, to run the cadgen command-line tool
  • Network access on first run to download cadgen and its headless browser

Workflow steps

12 steps, taken from the first numbered list in SKILL.md.

  1. Author .sdf XML directly and validate every created or modified file with cadgen sdf validate before reporting completion.
  2. Identify the target consumer before editing: Gazebo/libsdformat version, another simulator, visualization-only tooling, model package, or…
  3. Decide document kind: model-level SDF, world-level SDF, or model-in-world. Prefer model-level SDF for reusable robot/object exports.
  4. Use SI units unless the target explicitly requires otherwise: meters, kilograms, seconds, radians.
  5. Prefer version="1.12" for new outputs unless the target consumer constrains the version.
  6. Establish the design ledger before writing poses, frames, joint axes, mesh scales, inertials, sensors, or plugins, and keep it as a…
  7. Write relative_to / expressed_in explicitly on every nontrivial pose and axis. Implicit frame defaults are the top SDF failure mode. See…
  8. Do not infer spatial transforms from visual impression alone. Derive poses, axes, scale, mass, inertia, and frame names from upstream…
  9. When the robot already has a URDF, derive the SDF from it instead of re-authoring geometry; see references/interoperability.md.
  10. Regenerate upstream geometry, mesh, robot-description, render, topology, or package assets with their owning workflows before editing SDF…
  11. After authoring, run available checks: bundled validation (which runs gz sdf --check itself whenever gz is on PATH), simulator load, joint…
  12. Report assumptions, skipped checks, unresolved resource paths, and target-specific compatibility risks.

What it can do on your machine

Read from SKILL.md and the folder at commit 523ae21. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uvx
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.astral.sh

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

SDFormat Model and World Authoring loads about 2.6k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 105 tokens; SKILL.md has 1,257 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~105
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~12k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from earthtojake/text-to-cad at commit 523ae21, republished under its MIT licence (© earthtojake). 1,257 words, ~2,571 tokens.

Download SKILL.mdSave it as .claude/skills/sdf/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
sdf
description
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. Open and visually review existing SDF files in CAD Viewer.
license
MIT

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.

Setup

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.19 cadgen
  • python below means uvx --no-config --managed-python --python 3.13 --from cadgen==0.7.19 python

The first run downloads that installation and the first snapshot its headless browser; later runs reuse both.

Core rules

  1. Author .sdf XML directly and validate every created or modified file with cadgen sdf validate before reporting completion.
  2. Identify the target consumer before editing: Gazebo/libsdformat version, another simulator, visualization-only tooling, model package, or world handoff.
  3. Decide document kind: model-level SDF, world-level SDF, or model-in-world. Prefer model-level SDF for reusable robot/object exports.
  4. Use SI units unless the target explicitly requires otherwise: meters, kilograms, seconds, radians.
  5. Prefer version="1.12" for new outputs unless the target consumer constrains the version.
  6. Establish the design ledger before writing poses, frames, joint axes, mesh scales, inertials, sensors, or plugins, and keep it as a comment block at the top of the .sdf. Use references/design-ledger.md and references/llm-guardrails.md.
  7. Write 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.
  8. Do not infer spatial transforms from visual impression alone. Derive poses, axes, scale, mass, inertia, and frame names from upstream source data, drawings, simulator documentation, measured values, or explicit assumptions. Never freehand computed numbers — use formulas or a throwaway helper script (inertia tensors, unit conversions).
  9. When the robot already has a URDF, derive the SDF from it instead of re-authoring geometry; see references/interoperability.md.
  10. Regenerate upstream geometry, mesh, robot-description, render, topology, or package assets with their owning workflows before editing SDF that references them.
  11. After authoring, run available checks: bundled validation (which runs gz sdf --check itself whenever gz is on PATH), simulator load, joint motion, and plugin/sensor startup.
  12. Report assumptions, skipped checks, unresolved resource paths, and target-specific compatibility risks.

Scope

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 model

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:

    bash
    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.

Workflow

  1. Locate the target .sdf and its consumers.
  2. Read or create the design ledger comment block.
  3. Read references/frame-semantics.md before editing any <pose>, <frame>, joint axis, relative_to, expressed_in, nested scope, sensor frame, or plugin frame.
  4. Author the XML directly, following the worked examples in references/examples.md.
  5. Validate the explicit target with cadgen sdf validate; treat bundled validation as a guardrail, not simulator proof.
  6. Run target-consumer smoke tests when available (references/smoke-tests.md).
  7. Show the result (Show the model). Static rendering does not execute SDF plugins or read file-authored motion metadata.
  8. Report checks run, checks skipped, and assumptions.
Show full SKILL.md (543 more words)Show less

Commands

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.

bash
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:

bash
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.

Required report shape

When finishing an SDF task, include a compact report:

text
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.

Snapshot Tool

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.

bash
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: references/sdf-workflow.md
  • Worked examples (golden skeletons): references/examples.md
  • LLM guardrails: references/llm-guardrails.md
  • Design ledger: references/design-ledger.md
  • Frame semantics: references/frame-semantics.md
  • Validation scope: references/validation.md
  • Smoke tests: references/smoke-tests.md
  • Interoperability notes (URDF-derived SDF, meshes, Gazebo): references/interoperability.md

© earthtojake, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (references) in skills/sdf of earthtojake/text-to-cad.

  • SKILL.md
  • LICENSE
  • agents/openai.yaml
  • references/design-ledger.md
  • references/examples.md
  • references/frame-semantics.md
  • references/interoperability.md
  • references/llm-guardrails.md
  • references/sdf-workflow.md
  • references/smoke-tests.md
  • references/validation.md

Open the folder on GitHubat commit 523ae21

Compare with similar skills

SDFormat Model and World Authoring next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

SDFormat Model and World Authoring compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
SDFormat Model and World Authoring this skillearthtojake/text-to-cad19k—~2.6kAutomated safety check: PassMIT
Vercel Composition Patternssupabase/supabase111k58 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 58 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from earthtojake/text-to-cad

All 12 skills in this repo
  • DfAM Printability Check

    earthtojake/text-to-cad

    Measures STL, OBJ, PLY or 3MF mesh files against additive manufacturing design limits and reports printability findings for each print process.

    19k GitHub starsUsed in 2 repos~1.5k tokens
    Auto-check passed
  • Step Parts

    earthtojake/text-to-cad

    Find, evaluate, and download common purchasable CAD parts from step.parts, including named off-the-shelf actuators, servos, motors, electronics boards, connectors, screws, bolts, nuts, washers…

    19k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Design for Manufacturing Review

    earthtojake/text-to-cad

    Guided DFM review of a part for sheet metal, CNC machining or injection molding, covering bends, tool access, draft and undercuts, with evidence-first measurement rules.

    19k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • DXF Drawing Generation

    earthtojake/text-to-cad

    Generates, regenerates and validates 2D DXF drawings from Python build123d sources for profiles, gaskets, panels and cut layouts, and reviews them in CAD Viewer.

    19k GitHub starsUsed in 1 repo~4.3k tokens
    Auto-check passed
  • OrcaSlicer G-code Slicing

    earthtojake/text-to-cad

    Slices STL, 3MF or OBJ models into printer-ready G-code with OrcaSlicer, either headless from the command line or by opening the model in the app.

    19k GitHub stars~989 tokensUpdated today
    Auto-check passed
  • URDF Robot Description Authoring

    earthtojake/text-to-cad

    Guides writing, editing and validating URDF robot description files, with a design ledger, exact frame semantics and computed inertials checked by a validator.

    19k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed

Categories

Questions about SDFormat Model and World Authoring

What does SDFormat Model and World Authoring do?

Authors, validates and reviews SDFormat XML for simulator models and worlds, with explicit frames, SI units and a design ledger. This skill is for authoring and reviewing SDFormat documents, the XML format that describes simulator models and worlds: links, joints, poses, frames, inertials, visual and collision geometry, sensors, lights, physics, plugins and includes. It is not for signed-distance-field geometry.

When should I use SDFormat Model and World Authoring?

SDFormat Model and World Authoring fits situations like: writing a robot or object model as an .sdf file; building a Gazebo world with lights, physics and includes; reviewing an SDF file for frame, pose or inertial mistakes; preparing an SDF model for handoff to a simulator.

How do I install SDFormat Model and World Authoring in Claude Code?

Run `npx skills add earthtojake/text-to-cad --skill sdf -a claude-code`. Or copy the skill folder (skills/sdf in earthtojake/text-to-cad) into .claude/skills/sdf in your project. Claude Code loads it when a task matches its description.

How do I install SDFormat Model and World Authoring in Codex?

Run `npx skills add earthtojake/text-to-cad --skill sdf -a codex`. Or copy the skill folder (skills/sdf in earthtojake/text-to-cad) into .agents/skills/sdf in your project. Codex loads it when a task matches its description.

Can I use SDFormat Model and World Authoring in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add earthtojake/text-to-cad --skill sdf -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sdf, .gemini/skills/sdf, .github/skills/sdf and .opencode/skills/sdf in your project.

What does SDFormat Model and World Authoring need to run?

Going by SKILL.md and its folder, SDFormat Model and World Authoring needs the command-line tools its instructions call (uvx and git). Our summary lists: uv, to run the cadgen command-line tool; Network access on first run to download cadgen and its headless browser.

Does SDFormat Model and World Authoring access the network?

SKILL.md names 1 domain. As links in the text: docs.astral.sh. This is read from the text; nothing was executed.

Is SDFormat Model and World Authoring safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does SDFormat Model and World Authoring use?

SDFormat Model and World Authoring is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does SDFormat Model and World Authoring use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9k tokens, read only when the agent opens those files.

What are the alternatives to SDFormat Model and World Authoring?

Skills that share tags, products or a category with SDFormat Model and World Authoring: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 297k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains SDFormat Model and World Authoring?

earthtojake (a GitHub user) maintains it in earthtojake/text-to-cad, which has 18,560 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 9, 2026.

Source: earthtojake/text-to-cad on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.