К основному содержанию
скилл Claude Code CX Codex Cursor GitHub Copilot

urdf — скилл для Claude Code: что делает и как установить

Скилл помогает создавать, проверять и отлаживать описания роботов в формате URDF. Пригодится для работы со звеньями, сочленениями и геометрией.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add earthtojake/text-to-cad --skill urdf -a claude-code
Открыть на GitHub

Что делает urdf

Скилл работает с файлами .urdf: помогает редактировать XML-описание робота, проверять дерево звеньев, параметры сочленений, оси, лимиты, инерциальные данные, визуальную и collision-геометрию, ссылки на меши и материалы. Для расчётных значений вроде тензоров инерции предлагает использовать формулы или вспомогательные скрипты, а сам .urdf оставляет главным артефактом.

Проверка выполняется командами cadgen urdf validate, включая режимы --strict, --json и разрешение package:// через --packages. Для просмотра модели предусмотрен снимок или CAD Viewer; можно проверить масштаб мешей и положение сочленений. Для запуска cadgen используется uvx с Python 3.13 и cadgen==0.7.26, а снимкам нужен браузер. Структурная валидация сама по себе не доказывает правильность пространственных преобразований, поэтому это повод отдельно проверить модель в просмотрщике.

Какие задачи решает

  • создать XML-описание робота в формате URDF
  • проверить дерево звеньев и семантику сочленений
  • рассчитать инерциальные значения вместо ручного ввода
  • найти ошибки в геометрии, мешах и материалах
  • просмотреть положение сочленений и масштаб модели

Примеры запросов агенту

  • Создай или обнови `robot.urdf`, добавь журнал допущений и проверь его через `cadgen urdf validate`.
  • Проверь `robot.urdf` в строгом режиме, включая ссылки `package://` из пакета `robot_description`.
  • Сделай снимок модели из `robot.urdf` и проверь масштаб мешей и положение всех подвижных сочленений.

Как установить urdf

1Через Skills CLI (Vercel)

npx skills add earthtojake/text-to-cad --skill urdf -a claude-code

2Вручную: положить файлы

~/.claude/skills/urdf/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/urdf/

Из того же набора7

Весь набор →
sdf earthtojake Скилл создаёт и проверяет SDFormat-файлы для моделей и миров, а затем помогает подготовить их к передаче в симулятор. Claude Code CX Codex Cursor +1 10 500установок srdf earthtojake Скилл помогает создавать и проверять SRDF для MoveIt2 поверх URDF. Пригодится для планирования движений, групп и семантики робота. Claude Code CX Codex Cursor +1 10 300установок gcode earthtojake Нарезает модели STL, 3MF и OBJ в G-code через OrcaSlicer. Подходит, когда нужно подготовить файл для печати без подключения к принтеру. Claude Code CX Codex Cursor +1 9 500установок bambu-labs earthtojake Открывает файл в Bambu Connect или Bambu Studio, чтобы вы выбрали принтер и запустили печать. Пригодится, когда модель уже нарезана и лежит на диске. Claude Code CX Codex Cursor +1 9 200установок dxf earthtojake Скилл собирает и проверяет 2D DXF-чертежи из Python-скриптов на build123d: контуры, прокладки, панели, развёртки под лазер. Claude Code CX Codex Cursor +1 9 100установок dfam-check earthtojake Скилл проверяет 3D-сетки на пригодность к 3D-печати по правилам DfAM перед нарезкой в слайсере или отправкой на станок. Claude Code CX Codex Cursor +1 4 100установок

Похожие

