Generated banner for Omniverse Cad To Simready
Generated logo for Omniverse Cad To Simready

Omniverse Cad To Simready

OpenAIOfficialCreated by OmniverseDistributed by OpenAI

  • Skill
  • Workflow
  • Software development
  • Apache-2.0
  • Medium risk
  • Has scripts

From the author

Coordinate the end-to-end CAD/source-asset to SimReady workflow. Use for broad requests such as CAD to SimReady, source asset to simulation-ready USD, or prop packaging that require conversion, material/physics assignment, SimReady conformance, validation, and optional package creation; deploy or verify Content Agents services first when property assignment is enabled; route single-stage work through nested references.
— the description by Omniverse

From the skill’s files

Taken from the skill’s own files (its description, section headings and stated usage). Not an AutoGineer summary, and not written by the author as one.

Coordinate the end-to-end CAD/source-asset to SimReady workflow. Use for broad requests such as CAD to SimReady, source asset to simulation-ready USD, or prop packaging that require conversion, material/physics assignment, SimReady conformance, validation, and optional package creation; deploy or verify Content Agents services first when property assignment is enabled; route single-stage work through nested references. Use this workflow skill when the user wants an end-to-end pipeline from a source asset to a SimReady asset or package. This skill coordinates existing conversion, authoring, validation, conformance, rendering, and packaging references directly. Do not replace the workflow with a single monolithic runner command.

What it does

  • When to Use
  • Prerequisites
  • Minimum Viable Scope
  • First Action
  • Instructions
  • Output Format

When to use it

  • Use for broad requests such as CAD to SimReady, source asset to simulation-ready USD, or prop packaging that require conversion, material/physics assignment, SimReady conformance, validation, and…
  • Use this workflow skill when the user wants an end-to-end pipeline from a source asset to a SimReady asset or package.
  • This skill coordinates existing conversion, authoring, validation, conformance, rendering, and packaging references directly.
  • This skill is documentation-driven and does not ship scripts/run.py.
  • It should not depend on a repository checkout.
  • When a stage needs deterministic execution, run the portable script from that stage reference's installed directory.

Advantages

The skill’s files do not state this.

Usage examples

The skill’s files do not state this.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/openai/omniverse-cad-to-simready/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip omniverse-cad-to-simready.zip -d .agents/skills

Documentation by Omniverse

CAD to SimReady

When to Use

Use this workflow skill when the user wants an end-to-end pipeline from a source asset to a SimReady asset or package. This skill coordinates existing conversion, authoring, validation, conformance, rendering, and packaging references directly. Do not replace the workflow with a single monolithic runner command.

This skill is documentation-driven and does not ship scripts/run.py. It should not depend on a repository checkout. When a stage needs deterministic execution, run the portable script from that stage reference's installed directory. Shell is declared because this workflow invokes installed stage reference scripts directly; it still must not grow a monolithic runner.

Prerequisites

  • Prefer running the preflight reference first for deterministic setup. It installs or verifies local upstream checkouts, writes a cad-to-simready-preflight.json manifest, and exports PHYSICAL_AI_PREFLIGHT_MANIFEST plus PHYSICAL_AI_REQUIRE_PREFLIGHT=1 for downstream references.

  • Python 3.12 and uv (per repo README.md).

  • NVIDIA_API_KEY from https://build.nvidia.com when local Content Agents deployment will run. Already-running endpoints may instead use explicit endpoint variables plus usage tokens such as NGC_API_KEY, NVCF_API_KEY, or CONTENT_AGENTS_*_TOKEN.

  • Docker, NVIDIA Container Toolkit, and an NVIDIA GPU for Content Agents and OVRTX stages.

  • Local upstream checkouts under ${PHYSICAL_AI_SKILL_HUB_UPSTREAM_ROOT:-$HOME/.physical-ai-skill-hub/upstreams} when a downstream stage needs upstream scripts or specs.

Minimum Viable Scope

Conversion-only is a valid workflow request. When the user asks only to convert or smoke-test source asset conversion, set property_assignment_intent=skip, do not deploy Content Agents, run convert-to-usd, then run validate-usd-minimum on the generated USD if conversion succeeds.

Do not imply that uv sync installs every source converter runtime. URDF, MuJoCo/MJCF, and the repo Python dependencies are handled by the project environment, but NVIDIA-backed source conversion requires an installed and validated NVIDIA-Omniverse/usd-convert-cad checkout. If that runtime is missing or does not support the source, preserve the blocked conversion report and its install_hint instead of attempting an unrequested local build or substituting another converter.

First Action

For any broad CAD/source-asset to SimReady request, assume property_assignment_intent=run unless the user explicitly asks for conversion-only, validation-only, or no material/physics assignment.

Before invoking converter, validation, Content Agents, OVRTX, packaging, or FET helper scripts, run the preflight reference or verify an existing PHYSICAL_AI_PREFLIGHT_MANIFEST. Treat preflight as the mandatory dependency bootstrap step, not as workflow routing. If the user explicitly asks not to deploy services or asks for conversion-only/validation-only, use --skip-content-agents. When PHYSICAL_AI_REQUIRE_PREFLIGHT=1 is set and a required component is not ready in the manifest, downstream references must block with the preflight guardrail instead of rediscovering upstreams or services directly.

When property_assignment_intent=run, the first operational action after confirming the source path and resolving intent is to verify or deploy Content Agents services. Do this before asset-context inspection, converter dependency checks, conversion, validation, conformance, rendering, packaging, or upstream source builds.

