К основному содержанию
скилл CX Codex

nemo-relay-plugin-build — скилл для Claude Code: как собрать плагин

Скилл nemo-relay-plugin-build для Claude Code упаковывает переиспользуемое поведение NeMo Relay в конфиг-компонент или динамический плагин с валидацией и откатом. Создаёт плагины для нескольких приложений или команд.

Apache-2.0 181 установок ★ 4 106 обновлён 2026-10-23

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

Что делает nemo-relay-plugin-build

nemo-relay-plugin-build помогает структурировать плагины NeMo Relay — от встроенных компонентов до независимых динамических пакетов. Скилл проводит вас через выбор модели доставки (встроенный компонент, нативный rust_dynamic или gRPC-воркер), определение стабильного kind, дизайн JSON-совместимого конфига и настройку детерминированной валидации.

Валидация отделена от регистрации: сначала проверяются поля конфига, потом через PluginContext устанавливается реальное поведение — подписчики, гвардрейлы, перехватчики запросов или потоков. Это даёт системе плагинов достаточно контроля, чтобы откатить частичную активацию при ошибке. Отключённые компоненты тоже валидируются, чтобы операторы нашли проблемы до развёртывания.

Для нативных динамических плагинов нужно заранее определить версию Relay из констрейнта пакета или лок-файла, потому что API обратных вызовов зависит от версии. Для Node.js, Python и Rust есть готовые привязки; конфиг остаётся snake_case везде.

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

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

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

  • Я собираю нативный плагин NeMo Relay версии 0.8 с гвардрейлом редакции. Какой модели придерживаться?
  • Как мне упаковать поведение в relay-plugin.toml, чтобы плагин грузился динамически?
  • Напиши валидацию конфига для плагина с полями preset и unknown_field policy.

Как установить nemo-relay-plugin-build

1Через Skills CLI (Vercel)

npx skills add NVIDIA/skills --skill nemo-relay-plugin-build -a claude-code

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

~/.claude/skills/nemo-relay-plugin-build/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/nemo-relay-plugin-build/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о nemo-relay-plugin-build

Как установить nemo-relay-plugin-build в Claude Code?

Выполните npx skills add NVIDIA/skills --skill nemo-relay-plugin-build -a claude-code, затем откройте ~/.claude/skills/nemo-relay-plugin-build/SKILL.md.

Что делает nemo-relay-plugin-build?

Помогает упаковать поведение NeMo Relay в переиспользуемый плагин — встроенный компонент или динамический пакет с валидацией конфига, регистрацией через PluginContext и откатом при ошибках.

Когда не нужен этот скилл?

Если поведение одноразовое и нужно только для текущего запроса, используйте scope-local middleware. Если нужно только инструментировать вызовы LLM или выбрать экспортер, есть узкие скиллы nemo-relay-instrument-calls и nemo-relay-plugin-observability.

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

SKILL.md · Apache-2.0
---
name: nemo-relay-plugin-build
description: Use this skill when building or packaging reusable NeMo Relay runtime behavior as an embedded configuration component or a manifest-backed `rust_dynamic` native or `worker` gRPC plugin, with deterministic validation and rollback-safe registration.
license: Apache-2.0
metadata:
  author: NVIDIA Corporation and Affiliates
---

# Build a Plugin

Use this skill when a user wants to package reusable NeMo Relay runtime behavior
behind plugin configuration.
Keep reusable plugin behavior separate from one-off application startup code.

## Use This When

Use this skill when the behavior should be activated by shared config and reused
across applications, teams, or process startup paths.

Common cases:

- Register subscribers, guardrails, intercepts, or a small bundle of related
  runtime behavior.
- Validate operator-supplied config before changing runtime behavior.
- Give reusable behavior a stable plugin `kind` and activation lifecycle.
- Package behavior that should be enabled, disabled, or rolled out through
  plugin config rather than repeated application startup code.

## Do Not Use This When

Do not build a plugin when a narrower NeMo Relay surface is enough:

