Agent skill

Transform Onshape Urdf

by i2rt-robotics in i2rt-robotics/i2rt

Normalize a raw ONShape-exported YAM-family URDF into the aligned, world-referenced form used across i2rt robot models, as a two-stage pipeline around a human inspection checkpoint.

MITAuto-check passed

Install Transform Onshape Urdf

skills CLI
$ npx skills add i2rt-robotics/i2rt --skill transform-onshape-urdf -a claude-code

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

GitHub CLI
$ gh skill install i2rt-robotics/i2rt transform-onshape-urdf --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/i2rt-robotics/i2rt.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/transform-onshape-urdf .claude/skills/transform-onshape-urdf && 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
transform-onshape-urdf
GitHub stars
165
Token cost
~2.4k tokens
SKILL.md length
1,052 words
Files
5 (incl. scripts)
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Normalize a raw ONShape-exported YAM-family URDF into the aligned, world-referenced form used across i2rt robot models, as a two-stage pipeline around a human inspection checkpoint.

  • Works in 2 steps: the transform (what… → the heading (what apply_urdf_heading.py…
  • Importing a fresh ONShape URDF export (robot named urdftopassembly
  • SKILL.md covers When to use, Run it, Stage 1 — the transform (what… and Stage 3 — the heading (what…, plus 3 more sections
  • Runs Python scripts from its folder; calls python and git

What it does

Transform Onshape Urdf is an agent skill from i2rt-robotics/i2rt. Normalize a raw ONShape-exported YAM-family URDF into the aligned, world-referenced form used across i2rt robot models, as a two-stage pipeline around a human inspection checkpoint. Use when importing a fresh ONShape URDF export (robot named "urdftopassembly", package:// mesh paths, a synthetic "root" link, dofjoint names, and duplicate 1 links wired by 分组/紧固 fixed joints); when removing a synthetic root link and baking its rotation into the base while keeping every downstream link in place; when applying a…

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts (for example `scripts/apply_urdf_heading.py`, `scripts/normalize_onshape_urdf.py` and `scripts/urdf_align_lib.py`).

The licence is MIT.

When your agent uses it

  • Importing a fresh ONShape URDF export (robot named urdftopassembly
  • Package:// mesh paths
  • A synthetic root link
  • Duplicate 1 links wired by 分组/紧固 fixed joints)

Example prompts

  • “urdftopassembly”
  • “/transform-onshape-urdf”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. the transform (what normalize_onshape_urdf.py does)
  2. the heading (what apply_urdf_heading.py does)

What it can do on your machine

Read from SKILL.md and the folder at commit 120c3c8. 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

    Ships 4 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • git

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

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    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

Transform Onshape Urdf loads about 2.4k tokens when it runs. Until then it costs about 217 tokens; SKILL.md has 1,052 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~217
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

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); the scripts in this folder are not scanned.

SKILL.md

The full file from i2rt-robotics/i2rt at commit 120c3c8, republished under its MIT licence (© i2rt-robotics). 1,052 words, ~2,394 tokens.

Download SKILL.mdSave it as .claude/skills/transform-onshape-urdf/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
transform-onshape-urdf
description
Normalize a raw ONShape-exported YAM-family URDF into the aligned, world-referenced form used across i2rt robot models, as a two-stage pipeline around a human inspection checkpoint. Use when importing a fresh ONShape URDF export (robot named "urdf_top_assembly", package:// mesh paths, a synthetic "root" link, dof_joint* names, and duplicate *_1 links wired by 分组/紧固 fixed joints); when removing a synthetic root link and baking its rotation into the base while keeping every downstream link in place; when applying a world-axis heading correction that rotates the base mesh AND inertia together and rigidly rotates the whole arm; when fixing mesh filename case/paths; or when re-running such a transform idempotently. Runs normalize_onshape_urdf.py (stage 1) and apply_urdf_heading.py (stage 3), with view_urdf.py as the checkpoint in between.

Transform ONShape URDF → aligned model

Turns a raw ONShape YAM-family export into the clean form established by yam.urdf (commit 8975c25). This was one script (transform_onshape_urdf.py); it is now two, split around a mandatory visual-inspection checkpoint so the heading rotation -- a human judgment -- is never applied as a default guess:

The shared math/XML helpers live in scripts/urdf_align_lib.py.

The downstream URDF→MJCF alignment (regenerate the .xml, then re-sync gripper mounts) is owned by .agents/skills/align-urdf-mjcf/SKILL.md. Treat the URDF as the source of truth; regenerate the .xml (MJCF) from the fixed URDF.

When to use

  • A fresh ONShape export needs to become a usable URDF: <robot name="urdf_top_assembly">, package://.../meshes/Name.stl paths, a root link above base, dof_joint0..N joints, and duplicate link*_1 / 分组 / 紧固 structural joints.
  • You need to drop a synthetic root and re-home the base heading without disturbing the arm.
  • You need to re-run normalization safely (it must be a no-op the second time).

Run it

bash
# Stage 1 — normalize (deterministic; edits in place):
python .agents/skills/transform-onshape-urdf/scripts/normalize_onshape_urdf.py <path/to/model.urdf> \
    [--assets-dir assets] [--name NAME] [--dry-run] [--force]

# Stage 2 — inspect (required checkpoint):
python .agents/skills/transform-onshape-urdf/scripts/view_urdf.py <path/to/model.urdf>   # or --screenshot out.png (headless)

# Stage 3 — apply the user's heading (previews by default; --apply writes):
python .agents/skills/transform-onshape-urdf/scripts/apply_urdf_heading.py <path/to/model.urdf> --axis z --deg <N> [--apply]
  • normalize --name defaults to the URDF's parent dir name, skipping a vN version dir (arm/yam/v1/yam.urdf -> yam). Pass it explicitly when the export sits somewhere unrelated.
  • normalize --dry-run prints the verification report and the resulting base + joint1, writing nothing. Always dry-run first.
  • apply_urdf_heading writes only with --apply; without it, it previews. Different YAM arms need different headings (each export's baked R0 differs) — inspect and confirm visually. Common case is a yaw about world Z; yam_pro needed 0°.

Stage 1 — the transform (what normalize_onshape_urdf.py does)

RPY convention (URDF): R = Rz(yaw) @ Ry(pitch) @ Rx(roll).

  1. Keep only the actuated chain. The real kinematic tree is the dof_joint* joints. Drop every other joint (分组/紧固/fastened duplicates) and every link not on that chain. Rename the survivors to canonical names by stripping a trailing _<n> (base_1→base, link2_1→link2, gripper_1→gripper, tip_right_1→tip_right), and rename the base link to base whatever the export called it (ultra_base→base). The base is identified structurally as the parent of dof_joint1, never by name — an export that names it after the product would otherwise slip past step 3's child == "base" guard (reported as "synthetic root already removed") and be rejected by every downstream stage, all of which require the name base.
  2. Fix meshes. Rewrite each reference to assets/<file>, preferring an exact case-insensitive match on disk, else the suffix-stripped lowercase name with step 1's link renames applied to the stem (Gripper.stl→gripper.stl, link5_1.stl→link5.stl, ultra_base.stl→base.stl) — a link and its mesh are always renamed together.
  3. Remove the synthetic root, baking R0. The synthetic root is the parent of the joint whose child is base (in a raw export that is dof_joint0, root -> base). Capture its rotation R0 = Rz(yaw)Ry(pitch)Rx(roll), delete the root link and that joint, and left-multiply R0 into the base visual origin, the base inertial origin (position + rpy), and the base -> link1 joint origin. The inertia tensor components and every joint's local axis are unchanged; joints 2..N are untouched, so the arm rotates rigidly. Rotating the base mesh and its inertia by the same R0 keeps them consistent. Guard: if no joint has child base, the root is already gone and this step is skipped — it never re-bakes and never mistakes a rootless base for a synthetic root.
  4. Rename joints dof_jointN → jointN; set the robot name.
  5. Insert an onshape-normalize: marker recording R0 and that a heading is still pending.

No heading is applied here. That is stage 3, gated by the checkpoint.

Show full SKILL.md (452 more words)Show less

Stage 3 — the heading (what apply_urdf_heading.py does)

Construct the requested rotation R (--axis/--deg, or --rpy "r p y") and left-multiply it into the base visual origin, the base inertial origin (the same R — mesh and inertia never diverge), and the base -> link1 joint origin (rigidly rotating the whole arm). Because origins are left-multiplied, this composes with stage 1's R0 as R @ R0 — identical to the old one-shot transform's combined --heading-deg. Inertia components and downstream joints are untouched. An onshape-heading: marker is appended. The op is not idempotent (re-running stacks another rotation), so it previews by default and writes only with --apply.

Idempotency contract (stage 1)

Before doing anything, normalize_onshape_urdf.py classifies the file structurally:

  • is_raw: a root link, dof_joint* names, package:// paths, non-arm (分组/紧固) joints, or *_<n> duplicate links. A non-raw file has nothing to normalize (each step is a no-op), so it is skipped.
  • has_marker: the onshape-normalize: comment is present.

Decision: not raw → skip (already normalized). Raw + marker + no --force → skip. Raw and (--force or no marker) → normalize, then write the marker. Every step is individually idempotent, so re-running is safe.

Verify (the scripts refuse to write on failure)

Both stage scripts verify before writing and print a report:

  • Rigidity: parent→child origins for every joint below base -> link1 are unchanged (the arm is a pure rigid rotation).
  • Joint world axes are recomputed and printed; the FK also proves the tree is acyclic with a single base root.
  • Base mesh & inertia aligned: the base visual and inertial orientations must match (the mesh and inertia were rotated by the identical R).
  • Meshes all resolve on disk.

After writing, additionally:

bash
git diff -- <model.urdf>        # base visual+inertial + joint1 rotated; root/dof_joint0 gone;
                                # joints renamed; mesh case fixed; other links byte-identical

Then inspect with python .agents/skills/transform-onshape-urdf/scripts/view_urdf.py <model.urdf> and confirm the arm assembles and the base faces the intended forward direction — the required heading checkpoint from align-urdf-mjcf. Finally regenerate the MJCF from the URDF (and re-sync gripper mounts — see align-urdf-mjcf).

Assumptions / limits

  • ONShape naming conventions: the actuated chain uses dof_joint*; structural duplicates use 分组/紧固; per-instance suffixes are _<n>; the base link is the parent of dof_joint1 and may be named anything. Verified end-to-end on yam_pro and yam_ultra v2.
  • The heading is a single rotation about one world axis (or an explicit --rpy). If a model needs a different base orientation, pass a different --axis/--deg and confirm by rendering.
  • ONShape prints R0 at 5 decimals (rpy="0 1.5708 ...", and 1.5708 - π/2 = 3.673e-6), so a plain --deg heading leaves a ~0.0002° tilt in the base that every downstream frame inherits. Since the heading left-multiplies (R_head @ R0), you can absorb it: pass the intended heading composed with the correction via --rpy. For yam_ultra v2 (R0 = Ry(1.5708), heading z+180°) that was --rpy "0 -3.673205103379957e-06 3.141592653589793" → the product is exactly Rz(π)·Ry(π/2), giving base rpy 0 1.57079632679 3.14159265359 and joint1 xyz 0 0 0.0733.

© i2rt-robotics, 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 4 other files (scripts) in .agents/skills/transform-onshape-urdf of i2rt-robotics/i2rt.

  • SKILL.md
  • scripts/apply_urdf_heading.py
  • scripts/normalize_onshape_urdf.py
  • scripts/urdf_align_lib.py
  • scripts/view_urdf.py

Open the folder on GitHubat commit 120c3c8

Compare with similar skills

Transform Onshape Urdf 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.

Transform Onshape Urdf compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Transform Onshape Urdf this skilli2rt-robotics/i2rt165—~2.4kAutomated safety check: PassMIT
TransformersK-Dense-AI/scientific-agent-skills48k1 repos~2.8kAutomated safety check: NotesApache-2.0
Export0xsline/OpenChatCut2.2k—~2.2kAutomated safety check: WarnAGPL-3.0
Export Download Debuggingnexu-io/open-design100k—~725Automated safety check: PassApache-2.0
Cost Exportruvnet/ruflo74k1 repos~687Automated safety check: NotesMIT
Hugging Face Transformers Usagedavila7/claude-code-templates32k12 repos~1.2kAutomated safety check: PassMIT

Similar skills

  • Transformers

    K-Dense-AI/scientific-agent-skills

    Hugging Face Transformers for loading Hub models, running pipeline inference, text generation, and Trainer fine-tuning on NLP, vision, audio, and multimodal tasks.

    48k GitHub starsUsed in 1 repo~2.8k tokens
    AI & LLM EngineeringAuto-check: notes
  • Export

    0xsline/OpenChatCut

    A skill your agent uses when a OpenChatCut video editing or creation workflow needs export, render, download, share, final delivery, subtitle-file export, render choice, local-only asset handling…

    2.2k GitHub stars~2.2k tokensUpdated yesterday
    Media & CreativeAuto-check: warnings
  • Export Download Debugging

    nexu-io/open-design

    Diagnose and fix browser, preview, or Electron export/download failures, especially image export issues involving Save As, Blob/Data URLs, the File System Access API, createWritable failures, and 0…

    100k GitHub stars~725 tokensUpdated today
    DevelopmentAuto-check passed
  • Cost Export

    ruvnet/ruflo

    Export cost-tracking telemetry in Prometheus textfile or webhook JSON formats — for external observability (Grafana, Datadog, custom dashboards)

    74k GitHub starsUsed in 1 repo~687 tokens
    DevOps & CloudAuto-check: notes
  • Hugging Face Transformers Usage

    davila7/claude-code-templates

    Loads pre-trained Hugging Face Transformers models for text, vision and audio tasks, runs inference with pipelines and fine-tunes on custom datasets.

    32k GitHub starsUsed in 12 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Transformers JS

    sickn33/agentic-awesome-skills

    Use Transformers.js to run state-of-the-art machine learning models directly in JavaScript/TypeScript.

    47k GitHub starsUsed in 1 repo~444 tokens
    AI & LLM EngineeringAuto-check passed

More from i2rt-robotics/i2rt

  • Align Urdf Mjcf

    i2rt-robotics/i2rt

    Align a MuJoCo MJCF robot model with a URDF source while preserving kinematics, geometry, masses, centers of mass, and inertia tensors.

    165 GitHub stars~4.4k tokensUpdated 21 days ago
    Auto-check passed

Questions about Transform Onshape Urdf

What does Transform Onshape Urdf do?

Normalize a raw ONShape-exported YAM-family URDF into the aligned, world-referenced form used across i2rt robot models, as a two-stage pipeline around a human inspection checkpoint. Transform Onshape Urdf is an agent skill from i2rt-robotics/i2rt. Normalize a raw ONShape-exported YAM-family URDF into the aligned, world-referenced form used across i2rt robot models, as a two-stage pipeline around a human inspection checkpoint.

When should I use Transform Onshape Urdf?

Transform Onshape Urdf fits situations like: importing a fresh ONShape URDF export (robot named urdftopassembly; package:// mesh paths; A synthetic root link; duplicate 1 links wired by 分组/紧固 fixed joints).

How do I install Transform Onshape Urdf in Claude Code?

Run `npx skills add i2rt-robotics/i2rt --skill transform-onshape-urdf -a claude-code`. Or copy the skill folder (.agents/skills/transform-onshape-urdf in i2rt-robotics/i2rt) into .claude/skills/transform-onshape-urdf in your project. Claude Code loads it when a task matches its description.

How do I install Transform Onshape Urdf in Codex?

Run `npx skills add i2rt-robotics/i2rt --skill transform-onshape-urdf -a codex`. Or copy the skill folder (.agents/skills/transform-onshape-urdf in i2rt-robotics/i2rt) into .agents/skills/transform-onshape-urdf in your project. Codex loads it when a task matches its description.

Can I use Transform Onshape Urdf 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 i2rt-robotics/i2rt --skill transform-onshape-urdf -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/transform-onshape-urdf, .gemini/skills/transform-onshape-urdf, .github/skills/transform-onshape-urdf and .opencode/skills/transform-onshape-urdf in your project.

What does Transform Onshape Urdf need to run?

Going by SKILL.md and its folder, Transform Onshape Urdf needs Python for the scripts in its folder and the command-line tools its instructions call (python and git). Our summary lists: Python 3.

Does Transform Onshape Urdf access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Transform Onshape Urdf 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Transform Onshape Urdf use?

Transform Onshape Urdf is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Transform Onshape Urdf use?

About 2.4k tokens (SKILL.md is roughly 9.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Transform Onshape Urdf?

Skills that share tags, products or a category with Transform Onshape Urdf: Transformers (K-Dense-AI/scientific-agent-skills, 48k stars), Export (0xsline/OpenChatCut, 2.2k stars), Export Download Debugging (nexu-io/open-design, 100k stars) and Cost Export (ruvnet/ruflo, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Transform Onshape Urdf?

i2rt-robotics (a GitHub organization) maintains it in i2rt-robotics/i2rt, which has 165 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on September 17, 2026.

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