Use healthy existing endpoints when available. If OVRTX, Material, or Physics endpoints are missing or unhealthy, run deploy-content-agents first and do not continue until the shared standalone OVRTX renderer plus independent Material and Physics service containers are healthy and exported through CONTENT_AGENTS_*_BASE_URL. Deploy the Texture Agent too when texture generation is requested.

If required deployment authentication is missing, ask the user for NVIDIA_API_KEY and wait. If a provided endpoint requires usage auth, ask for the appropriate usage token instead. If deployment cannot produce healthy services, report Content Agents readiness as blocked instead of proceeding to conversion.

Instructions

  1. Confirm the source asset path exists, resolve output_root, and classify the request as end-to-end, conversion-only, validation-only, or packaging.

  2. Resolve property_assignment_intent before running any asset inspection, converter probe, conversion, validation, conformance, rendering, or packaging step.

  3. Run preflight for the selected workflow targets, unless a ready PHYSICAL_AI_PREFLIGHT_MANIFEST is already configured. Source the generated env file before running downstream scripts. Treat preflight as dependency setup only: it may use a provided --source-asset, --source-format, or --conversion-tools value to scope dependency checks, but convert-to-usd and the upstream converter references still decide actual conversion support.

  4. Verify or deploy Content Agents services first when property_assignment_intent=run; block on missing authentication or unhealthy services instead of continuing.

  5. Read references/workflow.md and references/commands.md, then run only the stage references needed for the current request.

  6. Run identify-asset-context on the original source asset when web search is available or property assignment will run.

  7. Route the source through convert-to-usd, or skip conversion for existing USD input and treat the source path as the current USD path.

  8. Run validate-usd-minimum before expensive downstream work. Treat this as a viability gate only: record unit/profile issues such as metersPerUnit != 1.0, but do not run simready-conform-profile, FET001, or any other FET repair before Content Agents assignment when property assignment will run.

  9. Run Content Agents material, physics, and optional texture assignment on the converted/minimum-valid USD when requested or required.

  10. Run simready-conform-profile on the latest simulation USD path after property assignment and preserve every selected FET repair report.

  11. Run validation gates in order: omni-asset-validate, omni-asset-validate-geometry, omni-asset-validate-physics, and simready-validate.

  12. Rerun simready-conform-profile when simready-validate reports a repairable requirement, then rerun profile validation on the newest authored USD.

  13. Run ovrtx-render-service when preview, thumbnail, or inspection images are requested. When package outputs are requested, run assemble-package-source next to create the clean deliverable/ package source from the final USD and thumbnail, then run nv-core-package-sample and nv-core-package-sample-validation on that deliverable folder only.

  14. Emit the consolidated workflow report with the final USD path, all stage reports, validation findings, rerun reasons, and next work.

Use the simready-conform-profile reference only after property assignment when property_assignment_intent=run. It routes feature repair to upstream SimReady Foundation FET skills such as simready-foundation-conform-fet-000-core, simready-foundation-conform-fet-001-minimal, simready-foundation-conform-fet-004-simulate-multi-body-physics, and simready-foundation-conform-fet-005-simulate-grasp-physics from branch main.

If simready-validate reports a repairable requirement after the first conformance pass, feed the structured requirement IDs back into the simready-conform-profile reference before writing the final result. In particular, GSP.001 is owned by upstream simready-foundation-conform-fet-005-simulate-grasp-physics; run that skill when a vision-capable agent can inspect visual evidence or explicit grasp points were provided, otherwise record the FET005 step as blocked by missing vision/points instead of treating it as an optional preview task. For RB.MB.001, route the failure to upstream simready-foundation-conform-fet-004-simulate-multi-body-physics. Do not assume multiple visual prims are multiple rigid bodies; inspect UsdPhysics.RigidBodyAPI applications. When the Physics Agent report shows composed topology optimization or the USD has existing component colliders/part roots and the profile validator reports FET004/RB.MB.001, FET004 should promote those existing components into rigid bodies without creating geometry. Do not mark the gate not applicable until after confirming there are fewer than two reusable body candidates.

Output Format

Emit a consolidated workflow report in Markdown, and include JSON when the workflow writes structured artifacts. The report must include:

  • Overall status: passed, blocked, failed, or needs_rerun.

  • Request summary: source asset path, detected source format, output root, selected SimReady profile/version, and property assignment intent.

  • Ordered stage results: stage reference, input artifact, output USD or USDZ path, report path, status, blocker reason, and rerun reason when applicable.

  • Content Agents readiness and property assignment results with service URLs, tokens, and credentials redacted.

  • Conformance and validation findings grouped by gate, requirement ID, selected FET repair reference, repair-loop attempt, and final disposition.

  • Final artifacts: final reported USD path, render preview path when requested, package root and package validation report when packaging ran, Markdown report path, JSON report path when present, and recommended next work.

Detailed References

Read only the references needed for the current request:

  • references/preflight/README.md: deterministic local setup, manifest/env contract, Linux and Windows wrappers, Content Agents deployment opt-out, and guardrail behavior.

  • references/workflow.md: inputs, source routing, detailed workflow, validation policy, output report fields, approval points, and next steps.

  • references/commands.md: concrete portable script command patterns for each stage.

  • references/assemble-package-source/README.md: two-zone package source assembly, canonical root USD naming, thumbnail placement, and self-contained deliverable checks.

Publishing Layout Notes

Use skills/omniverse-cad-to-simready/ as the source of truth for this product repo's skill. The .agents/skills symlink is a compatibility alias for local agentskills.io-style discovery, and .codex/skills and .claude/skills are agent-specific compatibility aliases.

Frontmatter keeps version and tools at top level for agentskills.io runtime compatibility. NVCARPS discoverability fields live under metadata.

