# Usda Lexical Format

> Use this skill when implementing or verifying the USDA text-format substrate.

- Skill: `nvidia-omniverse/usda-lexical-format` (Agent Skill)
- Install (CLI): `npx skillmds@latest add nvidia-omniverse/usda-lexical-format`
- Raw SKILL.md: https://api.skillmd.com/api/skills/nvidia-omniverse/usda-lexical-format/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: NVIDIA-Omniverse (https://skillmd.com/u/nvidia-omniverse)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/nvidia-omniverse/usda-lexical-format

---


# usda-lexical-format

Use this skill when implementing or verifying the USDA text-format substrate.

## Spec Sources

- `specification/file_formats/README.md` section `Text`

Pinned tag / commit: `v1.0.1`

## Provides

- UTF-8 input handling
- `#usda` layer header parsing
- Spaces, CR/LF/CRLF, and statement separators
- Python-style and C/C++-style comments
- Single-line and multi-line strings
- Number literals including `inf`, `-inf`, and `nan`
- USDA identifiers
- Asset references
- Path reference delimiters

## Contract

This skill owns `contracts/capabilities/usda-lexical-format.json` and provides
the `usda_lexical_format` capability consumed by USDA value and spec parsing.
It consumes the `identifier_scanner` capability from
`usd-identifiers-and-names` for identifier validity; it should not maintain an
independent UTF-8 or XID policy.

The lexer/parser substrate should preserve enough location information to emit
line/column diagnostics, but exact diagnostic wording is controlled by goldens.

The substrate may be a lexer, parser-combinator layer, or direct recursive
descent helpers. The contract is behavioral, not architectural.

## Boundary Guards

Defer identifier UTF-8/XID scanning to `usd-identifiers-and-names`.

Defer path grammar after stripping angle brackets to `usd-paths`.

Defer value typing/coercion to `usda-value-parser`.

Do not map syntax to document-model fields here; that belongs to
`usda-spec-parser`.

## Test Obligations

- valid layer header
- comments in all whitespace positions
- strings and escapes
- numbers
- asset references
- invalid header diagnostic