openspec-apply-change openspec Скилл запускает пошаговую реализацию задач из спецификации OpenSpec в кодовой базе. Пригодится, когда нужно взять готовое изменение и выполнить пункты из плана разработки. Claude Code CX Codex Cursor +1 4 000установок openspec-explore openspec Скилл переводит агента в режим обсуждения идей, проблем и требований до изменения проекта OpenSpec. Подходит для разведки и уточнения задачи. Claude Code CX Codex Cursor +1 4 000установок openspec-propose openspec Скилл для Claude Code создаёт полный пакет планирования OpenSpec за один шаг. Он формирует архитектурное решение, дельту спецификаций и задачи без изменения кода. Claude Code CX Codex Cursor +1 4 000установок fixing-metadata ibelick Проверяет и приводит в порядок метаданные страниц: заголовки, описания, canonical, Open Graph, карточки Twitter, иконки и JSON-LD. Claude Code CX Codex Cursor +1 18 200установок core-web-vitals web-quality-skills Скилл для оптимизации Core Web Vitals: сначала измеряет, потом правит LCP, INP и CLS. Полезен, когда страница тормозит или прыгает вёрстка. Claude Code CX Codex Cursor +1 31 900установок react vercel-labs Скилл помогает собирать React-интерфейсы из JSON-спецификаций через json-render. Нужен для каталогов компонентов и UI, который создаёт ИИ. Claude Code CX Codex Cursor +1 16 300установок setup-matt-pocock-skills Matt Pocock Скилл настраивает репозиторий для инженерных скиллов Matt Pocock: задаёт трекер задач, метки триажа и расположение доменной документации. Запустите его перед первым использованием остальных скиллов. Claude Code 1 052 851установок to-tickets Matt Pocock Разбивает план, спецификацию или переписку на небольшие сквозные задачи и отмечает, какие из них блокируют остальные. Пригодится, когда нужно согласовать порядок работы до публикации задач в трекере. Claude Code 711 230установок

Вопросы о urdf

Как установить urdf в Claude Code?

Выполните npx skills add earthtojake/text-to-cad --skill urdf -a claude-code, затем повторите npx skills add earthtojake/text-to-cad --skill urdf -a claude-code. Файл скилла находится по пути ~/.claude/skills/urdf/SKILL.md.

Что делает скилл urdf?

Он помогает создавать, редактировать, проверять и отлаживать .urdf-файлы. Скилл разбирает структуру робота, сочленения, геометрию, меши и инерциальные данные, а затем запускает валидацию через cadgen.

Что нужно для проверки URDF?

Для cadgen используется uvx с Python 3.13 и cadgen==0.7.26. Снимок модели требует браузер, а --packages нужен, когда проверяются ссылки package://.

Исходный текст

SKILL.md · MIT
---
name: urdf
description: URDF robot description authoring and validation. Use when creating, editing, inspecting, validating, or debugging `.urdf` files, robot links, joints, limits, inertials, visual/collision geometry, mesh references, frame conventions, or robot-description artifacts. Use the SRDF skill for MoveIt2 semantic groups and IK/path-planning semantics; use the CAD skill for STEP/STL/3MF/DXF/GLB outputs. Open and visually review existing URDF files in CAD Viewer.
license: MIT
---

# URDF

