nemo-relay-instrument-calls — скилл для Claude Code: что делает
Скилл nemo-relay-instrument-calls оборачивает вызовы инструментов и LLM-провайдеров в скоупы NeMo Relay. Помогает внедрить мидлвары, гардрейлы и перехват событий жизненного цикла без изменения бизнес-логики.
Apache-2.0 224 установок ★ 4 106 обновлён 2026-10-23
npx skills add NVIDIA/skills --skill nemo-relay-instrument-calls -a claude-codeЧто делает nemo-relay-instrument-calls
Скилл подсказывает, как встроить NeMo Relay в уже написанный код вызова моделей и инструментов. Логика работы самих функций сохраняется прежней: меняется только внешняя обвязка. Для контроля жизненного цикла скилл рекомендует использовать готовые API исполнения: tools.execute и llm.execute в Python, toolCallExecute в Node.js, а также аналогичные методы в Go и Rust.
Внутри сохраняется строгий порядок рантайма. Сначала на сырой ввод накладываются условные гардрейлы. Если проверка отклоняет запрос, рантайм отправляет маркерное событие и прерывает цепочку. Следом запускаются перехватчики запросов, меняющие аргументы перед передачей в колбэк. Очищающие гардрейлы корректируют только полезную нагрузку стартовых и финальных событий телеметрии, не затрагивая данные в коде самого приложения.
Если поток стриминга LLM оборвётся раньше времени, подписчики не получат итоговый ответ. Ручные методы жизненного цикла скилл советует применять исключительно там, где сторонний фреймворк не позволяет задействовать стандартные функции запуска.
Какие задачи решает
- обернуть вызовы сторонних LLM в скоупы NeMo Relay
- подключить перехватчики запросов и мидлвары к существующим инструментам
- настроить запуск условных гардрейлов перед обращением к модели
- передавать события жизненного цикла при вызове функций с аргументами JSON
Примеры запросов агенту
- Оберни вызов
openai.chat.completions.createчерезllm.executeиз NeMo Relay с сохранением метаданных модели - Добавь перехватчик
tools.executeдля нашей функции расчёта скидки в Python - Настрой обработку ошибок и отправку финального события NeMo Relay для стримингового ответа
Как установить nemo-relay-instrument-calls
1Через Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill nemo-relay-instrument-calls -a claude-code2Вручную: положить файлы
~/.claude/skills/nemo-relay-instrument-calls/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/nemo-relay-instrument-calls/
1Через Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill nemo-relay-instrument-calls -a codex2Вручную: положить файлы
.agents/skills/nemo-relay-instrument-calls/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill nemo-relay-instrument-calls -a cursor2Вручную: положить файлы
.cursor/skills/nemo-relay-instrument-calls/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install NVIDIA/skills skills/nemo-relay-instrument-calls2Вручную: положить файлы
.github/skills/nemo-relay-instrument-calls/SKILL.md1Через Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill nemo-relay-instrument-calls -a gemini-cli2Командой платформы
gemini skills install https://github.com/NVIDIA/skills --path skills/nemo-relay-instrument-callsВручную: положить файлы
.devin/skills/nemo-relay-instrument-calls/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill nemo-relay-instrument-calls -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о nemo-relay-instrument-calls
Как установить nemo-relay-instrument-calls в Claude Code?
Выполните команду npx skills add NVIDIA/skills --skill nemo-relay-instrument-calls -a claude-code.
Что делает nemo-relay-instrument-calls?
Он даёт инструкции по встраиванию рантайма NeMo Relay вокруг существующих вызовов моделей и инструментов, управляя жизненным циклом и гардрейлами.
Чем отличаются управляемые API от ручных вызовов жизненного цикла?
Управляемые методы вроде tools.execute берут на себя запуск гардрейлов и генерацию событий старта и завершения. Ручные API нужны адаптерам сторонних фреймворков, и каждый старт в них требует обязательного парного вызова завершения или ошибки.
Исходный текст
SKILL.md · Apache-2.0
---
name: nemo-relay-instrument-calls
description: Use this skill when an application owns tool or LLM/provider call sites and needs to wrap them with NeMo Relay scopes and managed execution APIs for lifecycle events, middleware, or guardrails.
license: Apache-2.0
metadata:
author: NVIDIA Corporation and Affiliates
---
# Instrument Tool And LLM Calls
Use this skill when an app already has tool functions or model/provider calls and
needs to run them through NeMo Relay correctly.
Keep the original callable behavior stable while adding Relay lifecycle capture.
## Default Guidance
- Put a scope around the natural agent, request, workflow, or graph boundary.
- Use managed execution APIs first:
- Rust: `tool_call_execute(ToolCallExecuteParams::builder()...)`,
`llm_call_execute(LlmCallExecuteParams::builder()...)`
- Python: `tools.execute(...)`, `llm.execute(...)`
- Node.js: `toolCallExecute(...)`, `llmCallExecute(...)`
- Go: `tools.Execute(...)`, `llm.Execute(...)` or the top-level wrappers
- Use manual lifecycle APIs only when the host framework cannot be wrapped by the
managed execute helpers.
## Embedded Runtime Semantics
- Managed tool and LLM execution runs conditional-execution guardrails first on
the raw input. If rejected, the runtime emits a standalone mark event and does
not run request intercepts or the callable.
- Request intercepts run after conditional guardrails and rewrite the real input
that reaches execution intercepts and the callback.
- Sanitize-request guardrails affect emitted start-event payloads only. They do
not rewrite the caller-visible request or arguments.
- Execution intercepts wrap the callback with the middleware `next` pattern and
may short-circuit by returning their own result.
- Sanitize-response guardrails affect emitted end-event payloads only. The value
returned to application code remains the raw callback or execution-intercept
result.
- If execution fails after the start event has been emitted, the runtime still
emits an end event without a semantic output payload.
- Tool calls are named operations with JSON-compatible arguments and results.
Keep the original tool callable responsible for business logic; let NeMo Relay
own lifecycle events, middleware, and metadata.
- LLM calls use an `LLMRequest` made of metadata plus content. Pass model names
and stable call identifiers when they matter for trace export or diagnostics.
- Manual lifecycle APIs are for framework adapters that already own execution.
If you use them, every start call needs a matching end or error path with the
relevant semantic payloads supplied explicitly.
- Partial middleware APIs such as `request_intercepts(...)` and
`conditional_execution(...)` are for advanced adapters that need one middleware
family before calling a provider manually.
- Streaming LLM wrappers collect chunks and finalize a response at stream end;
dropping the stream early can prevent finalizers and subscribers from seeing a
complete output.
## Checklist
- [ ] Scope boundary chosen before the first tool or LLM call
- [ ] Existing tool function wrapped without losing its original arguments/result
- [ ] Existing LLM/provider call wrapped at the right abstraction layer
- [ ] Optional metadata, attributes, or model name attached where useful
- [ ] Context propagation handled if the call hops threads or async tasks
## Use Another Skill When
Choose another skill when the task requires a neighboring workflow:
- Use `nemo-relay-plugin-observability` for traces, ATIF, or export setup.
- Use `nemo-relay-debug-runtime-integration` to debug missing events or load
failures.
- Use `nemo-relay-instrument-context-isolation` for per-request isolation or
worker-pool guidance.
- Use `nemo-relay-plugin-build` for reusable, configuration-activated runtime
behavior.
## Related Skills
Use these skills for adjacent workflows:
- Start onboarding with `nemo-relay-get-started`.
- Add typed wrappers with `nemo-relay-instrument-typed-wrappers`.
- Configure export with `nemo-relay-plugin-observability`.
- Package reusable behavior with `nemo-relay-plugin-build`.
© NVIDIA Corporation and Affiliates · Apache-2.0 · NVIDIA/skills