The nested references/ tree is intentional. It keeps one public catalog skill while retaining script-bearing atomic stage references, upstream handoff notes, and router documentation under the workflow. Do not flatten those references or promote nested README references to sibling SKILL.md files unless the repo's publishing model changes.

Limitations

  • This workflow coordinates existing conversion, property assignment, conformance, validation, rendering, and packaging skills; it does not replace them with a single monolithic runner command.

  • Stop at the first failing deployment, conversion, property-assignment, or conformance authoring gate unless the user explicitly asks for best-effort continuation.

  • Upstream simready-foundation-conform-fet-005-simulate-grasp-physics needs visual review or explicit grasp points before it can author a meaningful grasp vector.

Troubleshooting

SymptomCauseFix
Downstream reference reports that cad-to-simready preflight has not prepared a componentPHYSICAL_AI_REQUIRE_PREFLIGHT=1 is set, but the manifest is missing or the required runtime/service is not readyRun preflight/scripts/preflight.py, source the generated env file, or explicitly disable service deployment with --skip-content-agents only when Content Agents are out of scope.
Workflow stops on GSP.001 and reports the failure as unclassifiedVisual evidence or explicit grasp points were not provided to FET005Run upstream simready-foundation-conform-fet-005-simulate-grasp-physics only after a vision-capable agent has reviewed the asset, or pass explicit grasp points. Otherwise report the FET005 step as blocked, not failed.
Validation fails after a meaningful USD artifact already existsWorkflow stopped at the first validation findingContinue remaining diagnostic gates and mark the result needs_rerun. Do not stop at validation findings once a USD artifact has been produced.
Property-assignment stage fails with a missing service endpointContent Agents service was not deployed before conversionRun deploy-content-agents first. Do not start asset inspection, conversion, validation, conformance, rendering, or packaging before Content Agents readiness when property assignment will run.
Material Agent reports that rendering produced 0 images after unit or profile repairA FET repair, commonly FET001 unit normalization, was applied before Material Agent and changed the USD layering/scene state consumed by the serviceRerun assignment from the converted/minimum-valid USD: Material Agent first, then Physics Agent, then run simready-conform-profile and FET repairs on the latest service-authored USD.
Material or Physics Agent local optimized path reports Permission denied: '/app/.build-resources/scene_optimizer_core/python'Local Docker Scene Optimizer bundle permissions prevent the non-root service user from reading the packaged SO runtimeRepair the relevant local container with docker exec --user root content-material-agent-service chmod -R a+rX /app/.build-resources/scene_optimizer_core or docker exec --user root content-physics-agent-service chmod -R a+rX /app/.build-resources/scene_optimizer_core, then rerun the same optimized agent command. Do not treat the no-optimizer fallback as the root cause for instanced/prototype assets.
RB.MB.001 fails even though the asset has many primsThe profile counts UsdPhysics.RigidBodyAPI prims, not visual or collider prims; Physics Agent may author one root rigid bodyRoute to upstream simready-foundation-conform-fet-004-simulate-multi-body-physics. First ensure Physics Agent used composed-topology optimization when applicable, then promote existing component colliders/part roots when the active profile reports FET004/RB.MB.001 and no geometry must be invented.

Hard Rules

  • Prefer the preflight manifest for local upstream roots, converter executables, SimReady validation runtime, OVRTX endpoint, and Content Agents service URLs. When PHYSICAL_AI_REQUIRE_PREFLIGHT=1 is set, do not bypass the manifest with direct upstream discovery.

  • Do not run asset inspection, converter probes, local upstream builds, conversion, validation, conformance, rendering, or packaging before Content Agents readiness when property assignment will run.

  • Use stage-specific installed reference scripts directly. Do not add or call a single omniverse-cad-to-simready runner command.

  • For source conversion, delegate to the convert-to-usd reference; do not substitute another converter for CAD or mesh formats.

  • For property assignment, use Content Agents references as separate atomic steps: material first, then physics, then texture only when requested.

  • When property assignment will run, do not run simready-conform-profile or any FET helper before Content Agents. Validate minimum USD first, then run Content Agents on that converted/minimum-valid USD, then apply FET repairs to the latest service-authored USD.

  • When property assignment will run, do not run simready-validate or any SimReady profile validation before Content Agents. The only validation gate allowed before service calls is validate-usd-minimum, which is a basic USD viability check.

  • Stop at the first failing deployment, conversion, property-assignment, or conformance authoring gate unless the user explicitly asks for best-effort continuation.

  • Do not stop at validation findings after a meaningful USD artifact exists. Continue remaining diagnostic gates and mark the result needs_rerun.

  • Do not leave a GSP.001 profile failure as an unclassified final finding. Route it to upstream simready-foundation-conform-fet-005-simulate-grasp-physics; if the current agent cannot inspect renders or no explicit grasp points are available, report a blocked FET005 repair with the visual evidence path or missing input reason.

  • Preserve every stage report and pass the concrete output USD path from each report into the next stage.

Files

references/simready-validate/scripts/run.py

#!/usr/bin/env python3
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

from __future__ import annotations

import argparse
import json
import os
import platform
from pathlib import Path
import re
import shutil
import subprocess
import sys
import tempfile
from typing import Any
from urllib.parse import urlparse

sys.path.insert(0, str(Path(__file__).resolve().parents[3] / "shared"))

from script_utils import emit_json_report

from preflight_manifest import (
    load_preflight_manifest,
    manifest_path_value,
    preflight_required,
    preflight_status_check,
    ready_executable_from_runtime,
    ready_path_from_runtime,
    ready_path_from_upstream,
    runtime_entry,
)