Provenance: maintained in [earthtojake/text-to-cad](https://github.com/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 for URDF robot-description outputs. Treat URDF work as constrained kinematic modeling, not just XML writing. The main correctness risks are frame placement, joint-axis semantics, unit consistency, mesh scale, and inertial data.

## Setup

Run cadgen through [uv](https://docs.astral.sh/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.26 cadgen`
- `python` below means `uvx --no-config --managed-python --python 3.13 --from cadgen==0.7.26 python`

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

## Core Rules

1. The `.urdf` file is the source of truth. Author and edit URDF XML directly; do not build a Python generation pipeline for it. There is no `gen_urdf()` contract.
2. Before writing or changing URDF XML, establish the robot's frame, joint, geometry, unit, and assumption ledger and embed it as a comment block at the top of the `.urdf` file. See `references/design-ledger.md`.
3. Use URDF frame semantics exactly. Joint origins, link frames, joint axes, and visual/collision/inertial origins use different reference frames. See `references/frame-semantics.md`.
4. Do not infer spatial transforms, mesh units, handedness, axes, or joint signs from vague prose. Use CAD transforms, dimensioned drawings, measured values, existing source data, or explicit documented assumptions.
5. Never freehand numeric values that are the result of computation — inertia tensors, centers of mass, unit conversions across many links, mirrored transforms. Compute them: closed-form formulas for primitives, or a throwaway helper script for mesh-derived values. See `references/inertials.md`.
6. For physical links, model `inertial`, `visual`, and `collision` separately when the target consumer needs them. Frame-only links may intentionally omit mass and geometry.
7. Validate every created or modified `.urdf` with `cadgen urdf validate` before reporting completion. See `references/validation.md`.
8. Helper scripts are allowed and encouraged for computation, but they are scaffolding, not the artifact's source of truth. For complex or genuinely parametric models it is reasonable to keep a model-local helper script on disk next to related source code (for example STEP generator sources) and note it in the ledger; this is optional, and the checked-in `.urdf` remains canonical.

## 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 mesh scale and placement, then sweep every movable joint against the
design ledger. A link alone does not complete the [viewer sweep](references/validation.md);
report any checks you could not perform.

## Workflow

1. Identify the target `.urdf` file and its consumers: RViz, robot_state_publisher, Gazebo/Ignition, MoveIt, a real robot driver, or another simulator.
2. Read or create the design ledger before editing frames, origins, axes, mesh scale, limits, or inertials. Keep the ledger as a comment block in the `.urdf` itself.
3. Prepare mesh assets first when links reference meshes: one mesh per link, exported in that link's frame by the owning CAD/mesh workflow. See `references/meshes.md`.
4. Author or edit the URDF XML directly, following `references/authoring-contract.md` for structure, ordering, and naming.
5. Compute — never guess — inertials and other derived numbers. See `references/inertials.md`.
6. Validate with `cadgen urdf validate`; fix findings and re-validate until clean.
7. Run the verification recipe in `references/validation.md`: external tools when available (`check_urdf`), then a viewer review sweeping every joint.
8. Report remaining assumptions, unchecked spatial data, and validation gaps.

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

The validator shape is:

```bash
cadgen urdf validate path/to/robot.urdf
cadgen urdf validate path/to/robot.urdf --strict
cadgen urdf validate path/to/robot.urdf --json
cadgen urdf validate path/to/robot.urdf --packages robot_description=/path/to/pkg
cadgen urdf snapshot path/to/robot.urdf review.png
```

The validator collects all findings in one pass (severity, code, XML path) across XML structure, tree topology, joint semantics (limits, mimic, dynamics), geometry, mesh references, materials, inertial physics, and misspelled elements, and prints a summary. One run validates ONE file: `--strict` treats warnings as failures; `--json` prints one line of `{"ok", "path", "issues": [{"severity", "code", "message", "element", "hint"}], "summary"}`, where `element` is the XML path; `--packages NAME=PATH` resolves `package://` mesh URIs and repeats for several roots. It exits nonzero if the target fails. Relative targets resolve from the current working directory; run from the workspace that owns the files.

Validation is a guardrail, not spatial proof: a URDF can pass every structural check while placing a joint in the wrong spot. The ledger and viewer sweep exist for that reason.

## Snapshot Tool

`cadgen urdf 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 urdf snapshot path/to/robot.urdf review.png
```

It accepts `.urdf` only. 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 Solid mode and Light appearance. The display mode is `solid`
(the default) or `parts` (each link its own colour), each at its own defaults;
`--grid` draws the measuring grid under the robot, and `--preview` draws Preview's
shared photographic scene instead, in perspective. Inline display JSON and JSON files
are the Viewer's display object: `mode`, `grid`, `appearance` (`light`, the default,
or `dark`), `camera` (projection and focal length) and `clip`.
Top-level `--camera` and `--joint-values` remain active in every display mode.
`display.clip` cuts the robot as the viewer's Clip does
(`{"clip":{"axis":"x","at":0.05}}`, `at` in metres); `exploded`, and `shaded`, `xray`,
`hidden-line` and `wireframe`, describe a STEP model's CAD edges and parts, and are
refused by name here. A Quick Edit job from the viewer replays as it is: its `jointValues`, its
`selection.hide` (the parts hidden in the Links panel, by their ids), its clip and
annotation (`cadgen snapshot --job <file>`). Quick Edit supplies inline JSON or a
`.snapshot.json` path; save inline JSON to a temporary file before using `--job`.
Inspect supplied annotations before editing. Without annotations, the captured
view is optional context; render it when useful to the request.

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 urdf snapshot TARGET [OUT] [flags]`, the same one every
format door uses. Use `cadgen urdf snapshot --help` for the complete current
interface — the flags a robot cannot act on are absent from it, not refused by it.

## References

- Authoring contract (structure, ordering, golden skeleton): `references/authoring-contract.md`
- Design ledger: `references/design-ledger.md`
- Frame semantics: `references/frame-semantics.md`
- Mesh preparation and references: `references/meshes.md`
- Inertials (formulas, scripts, sanity gates): `references/inertials.md`
- URDF edit workflow: `references/urdf-workflow.md`
- Validation and verification recipe: `references/validation.md`

© earthtojake · MIT · earthtojake/text-to-cad

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой