test-ffi-surface

test-ffi-surface is a skill for Claude Code, Codex from NVIDIA/NeMo-Relay. It costs 32 tokens per session (440 once invoked), scanned A, original, Apache-2.0.

A guide for building and testing NeMo Relay’s foreign-function interface, or FFI. An FFI lets programs written in other languages call the library through a shared library and generated C-compatible header.

In plain words
What is it for?
Use it when changing the FFI crate, generated header, exported symbols, or ABI-facing behavior. It covers rebuilding the library, formatting Rust code, running tests and lint checks, and reviewing header changes.
Why use it?
It helps keep the compiled library, exported functions, and header file in sync. This catches problems that could break Go programs or other native callers.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nvidia/nemo-relay/test-ffi-surface
Any agent
npx skills add NVIDIA/NeMo-Relay --skill test-ffi-surface
Clone the repo
git clone --depth 1 https://github.com/NVIDIA/NeMo-Relay

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-ffi-surface

README.md
[![agentmods](https://agentmods.dev/badge/skills/nvidia/nemo-relay/test-ffi-surface.svg)](https://agentmods.dev/skills/nvidia/nemo-relay/test-ffi-surface)
Your own site
<a href="https://agentmods.dev/skills/nvidia/nemo-relay/test-ffi-surface"><img src="https://agentmods.dev/badge/skills/nvidia/nemo-relay/test-ffi-surface.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 440 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.00440
Opus 5 $0.00016 $0.00220
Sonnet 5 $0.00006 $0.00088
Haiku 4.5 $0.00003 $0.00044

Measured 4d ago against content hash 15266adb0042, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-ffi-surface scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/test-ffi-surface/SKILL.md · 62 lines

What it actually says

Build And Test FFI Surface

Companion Guidance

Use karpathy-guidelines alongside this skill for implementation or review work. Keep changes scoped, surface assumptions, and define focused validation before editing.

Use this skill when the change is primarily in crates/ffi, the generated header, or ABI-facing behavior consumed by Go or external native callers.

Default Path

  1. Rebuild the FFI crate in release mode so the shared library and header stay in sync.
  2. Run cargo fmt --all because FFI work is Rust work.
  3. Run just test-rust.
  4. Run cargo clippy --workspace --all-targets -- -D warnings.
  5. Check the generated header diff when any exported symbol or type changed.
  6. If downstream consumers changed too, run their binding-specific skills next.

Common Commands

# Rebuild the shared library with the repo wrapper used by FFI consumers
just build-go

# Required Rust validation
cargo fmt --all
just test-rust
cargo test -p nemo-relay-ffi
cargo clippy --workspace --all-targets -- -D warnings

# Review header drift if the FFI surface changed
git diff -- crates/ffi/nemo_relay.h

When To Escalate

  • If Go behavior changed, also use test-go-binding.
  • If the FFI change reflects shared runtime semantics rather than a pure bridge change, also use validate-change.

References

  • crates/ffi/Cargo.toml
  • crates/ffi/build.rs
  • crates/ffi/cbindgen.toml
  • crates/ffi/nemo_relay.h
  • just build-go
  • .pre-commit-config.yaml
  • README.md
  • validate-change
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 62 lines · 32 tokens per session scan A 15266adb0042

Subscribe to this mod's changes

test-ffi-surface is a skill published in the GitHub repository NVIDIA/NeMo-Relay (132 stars, last pushed 4d ago), licensed Apache-2.0. It adds 32 tokens to every session and 440 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

rust-development

Idiomatisk Rust-utvikling med cargo, clippy, error handling, async/tokio, unsafe og testing.

navikt/copilot · 27 tokens

rust-async-patterns

Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns. Use when the task involves async Rust, Tokio patterns, Rust concurrent programming, async traits, or Rust futures and streams.

dallay/agentsync · 53 tokens

rust-patterns

Idiomatic Rust patterns, ownership, error handling, traits, concurrency, and best practices for building safe, performant applications.

tincopper/neeko · 28 tokens

tauri2-react-rust

Guides development of cross-platform desktop apps with Tauri 2, TypeScript, React, and Rust. Use when building Tauri apps, implementing IPC, designing Rust backend or TypeScript/React frontend, when researching or cloning a website (open site, snapshot elements), when verifying local dev or built frontend in browser…

tincopper/neeko · 114 tokens

vigilante-issue-implementation-on-rust

Implement a GitHub issue end-to-end when Vigilante dispatches work for a Rust repository with Cargo, Clippy, fmt, and security guidance.

aliengiraffe/vigilante · 41 tokens

aomi-build

Scaffold new Aomi apps and plugins from API docs, OpenAPI/Swagger specs, or SDK references. aomi-build generates production-ready Rust SDK crates (lib.rs, client.rs, tool.rs) with tool schemas, preambles, host-interop flows, and validation — turning a vendor's API surface into AI-agent-callable tools. It covers the…

aomi-labs/skills · 244 tokens