- One request or tenant needs temporary behavior -> use scope-local middleware.
- The user only needs first-time scopes, tool calls, or LLM calls ->
  `nemo-relay-instrument-calls`.
- The user only needs to choose an exporter path ->
  `nemo-relay-plugin-observability`.
- The behavior depends on live callables, provider clients, file handles,
  credentials, or framework objects inside config.

## Choose A Delivery Model

Choose the delivery model before designing config or registration:

- **Embedded component:** Use the shared plugin document when behavior ships
  with the Relay host application. Follow the embedded component model below.
- **Discoverable dynamic package:** Use a `relay-plugin.toml` manifest when the
  plugin ships independently of the host. Use `rust_dynamic` for a trusted
  in-process native Rust library, or `worker` for a local `grpc-v1` worker.
  Read the public native dynamic-plugin or gRPC worker guide before designing
  the package boundary. Do not reproduce native ABI or worker-protocol details
  from memory.

Native plugins are trusted C-ABI extensions that run in the Relay process and
are not sandboxed. Worker plugins provide process isolation, not a security
sandbox.

## Embedded Component Model

- Plugins package reusable process-level behavior.
- A plugin exposes a stable `kind` string and receives component-local config
  from a shared plugin document.
- Plugin config must be JSON-compatible across Rust, Python, Node.js, files,
  tests, and deployment systems.
- Validation is deterministic and side-effect free. It inspects config and
  returns structured diagnostics before runtime behavior changes.
- Registration runs after validation and installs real behavior through
  `PluginContext`, such as subscribers, guardrails, request intercepts,
  execution intercepts, or stream execution intercepts.
- `PluginContext` gives the plugin system enough ownership to qualify runtime
  names and roll back partial setup when activation fails.
- Disabled components should still validate when possible so operators can find
  config problems before rollout.

## Default Path

1. Decide whether a plugin is actually needed. Prefer direct instrumentation or
   scope-local behavior when the use case is not reusable process-level
   behavior.
2. Choose an embedded component or a discoverable dynamic package. For a
   dynamic package, establish the manifest-backed native or worker boundary
   before implementing behavior.
3. For native dynamic plugins, determine the target Relay version from the
   package constraint, lockfile, or deployment target before choosing callback
   APIs.
4. Pick one first runtime surface: subscriber-oriented export, sanitize
   guardrail, conditional guardrail, request intercept, execution intercept, or
   stream execution intercept.
5. Choose a stable plugin `kind` and the smallest JSON-compatible config shape.
6. Define diagnostics for missing fields, unsupported values, unknown fields,
   unsafe config, and invalid field combinations.
7. Validate config before initialization. Validation must not open network
   connections, create clients, register middleware, or mutate process state.
8. If validation returns error diagnostics, return them and stop without
   initialization or registration.
9. Register runtime behavior through `PluginContext`, not by hand-registering
   global behavior inside application startup.
10. Test activation, disabled components, validation failures, and registration
   failure rollback.
11. Document how to enable the plugin, what config fields are supported, and how
   to roll back the component.
12. For a dynamic plugin that should provide structured fields in
   `nemo-relay plugins edit`, declare the `config_schema` capability and
   reference a local Draft 7 or Draft 2020-12 JSON Schema file from
   `[config_schema].path` in `relay-plugin.toml`. Schema-less plugins remain
   editable as raw JSON objects.

## Config Shape

The top-level plugin document contains `version`, `components`, and `policy`.
Each component supplies the plugin `kind`, `enabled`, and component-local
`config`:

```json
{
  "version": 1,
  "components": [
    {
      "kind": "redaction-policy",
      "enabled": true,
      "config": {
        "preset": "strict"
      }
    }
  ],
  "policy": {
    "unknown_component": "warn",
    "unknown_field": "warn",
    "unsupported_value": "error"
  }
}
```

Keep business logic in plugin code, not in config. Use references to secrets or
endpoints rather than embedding sensitive values.