SKILL = "simready-validate"
TOOL = "simready-validate"
DEFAULT_PROFILE = "Prop-Robotics-Neutral"
DEFAULT_PROFILE_VERSION = "1.0.0"
DEFAULT_UPSTREAM_ROOT = Path.home() / ".physical-ai-skill-hub" / "upstreams"
DEFAULT_FOUNDATION_REPO_URL = "https://github.com/NVIDIA/simready-foundation"
DEFAULT_FOUNDATION_BRANCH = "main"
DEFAULT_SIMREADY_VALIDATE_REQUIREMENT = "simready-validate>=2026.4.8"
NONBLOCKING_SINGLE_COMPONENT_REQUIREMENT = "RB.MB.001"
SIMREADY_RUNTIME_EXTRA_REQUIREMENTS = [
    "numpy>=1.24,<3",
]
USD_EXCHANGE_SDK_FALLBACK_REQUIREMENTS = [
    "usd-exchange>=2.3.0",
    "omniverse-asset-validator",
    "omniverse-usd-profiles>=1.10.22",
]


def _checkout_name_from_repo_url(repo_url: str) -> str:
    name = urlparse(repo_url).path.rstrip("/").rsplit("/", 1)[-1]
    if name.endswith(".git"):
        name = name[:-4]
    return name


DEFAULT_FOUNDATION_CHECKOUT = _checkout_name_from_repo_url(DEFAULT_FOUNDATION_REPO_URL)


def _empty_counts() -> dict[str, int]:
    return {"ERROR": 0, "FAILURE": 0, "WARNING": 0, "INFO": 0}


def _empty_topology(reason: str | None = None) -> dict[str, Any]:
    return {
        "inspected": False,
        "reason": reason,
        "default_prim_path": None,
        "mesh_count": 0,
        "geom_subset_count": 0,
        "mesh_with_geom_subset_count": 0,
        "component_count": None,
        "single_prim_or_geomsubset": False,
    }


def _inspect_asset_topology(asset_path: Path) -> dict[str, Any]:
    try:
        from pxr import Usd, UsdGeom
    except Exception as exc:
        return _empty_topology(f"OpenUSD Python APIs are unavailable: {exc}")

    try:
        stage = Usd.Stage.Open(str(asset_path))
    except Exception as exc:
        return _empty_topology(f"Could not open USD stage: {exc}")
    if stage is None:
        return _empty_topology("Could not open USD stage")

    default_prim = stage.GetDefaultPrim()
    root = default_prim if default_prim and default_prim.IsValid() else stage.GetPseudoRoot()
    mesh_count = 0
    geom_subset_count = 0
    mesh_paths_with_subsets: set[str] = set()
    for prim in Usd.PrimRange(root):
        if not prim.IsActive():
            continue
        if prim.IsA(UsdGeom.Mesh):
            mesh_count += 1
        is_geom_subset = prim.GetTypeName() == "GeomSubset"
        try:
            is_geom_subset = is_geom_subset or bool(UsdGeom.Subset(prim))
        except Exception:
            pass
        if is_geom_subset:
            geom_subset_count += 1
            parent = prim.GetParent()
            if parent and parent.IsA(UsdGeom.Mesh):
                mesh_paths_with_subsets.add(str(parent.GetPath()))

    component_count = 0
    if mesh_count == 1:
        component_count = max(geom_subset_count, 1)
    elif mesh_count > 1:
        component_count = mesh_count

    return {
        "inspected": True,
        "reason": None,
        "default_prim_path": str(default_prim.GetPath()) if default_prim and default_prim.IsValid() else None,
        "mesh_count": mesh_count,
        "geom_subset_count": geom_subset_count,
        "mesh_with_geom_subset_count": len(mesh_paths_with_subsets),
        "component_count": component_count,
        "single_prim_or_geomsubset": component_count == 1,
    }


def _issue_requirement_id(issue: dict[str, Any]) -> str | None:
    for key in ("requirement_id", "requirement"):
        value = issue.get(key)
        if value:
            return str(value)
    text = str(issue.get("message", ""))
    match = re.search(r"\b[A-Z]+(?:\.[A-Z]+)*\.\d+\b", text)
    return match.group(0) if match else None


def _recount_issues(issues: list[dict[str, Any]]) -> dict[str, int]:
    issue_counts = _empty_counts()
    for issue in issues:
        severity = str(issue.get("severity", "INFO")).upper()
        issue_counts[severity] = issue_counts.get(severity, 0) + 1
    return issue_counts


def _issue_messages(issues: list[dict[str, Any]], severities: set[str]) -> list[str]:
    return [
        str(issue.get("message", issue))
        for issue in issues
        if str(issue.get("severity", "")).upper() in severities
    ]


