Skip to main content
skill CX Codex

nemo-relay-instrument-calls — Claude Code skill: setup and usage

nemo-relay-instrument-calls wraps tool and LLM provider call sites with NeMo Relay execution scopes. Keeps business logic intact while attaching lifecycle events, intercepts, and guardrails.

Apache-2.0 224 installs ★ 4,106 updated 2026-10-23

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add NVIDIA/skills --skill nemo-relay-instrument-calls -a claude-code
Open on GitHub

What nemo-relay-instrument-calls does

This skill guides integrating NeMo Relay around established model and tool call sites. The internal logic of existing functions stays unchanged. The skill points you toward managed execution helpers across runtimes: tools.execute and llm.execute in Python, toolCallExecute in Node.js, plus counterparts in Go and Rust.

Execution follows an exact sequence. Raw arguments hit conditional guardrails first; if rejected, the runtime records a standalone mark event and stops without executing callbacks. Request intercepts run afterward to reshape inputs. Sanitization guardrails adjust only the telemetry event payloads, leaving application-visible arguments untouched.

Premature termination of an LLM stream prevents subscribers from receiving the final response. Manual lifecycle APIs remain reserved for custom host frameworks where managed execution wrappers cannot fit.

What it helps with

  • wrap tool functions in NeMo Relay execution scopes
  • inject request intercepts and middleware into provider calls
  • enforce conditional guardrails prior to model invocations
  • preserve application return values while sanitizing telemetry payloads

Example prompts for the agent

  • Wrap our Python tool call with tools.execute using NeMo Relay
  • Add NeMo Relay lifecycle scopes to our Node.js LLM provider call
  • Configure conditional guardrails and execution intercepts for model calls

How to install nemo-relay-instrument-calls

1Skills CLI (Vercel)

npx skills add NVIDIA/skills --skill nemo-relay-instrument-calls -a claude-code

2Manually: put the files in place

~/.claude/skills/nemo-relay-instrument-calls/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/nemo-relay-instrument-calls/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about nemo-relay-instrument-calls

How do I install nemo-relay-instrument-calls in Claude Code?

Run npx skills add NVIDIA/skills --skill nemo-relay-instrument-calls -a claude-code.

What does nemo-relay-instrument-calls do?

It explains how to wrap tool and LLM calls in NeMo Relay managed execution APIs to capture lifecycle events, guardrails, and middleware without breaking underlying code.

When should you use manual lifecycle APIs instead of managed execution?

Only when your host framework cannot use helpers like tools.execute. With manual APIs, every start call requires explicit paired handling for completion or error states.

Source text

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

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set312

The whole set →
earth2studio-create-datasource earth2studio-create-datasource is a Claude Code skill that builds and validates Earth2Studio wrappers for connecting remote data sources to its async infrastructure. CX Codex +1 587installs earth2studio-create-diagnostic earth2studio-create-diagnostic is a Claude Code skill that creates diagnostic model wrappers for Earth2Studio, turning third-party single-step transforms into Python classes with tests and docs. CX Codex +1 581installs earth2studio-create-prognostic earth2studio-create-prognostic guides an agent through building an Earth2Studio wrapper for a weather model that forecasts future states over successive time steps. CX Codex +1 579installs nemo-relay-install The nemo-relay-install skill identifies your installation target and deploys the current stable NeMo Relay package, resolving prerequisites and verifying availability. Works across agent runtimes, frameworks, and language bindings. CX Codex +1 227installs nemo-relay-instrument-context-isolation The nemo-relay-instrument-context-isolation skill keeps NeMo Relay scope stacks separate across concurrent work and preserves event ancestry as tasks cross execution boundaries. CX Codex +1 211installs nemotron-asr-finetune nemotron-asr-finetune coordinates domain and language adaptation for NVIDIA Nemotron Speech and Riva ASR, picking the lowest-cost path from word boosting to full fine-tuning. CX Codex +1 210installs nemo-relay-debug-runtime-integration The nemo-relay-debug-runtime-integration skill traces NeMo Relay runtime faults across loading, scopes, events, plugins, and adaptive wiring. Use it when the package is present but app behavior is wrong. CX Codex +1 197installs nemo-relay-instrument-typed-wrappers nemo-relay-instrument-typed-wrappers configures NeMo Relay typed wrappers and provider codecs while keeping JSON middleware semantics intact. CX Codex +1 182installs

Project sponsors

Companies that keep this analytics open