NeMo Relay Typed Wrappers & Codecs
Add typed boundaries to NeMo Relay integrations while preserving predictable JSON middleware semantics and caller-visible behavior.
The skill provides guidance only, with no declared command execution, external access, or credential handling, and it makes the JSON boundary explicit; no red-line risk is evident. Points were deducted because user confirmation, rollback, sensitive-data-flow disclosure, and verifiable technical sourcing are incomplete, and several framework claims cannot be independently confirmed from the supplied files.
The SKILL.md model, rules, and checklist are broadly consistent, and BENCHMARK.md reports external evaluation results. Points were deducted for the absence of executable examples, dependency versions, abnormal-input handling, and diagnostic failure feedback; under static calibration the score is capped at 10.
The audience and scenarios, Python/Node.js/Rust distinctions, boundary between typed value codecs and provider codecs, and negative Kubernetes evaluation are reasonably clear. Points were deducted because input/output templates, exclusion triggers, compatibility ranges, and Chinese-language guidance are missing; the core function is not shown to depend on an unreachable overseas service.
The material has readable sections for guidance, codec model, rules, selection, validation, related skills, licensing, ownership, revision information, and evaluation. Points were deducted for missing recommended Instructions and Examples sections, the author-format validation finding, and incomplete dependency notes, FAQ, changelog, and explicit maintenance/update path.
The skill can guide selection of DataclassCodec, PydanticCodec, custom Codec, and provider codecs while explaining middleware JSON semantics; the benchmark reports strong positive-task results. Points were deducted because it lacks directly usable code or configuration output, setup details and alternatives are limited, and static review cannot confirm actual results; the score remains within the static cap of 7.
BENCHMARK.md and evals.json provide task definitions, expected behavior, and reported metrics that are somewhat auditable. Points were deducted because raw execution logs, CI workflows, and committed tests covering this skill’s key paths are absent, so the report is not independently reproducible; the score remains within the static cap of 5.
- Do not treat the BENCHMARK.md percentages as independently reproduced evidence.
- Verify codec APIs, field-preservation semantics, and failure behavior against the target NeMo Relay version before use.
- Because complete code examples are absent, validate JSON serialization, middleware write-back, and provider-payload compatibility in an isolated environment.
What does this skill do, and when should you use it?
This skill guides applications in using domain types, typed value codecs, and provider codecs with NeMo Relay tool or LLM integrations. It specifies converting typed values to JSON before events and middleware run, then decoding them back at callback or caller boundaries. The guidance covers codec choices across Python, Node.js, and Rust, including field preservation across requests, responses, intercepts, and middleware. It fits teams with stable domain models that still need predictable JSON behavior inside middleware.
Guides selection of JsonPassthrough, DataclassCodec, PydanticCodec, BestEffortAnyCodec, or custom Codec<T> implementations; explains converting application values to JSON before NeMo Relay emits events or runs middleware and decoding them at callback boundaries; covers OpenAI Chat, OpenAI Responses, and Anthropic Messages provider codecs; explains how request codecs merge interceptor edits and how response codecs annotate responses with fields such as id, model, message, tool_calls, finish_reason, and usage.
- A NeMo Relay Python application already has dataclass or Pydantic models for tool or LLM calls.
- A Node.js application needs an explicit Codec<T> for a stable domain wire shape.
- A team wants middleware and subscribers to inspect normalized OpenAI or Anthropic requests, responses, tools, models, and generation parameters.
- A developer needs to verify that provider fields and intentional middleware changes survive encoding and decoding.
What are this skill's strengths and limitations?
- Covers typed or codec-based paths for Python, Node.js, and Rust.
- Clearly separates application value codecs from LLM provider codecs.
- Focuses on middleware-visible JSON shape, field preservation, and stable caller-visible responses.
- Includes concrete codec-selection rules and a validation checklist.
- The supplied content is implementation guidance, not an executable code package.
- No scripts, test suite, or platform test results are provided in the supplied material.
- NeMo Relay installation steps, version requirements, and runtime dependencies are not documented.
- BestEffortAnyCodec provides a looser contract and is intended only where strict schemas are unavailable.
How do you install this skill?
Use the skills CLI flow documented in the repository README: npx skills add nvidia/skills --skill nemo-relay-instrument-typed-wrappers --yes. The README says the CLI handles installation destination selection; the supplied material does not document a manual copy destination.
How do you use this skill?
After installing the skill in an Agent Skills-compatible client, invoke it for NeMo Relay typed-wrapper, domain-type, or provider-codec work. Example: “Add typed wrappers for the existing Pydantic models in NeMo Relay and preserve the JSON shape visible to middleware.”
How does this skill compare with similar options?
Compared with raw JSON, typed wrappers are intended for applications that already have stable domain models. The skill recommends starting with plain JSON for initial adoption and introducing codecs when stronger domain typing is needed.