def _apply_single_component_rbmb001_policy(report: dict[str, Any], asset_path: Path) -> dict[str, Any]:
    topology = _inspect_asset_topology(asset_path)
    issues = [issue for issue in report.get("issues", []) if isinstance(issue, dict)]
    ignored_issues: list[dict[str, Any]] = []
    remaining_issues: list[dict[str, Any]] = []
    can_ignore_rbmb001 = bool(topology.get("single_prim_or_geomsubset"))

    for issue in issues:
        if can_ignore_rbmb001 and _issue_requirement_id(issue) == NONBLOCKING_SINGLE_COMPONENT_REQUIREMENT:
            ignored = dict(issue)
            ignored["nonblocking_reason"] = (
                f"{NONBLOCKING_SINGLE_COMPONENT_REQUIREMENT} is non-blocking for assets with a single mesh "
                "component or a single GeomSubset component."
            )
            ignored_issues.append(ignored)
        else:
            remaining_issues.append(issue)

    ignored_requirements = sorted(
        {
            str(_issue_requirement_id(issue))
            for issue in ignored_issues
            if _issue_requirement_id(issue)
        }
    )
    report["asset_topology"] = topology
    report["ignored_issues"] = ignored_issues
    report["validation_policy"] = {
        "single_component_rb_mb_001_nonblocking": can_ignore_rbmb001,
        "ignored_requirements": ignored_requirements,
    }

    if not ignored_issues:
        return report

    report["issues"] = remaining_issues
    report["issue_counts"] = _recount_issues(remaining_issues)
    requirement_counts = dict(report.get("requirement_counts", {}))
    for requirement_id in ignored_requirements:
        requirement_counts.pop(requirement_id, None)
    report["requirement_counts"] = requirement_counts

    for feature in report.get("feature_results", []):
        if not isinstance(feature, dict):
            continue
        failing_requirements = _parse_failing_requirements(feature.get("failing_requirements"))
        if NONBLOCKING_SINGLE_COMPONENT_REQUIREMENT not in failing_requirements:
            continue
        remaining = [
            requirement
            for requirement in failing_requirements
            if requirement != NONBLOCKING_SINGLE_COMPONENT_REQUIREMENT
        ]
        feature["failing_requirements"] = remaining
        ignored = _parse_failing_requirements(feature.get("ignored_requirements"))
        if NONBLOCKING_SINGLE_COMPONENT_REQUIREMENT not in ignored:
            ignored.append(NONBLOCKING_SINGLE_COMPONENT_REQUIREMENT)
        feature["ignored_requirements"] = ignored
        if not remaining:
            feature["passed"] = True

    errors = _issue_messages(remaining_issues, {"ERROR", "FAILURE"})
    warnings = _issue_messages(remaining_issues, {"WARNING"})
    warnings.append(
        f"Ignored non-blocking {NONBLOCKING_SINGLE_COMPONENT_REQUIREMENT} for single-component asset topology "
        f"(mesh_count={topology.get('mesh_count')}, geom_subset_count={topology.get('geom_subset_count')})."
    )
    passed = not errors
    report["errors"] = errors
    report["warnings"] = warnings
    report["passed"] = passed
    report["status"] = "PASS" if passed else "FAIL"
    if passed:
        for profile_result in report.get("profile_results", []):
            if isinstance(profile_result, dict):
                profile_result["passed"] = True
    report["next_step"] = "simready-profile-validation-complete" if passed else "simready-conform-profile"
    return report


def _blocked_report(asset_path: Path | None, command: list[str], profile: str, profile_version: str, error: str) -> dict[str, Any]:
    return {
        "asset_path": str(asset_path.resolve()) if asset_path else "",
        "validator_skill": SKILL,
        "validator_tool": TOOL,
        "passed": False,
        "status": "BLOCKED",
        "profile_name": profile,
        "profile_target": {"name": profile, "version": profile_version},
        "command": command,
        "available_profiles": [],
        "profile_results": [],
        "feature_results": [],
        "requirement_counts": {},
        "issue_counts": _empty_counts(),
        "issues": [],
        "warnings": [],
        "errors": [error],
        "next_step": "fix-simready-profile-validation",
    }


def _normalize_report(
    asset_path: Path,
    command: list[str],
    profile: str,
    profile_version: str,
    payload: dict[str, Any],
    completed: subprocess.CompletedProcess[str],
) -> dict[str, Any]:
    issues = payload.get("issues", [])
    if not isinstance(issues, list):
        issues = []
    issue_counts = _empty_counts()
    for issue in issues:
        if not isinstance(issue, dict):
            continue
        severity = str(issue.get("severity", "INFO")).upper()
        issue_counts[severity] = issue_counts.get(severity, 0) + 1
    errors = [
        str(issue.get("message", issue))
        for issue in issues
        if isinstance(issue, dict) and str(issue.get("severity", "")).upper() in {"ERROR", "FAILURE"}
    ]
    if completed.returncode != 0 and not errors:
        errors.append(completed.stderr.strip() or completed.stdout.strip() or f"{TOOL} exited with {completed.returncode}")
    warnings = [
        str(issue.get("message", issue))
        for issue in issues
        if isinstance(issue, dict) and str(issue.get("severity", "")).upper() == "WARNING"
    ]
    status = str(payload.get("status", "PASS" if not errors else "FAIL")).upper()
    report = {
        "asset_path": str(asset_path.resolve()),
        "validator_skill": SKILL,
        "validator_tool": TOOL,
        "passed": not errors,
        "status": "PASS" if not errors else status,
        "profile_name": str(payload.get("profile_name", profile)),
        "profile_target": payload.get("profile_target", {"name": profile, "version": profile_version}),
        "command": command,
        "available_profiles": payload.get("available_profiles", []),
        "profile_results": payload.get("profile_results", []),
        "feature_results": payload.get("feature_results", []),
        "requirement_counts": payload.get("requirement_counts", {}),
        "issue_counts": issue_counts,
        "issues": issues,
        "warnings": warnings,
        "errors": errors,
        "next_step": payload.get("next_step", "simready-conform-profile" if errors else "simready-profile-validation-complete"),
    }
    return _apply_single_component_rbmb001_policy(report, asset_path)


def _runtime_venv_dir() -> Path:
    override = os.environ.get("PHYSICAL_AI_SIMREADY_VALIDATE_VENV")
    if override:
        return Path(override).expanduser().resolve()
    manifest, _, _ = load_preflight_manifest()
    venv_dir = manifest_path_value(runtime_entry(manifest, "simready_validate"), "venv")
    if venv_dir is not None:
        return venv_dir
    cache_home = Path(os.environ.get("XDG_CACHE_HOME", Path.home() / ".cache")).expanduser()
    return (cache_home / "physical-ai-skill-hub" / "simready-validate-venv").resolve()