## Binding Pointers

- Python: `nemo_relay.plugin`
- Node.js: `nemo-relay-node/plugin`
- Rust: `nemo_relay::plugin`
- Go and raw FFI are source-first or advanced surfaces.

Use the same canonical `snake_case` config keys across bindings and files. Node
helper functions can be `camelCase`, but plugin config objects remain
`snake_case`.

## Dynamic Package Essentials

Keep the manifest package contract separate from the operator's plugin document.
The manifest must declare the lane-specific kind and load contract, a normal
SemVer Relay compatibility range, artifact integrity, and only the capabilities
the plugin needs. Use a local `config_schema` only when structured CLI editing
is needed.

## Native Version Compatibility

Choose the native callback model from the target Relay version; do not present
the 0.8 SDK as source-compatible with 0.7:

- **Relay 0.7:** Keep typed Rust middleware callbacks synchronous. Use the raw
  native ABI v3 completion-based registration path only when asynchronous work
  is required, and constrain the manifest to `compat.relay = ">=0.7,<0.8"`.
- **Relay 0.8:** Return futures through the typed Rust SDK and constrain
  the manifest to `compat.relay = ">=0.8.0,<1.0"`. The SDK runs typed middleware
  on an SDK-owned Tokio executor; subscribers and raw synchronous ABI
  registrations remain synchronous. Do not block executor workers. Scope context
  does not automatically propagate to tasks created with `tokio::spawn`, and
  teardown must stop new callbacks and drain accepted work before unload.

The 0.8 typed SDK lets native components configure its executor with a positive
`executor.worker_threads` value. When their manifest exposes a
`config_schema`, include that SDK-owned object and field in the schema. For
native ABI details, callback settlement or cancellation, and the full worker
protocol, use the relevant public dynamic-plugin guide rather than expanding
this skill.

## Failure Modes To Avoid

- Do not put callables, clients, credentials, framework objects, file handles,
  or caches in plugin config.
- Do not perform runtime registration during validation.
- Do not skip validation for disabled components.
- Do not register directly through global startup code when `PluginContext`
  should own the runtime behavior.
- Do not combine unrelated subscribers, request transforms, and policy checks
  in the first plugin unless one config document clearly owns the bundle.
- Do not export raw production payloads or secrets. Add telemetry sanitization
  before data leaves the process.
- Do not ignore partial activation failures. Roll back or surface a clear
  diagnostic.
- Do not treat native process isolation as a security boundary, or claim that a
  worker is sandboxed.
- Do not apply the 0.8 typed-async callback contract to Relay 0.7, or the 0.7
  raw completion contract to typed 0.8 middleware.
- Do not block the 0.8 SDK-owned executor.

## Validation Checklist

- [ ] Stable plugin `kind` chosen.
- [ ] Delivery model selected: embedded component, `rust_dynamic`, or `worker`.
- [ ] Config shape is JSON-compatible and uses `snake_case`.
- [ ] Required fields and unsupported values produce stable diagnostics.
- [ ] Unknown fields follow the configured policy.
- [ ] Disabled components still report config problems where possible.
- [ ] Initialization installs behavior through `PluginContext`.
- [ ] A forced registration failure does not leave partial runtime behavior
      active.
- [ ] Docs or examples show how to enable and roll back the plugin.
- [ ] Dynamic plugins that need structured CLI editing package a valid local
      JSON Schema and declare `config_schema` in `relay-plugin.toml`.
- [ ] Dynamic manifests validate their lane-specific kind, load contract,
      SemVer compatibility, integrity, and disabled-record behavior.
- [ ] Native callback APIs and compatibility constraints match the target Relay
      version: synchronous typed callbacks and raw ABI v3 completion work for
      0.7; typed async SDK middleware and executor configuration for 0.8.
- [ ] Async native paths cover cancellation, settlement, and drain-before-
      unload behavior.

## Use Another Skill When