def _venv_bin_dir(venv_dir: Path) -> Path:
    return venv_dir / ("Scripts" if os.name == "nt" else "bin")


def _venv_python(venv_dir: Path) -> Path:
    return _venv_bin_dir(venv_dir) / ("python.exe" if os.name == "nt" else "python")


def _venv_executable(venv_dir: Path) -> Path:
    suffix = ".exe" if os.name == "nt" else ""
    return _venv_bin_dir(venv_dir) / f"{TOOL}{suffix}"


def _runtime_dependencies_ready(python: Path) -> bool:
    completed = subprocess.run(
        [str(python), "-c", "import numpy"],
        capture_output=True,
        text=True,
        timeout=60,
        check=False,
    )
    return completed.returncode == 0


def _dedupe_requirements(requirements: list[str]) -> list[str]:
    seen: set[str] = set()
    deduped: list[str] = []
    for requirement in requirements:
        key = requirement.strip().lower()
        if not key or key in seen:
            continue
        seen.add(key)
        deduped.append(requirement)
    return deduped


def _foundation_requirements(requirements_path: Path) -> tuple[list[str], list[str]]:
    simready_requirements: list[str] = []
    other_requirements: list[str] = []
    for raw_line in requirements_path.read_text(encoding="utf-8").splitlines():
        line = raw_line.split("#", 1)[0].strip()
        if not line:
            continue
        if line.lower().startswith("simready-validate"):
            simready_requirements.append(line)
        elif not line.lower().startswith("usd-core"):
            other_requirements.append(line)
    return simready_requirements or [DEFAULT_SIMREADY_VALIDATE_REQUIREMENT], other_requirements


def _foundation_requirements_path(root: Path) -> Path:
    candidates = [
        root / "requirements.txt",
        root / "nv_core" / "validator_sample" / "requirements.txt",
    ]
    return next((path for path in candidates if path.is_file()), candidates[0])


def _is_aarch64() -> bool:
    return platform.machine().lower() in {"aarch64", "arm64"}


def _should_try_usd_exchange_fallback(install_detail: str) -> bool:
    if not _is_aarch64():
        return False
    lowered = install_detail.lower()
    return "usd-core" in lowered or "no matching distribution" in lowered or "resolutionimpossible" in lowered


def _run_pip_install(python: Path, args: list[str], *, timeout: int = 900) -> subprocess.CompletedProcess[str]:
    return subprocess.run(
        [str(python), "-m", "pip", "install", "--disable-pip-version-check", *args],
        capture_output=True,
        text=True,
        timeout=timeout,
        check=False,
    )


def _install_cli_with_usd_exchange_sdk_runtime(
    python: Path,
    executable: Path,
    requirements_path: Path,
) -> str | None:
    simready_requirements, other_requirements = _foundation_requirements(requirements_path)
    runtime_requirements = _dedupe_requirements([*USD_EXCHANGE_SDK_FALLBACK_REQUIREMENTS, *other_requirements, *SIMREADY_RUNTIME_EXTRA_REQUIREMENTS])
    runtime_install = _run_pip_install(python, runtime_requirements)
    if runtime_install.returncode != 0:
        detail = runtime_install.stderr.strip() or runtime_install.stdout.strip()
        return f"Failed to install USD Exchange SDK fallback runtime: {detail}"

    simready_install = _run_pip_install(python, ["--no-deps", *simready_requirements])
    if simready_install.returncode != 0:
        detail = simready_install.stderr.strip() or simready_install.stdout.strip()
        return f"Failed to install {TOOL} with USD Exchange SDK fallback runtime: {detail}"
    if not executable.is_file():
        return f"Installed USD Exchange SDK fallback runtime, but {executable} was not created"
    return None


def _install_cli_from_foundation_repo(foundation_root: Path | None) -> tuple[str | None, str | None]:
    root = foundation_root or _resolve_foundation_root(None)
    if root is None:
        return None, (
            f"{TOOL} CLI was not found on PATH, and no SimReady Foundation checkout was found at "
            f"$SIMREADY_FOUNDATION_ROOT, $PHYSICAL_AI_SKILL_HUB_UPSTREAM_ROOT/{DEFAULT_FOUNDATION_CHECKOUT}, "
            f"or $HOME/.physical-ai-skill-hub/upstreams/{DEFAULT_FOUNDATION_CHECKOUT} "
            f"checked out to {DEFAULT_FOUNDATION_BRANCH}"
        )
    requirements_path = _foundation_requirements_path(root)
    if not requirements_path.is_file():
        return None, f"{TOOL} CLI was not found on PATH, and {requirements_path} does not exist"

    venv_dir = _runtime_venv_dir()
    executable = _venv_executable(venv_dir)
    if executable.is_file() and _runtime_dependencies_ready(_venv_python(venv_dir)):
        return str(executable), None

    venv_dir.parent.mkdir(parents=True, exist_ok=True)
    create = subprocess.run(
        [sys.executable, "-m", "venv", str(venv_dir)],
        capture_output=True,
        text=True,
        timeout=300,
        check=False,
    )
    if create.returncode != 0:
        detail = create.stderr.strip() or create.stdout.strip()
        return None, f"Failed to create {TOOL} runtime venv at {venv_dir}: {detail}"

    python = _venv_python(venv_dir)
    install = _run_pip_install(python, ["-r", str(requirements_path), *SIMREADY_RUNTIME_EXTRA_REQUIREMENTS])
    if install.returncode != 0:
        detail = install.stderr.strip() or install.stdout.strip()
        if _should_try_usd_exchange_fallback(detail):
            fallback_error = _install_cli_with_usd_exchange_sdk_runtime(python, executable, requirements_path)
            if fallback_error is None:
                return str(executable), None
            return None, f"Failed to install {TOOL} from {requirements_path}: {detail}\n{fallback_error}"
        return None, f"Failed to install {TOOL} from {requirements_path}: {detail}"
    if not executable.is_file():
        return None, f"Installed {requirements_path}, but {executable} was not created"
    return str(executable), None


def _resolve_cli(foundation_root: Path | None) -> tuple[str | None, str | None]:
    manifest, _, _ = load_preflight_manifest()
    manifest_executable = ready_executable_from_runtime(manifest, "simready_validate")
    if manifest_executable is not None:
        return manifest_executable, None
    executable = shutil.which(TOOL)
    if executable is not None:
        return executable, None
    return _install_cli_from_foundation_repo(foundation_root)


def _parse_failing_requirements(value: Any) -> list[str]:
    if value is None:
        return []
    if isinstance(value, list):
        return [str(item) for item in value]
    if isinstance(value, str):
        text = value.strip()
        if not text:
            return []
        try:
            import ast

            parsed = ast.literal_eval(text)
        except Exception:
            return [text]
        if isinstance(parsed, list):
            return [str(item) for item in parsed]
        return [str(parsed)]
    return [str(value)]


def _normalize_feature_summary_report(
    asset_path: Path,
    command: list[str],
    profile: str,
    profile_version: str,
    payload: dict[str, Any],
    completed: subprocess.CompletedProcess[str],
) -> dict[str, Any]:
    entry = payload.get(str(asset_path)) or payload.get(str(asset_path.resolve()))
    if not isinstance(entry, dict) and payload:
        first_value = next(iter(payload.values()))
        entry = first_value if isinstance(first_value, dict) else {}
    if not isinstance(entry, dict):
        entry = {}

    profile_name = str(entry.get("profile_id", profile))
    resolved_profile_version = str(entry.get("profile_version", profile_version))
    feature_results: list[dict[str, Any]] = []
    issues: list[dict[str, Any]] = []
    requirement_counts: dict[str, int] = {}
    features_summary = entry.get("features_summary", {})
    if isinstance(features_summary, dict):
        for feature_id, feature_payload in features_summary.items():
            if not isinstance(feature_payload, dict):
                continue
            failing_requirements = _parse_failing_requirements(feature_payload.get("failing requirements"))
            passed = bool(feature_payload.get("passed")) and not failing_requirements
            feature_results.append(
                {
                    "feature_id": str(feature_id),
                    "version": str(feature_payload.get("version", "")),
                    "passed": passed,
                    "failing_requirements": failing_requirements,
                    "dependencies": feature_payload.get("dependencies"),
                }
            )
            for requirement_id in failing_requirements:
                requirement_counts[requirement_id] = requirement_counts.get(requirement_id, 0) + 1
                issues.append(
                    {
                        "severity": "FAILURE",
                        "feature_id": str(feature_id),
                        "requirement_id": requirement_id,
                        "message": f"{feature_id} failed requirement {requirement_id}",
                    }
                )

    issue_counts = _empty_counts()
    issue_counts["FAILURE"] = len(issues)
    errors = [str(issue["message"]) for issue in issues]
    if completed.returncode != 0 and not errors:
        errors.append(completed.stderr.strip() or completed.stdout.strip() or f"{TOOL} exited with {completed.returncode}")
    passed = not errors
    report = {
        "asset_path": str(asset_path.resolve()),
        "validator_skill": SKILL,
        "validator_tool": TOOL,
        "passed": passed,
        "status": "PASS" if passed else "FAIL",
        "profile_name": profile_name,
        "profile_target": {"name": profile_name, "version": resolved_profile_version},
        "command": command,
        "available_profiles": [],
        "profile_results": [{"profile_id": profile_name, "profile_version": resolved_profile_version, "passed": passed}],
        "feature_results": feature_results,
        "requirement_counts": requirement_counts,
        "issue_counts": issue_counts,
        "issues": issues,
        "warnings": [],
        "errors": errors,
        "next_step": "simready-profile-validation-complete" if passed else "simready-conform-profile",
    }
    return _apply_single_component_rbmb001_policy(report, asset_path)


def _normalize_runtime_payload(
    asset_path: Path,
    command: list[str],
    profile: str,
    profile_version: str,
    payload: dict[str, Any],
    completed: subprocess.CompletedProcess[str],
) -> dict[str, Any]:
    if "issues" in payload or "profile_results" in payload or "feature_results" in payload:
        return _normalize_report(asset_path, command, profile, profile_version, payload, completed)
    return _normalize_feature_summary_report(asset_path, command, profile, profile_version, payload, completed)


def _resolve_foundation_root(explicit: Path | None) -> Path | None:
    if explicit:
        return explicit
    manifest, _, _ = load_preflight_manifest()
    manifest_root = ready_path_from_runtime(manifest, "simready_validate") or ready_path_from_upstream(manifest, "simready_foundation")
    if manifest_root is not None:
        return manifest_root
    env_value = os.getenv("SIMREADY_FOUNDATION_ROOT")
    if env_value:
        return Path(env_value)
    upstream_root = Path(os.getenv("PHYSICAL_AI_SKILL_HUB_UPSTREAM_ROOT", str(DEFAULT_UPSTREAM_ROOT)))
    candidate = upstream_root / DEFAULT_FOUNDATION_CHECKOUT
    return candidate if candidate.exists() else None