- You only need to wrap direct tool or LLM calls ->
  `nemo-relay-instrument-calls`
- You need to set up traces or exporters without packaging a plugin ->
  `nemo-relay-plugin-observability`
- You need to debug plugin activation, missing events, or load failures ->
  `nemo-relay-debug-runtime-integration`

© NVIDIA Corporation and Affiliates · Apache-2.0 · NVIDIA/skills

Похожие скиллы

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →
domain-cloud-native actionbook Скилл domain-cloud-native задаёт правила разработки облачных микросервисов на Rust: от сигналов завершения работы до проверок готовности в Kubernetes. CX Codex +1 3 200установок raptor-dex agiprolabs Скилл raptor-dex для Claude Code настраивает и вызывает селф-хостед агрегатор DEX на Solana без лимитов API. Ищет маршруты обмена по 25+ биржам и отправляет транзакции через TPU. CX Codex +1 463установок openduck-distributed-duckdb reason-machines Скилл openduck-distributed-duckdb помогает агенту настроить OpenDuck — открытый распределённый DuckDB с гибридным выполнением запросов и дифференциальным хранилищем. CX Codex +1 431установок rust-build-times mohitmishra786 Скилл rust-build-times учит ИИ-агента ускорять компиляцию проектов на Rust через профилирование и оптимизацию сборки. Помогает настроить кэширование, параллелизм и быстрые линкеры. CX Codex +1 558установок foundation-build-risk-review product-on-purpose Скилл foundation-build-risk-review для Claude Code, Codex, Cursor и других платформ, который запускает быструю проверку рисков продуктовой идеи, фичи или изменения объёма работ. CX Codex +1 518установок build-evidence-map официальный github Скилл build-evidence-map для GitHub Copilot строит проверяемую карту доказательств для спорного технического решения. Он сохраняет аргументы за и против, оговорки и неизвестные факты. CX Codex +1 70установок

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

Весь набор →
nemo-relay-instrument-context-isolation Скилл nemo-relay-instrument-context-isolation разделяет стеки контекста NeMo Relay между параллельными задачами и сохраняет правильную иерархию scope. CX Codex +1 211установок nemotron-asr-finetune Скилл nemotron-asr-finetune оркеструет адаптацию моделей распознавания речи NVIDIA Nemotron Speech и Riva под предметную область или язык, подбирая путь от бустинга слов до файнтюнинга. CX Codex +1 210установок nemo-relay-debug-runtime-integration Скилл nemo-relay-debug-runtime-integration для Claude Code ищет причины сбоев NeMo Relay на уровне загрузки, scope, событий и плагинов. Диагностирует неправильное поведение рантайма после установки интеграции. CX Codex +1 197установок nemo-relay-instrument-typed-wrappers Скилл nemo-relay-instrument-typed-wrappers помогает настроить типизированные обёртки и кодеки провайдеров в NeMo Relay, сохраняя сериализацию в JSON для промежуточного слоя. CX Codex +1 182установок nemo-relay-plugin-adaptive-tuning Скилл nemo-relay-plugin-adaptive-tuning для Claude Code настраивает и проверяет адаптивное поведение NeMo Relay по телеметрии. Поэтапно настраивает параллелизм, подсказки и prompt-cache. CX Codex +1 178установок nemo-relay-migrate-from-flow Скилл nemo-relay-migrate-from-flow для механической миграции кода, документации и конфигов с NeMo Flow на NeMo Relay. Работает с Python, Rust, Node.js, Go, C FFI, CLI и параметрами наблюдаемости. CX Codex +1 171установок doca-bench Запускает doca_bench и измеряет производительность библиотек DOCA на хосте или BlueField Arm. Проверяет пропускную способность, задержки и базовые показатели перед изменениями. CX Codex +1 166установок nemo-relay-get-started Скилл nemo-relay-get-started помогает новичку выбрать quick-start для NeMo Relay, пройти его и проверить первое рабочее подключение. CX Codex +1 163установок

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

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