def _resolve_spec_root(foundation_root: Path | None, explicit: Path | None) -> Path | None:
    if explicit:
        return explicit
    env_value = os.getenv("SIMREADY_FOUNDATION_SPEC_ROOT")
    if env_value:
        return Path(env_value)
    if foundation_root:
        candidate = foundation_root / "nv_core" / "sr_specs" / "docs"
        return candidate if candidate.exists() else None
    return None


def _cli_help(executable: str) -> str:
    completed = subprocess.run([executable, "--help"], capture_output=True, text=True, timeout=30, check=False)
    return f"{completed.stdout}\n{completed.stderr}"


def _build_command(
    executable: str,
    asset_path: Path,
    *,
    profile: str,
    profile_version: str,
    foundation_root: Path | None,
    foundation_spec_root: Path | None,
    output_path: Path,
) -> list[str]:
    help_text = _cli_help(executable)
    if "--json-output" in help_text:
        command = [executable, str(asset_path), "--profile", profile, "--profile-version", profile_version]
        if foundation_root:
            command.extend(["--foundation-root", str(foundation_root)])
        if foundation_spec_root:
            command.extend(["--foundation-spec-root", str(foundation_spec_root)])
        command.extend(["--json-output", str(output_path)])
        return command

    command = [executable, str(asset_path), "--profile", profile, "--version", profile_version]
    if foundation_spec_root:
        capabilities = foundation_spec_root / "capabilities"
        features = foundation_spec_root / "features"
        profiles = foundation_spec_root / "profiles" / "profiles.toml"
        if capabilities.exists():
            command.extend(["--rules-path", str(capabilities)])
        if features.exists():
            command.extend(["--features-path", str(features)])
        if profiles.exists():
            command.extend(["--profiles-path", str(profiles)])
    command.extend(["--output", str(output_path)])
    return command


def validate_profile(
    asset_path: Path,
    *,
    profile: str,
    profile_version: str,
    foundation_root: Path | None,
    foundation_spec_root: Path | None,
) -> dict[str, Any]:
    if preflight_required() and foundation_root is None:
        preflight_check = preflight_status_check("simready-validate", "simready_validate")
        if not preflight_check["passed"]:
            return _blocked_report(
                asset_path,
                [TOOL, str(asset_path), "--profile", profile, "--profile-version", profile_version],
                profile,
                profile_version,
                preflight_check["message"],
            )
    foundation_root = _resolve_foundation_root(foundation_root)
    foundation_spec_root = _resolve_spec_root(foundation_root, foundation_spec_root)
    command = [TOOL, str(asset_path), "--profile", profile, "--profile-version", profile_version]
    executable, cli_error = _resolve_cli(foundation_root)
    if executable is None:
        return _blocked_report(asset_path, command, profile, profile_version, cli_error or f"{TOOL} CLI is required but was not found on PATH")
    with tempfile.TemporaryDirectory() as tmpdir:
        output_path = Path(tmpdir) / "simready-profile-report.json"
        run_command = _build_command(
            executable,
            asset_path,
            profile=profile,
            profile_version=profile_version,
            foundation_root=foundation_root,
            foundation_spec_root=foundation_spec_root,
            output_path=output_path,
        )
        completed = subprocess.run(run_command, capture_output=True, text=True, timeout=300, check=False)
        if not output_path.exists():
            return _blocked_report(asset_path, run_command, profile, profile_version, f"{TOOL} did not produce JSON output")
        payload = json.loads(output_path.read_text(encoding="utf-8"))
    return _normalize_runtime_payload(asset_path, run_command, profile, profile_version, payload, completed)


def emit(payload: dict[str, Any], report_path: Path | None, markdown_report_path: Path | None) -> None:
    emit_json_report(
        payload,
        report_path,
        markdown_report_path,
        f"# SimReady Profile Validation Report\n\n- Passed: `{payload['passed']}`",
    )


def main(argv: list[str] | None = None) -> int:
    parser = argparse.ArgumentParser(description="Validate an OpenUSD asset against a SimReady Foundation profile.")
    parser.add_argument("asset_path", type=Path)
    parser.add_argument("--profile", default=DEFAULT_PROFILE)
    parser.add_argument("--profile-version", default=DEFAULT_PROFILE_VERSION)
    parser.add_argument("--foundation-root", type=Path)
    parser.add_argument("--foundation-spec-root", type=Path)
    parser.add_argument("--report", type=Path)
    parser.add_argument("--markdown-report", type=Path)
    args = parser.parse_args(argv)
    payload = validate_profile(
        args.asset_path,
        profile=args.profile,
        profile_version=args.profile_version,
        foundation_root=args.foundation_root,
        foundation_spec_root=args.foundation_spec_root,
    )
    emit(payload, args.report, args.markdown_report)
    return 0 if payload["passed"] else 1


if __name__ == "__main__":
    raise SystemExit(main())

Requirements and compatibility

Written for: OpenAI Codex

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an API key, Needs Python

The author says: Orchestrator skill. Managed Content Agents deployment requires NVIDIA_API_KEY (build.nvidia.com), Docker + NVIDIA Container Toolkit + GPU, Python 3.12, and an upstream checkout of nvidia-omniverse/content-agents on branch main. Reused/provided endpoints may instead use explicit endpoint and usage-token environment variables. Linux/macOS only.

Security

What our scanner noticed· Medium risk

  • Large base64-encoded blobs
  • Instructions that use the network
  • Downloads piped into a shell
  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Omniverse
Publisher
OpenAI (Official)
Distributed by
OpenAI
Source
openai/plugins · plugins/nvidia/skills/omniverse-cad-to-simready · commit d420d13
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (written by AutoGineer)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Omniverse or OpenAI.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download omniverse-cad-to-simready.zip