/nvidia-doca-plugin:doca-structured-tools-contractfrom NVIDIA DOCA
Provides structured one-shot commands for DOCA environment inspection: version, devices, capabilities, validation, and host vs DPU state. Use when another DOCA skill references this contract or user wants consolidated output from multiple manual commands.
Ships in NVIDIA DOCA. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Host checks. Commands here that inspect the user's DOCA host (listing or reading
/opt/mellanox/doca, release files such as/etc/mlnx-releaseor/etc/nvidia/bf-release,/dev/mst) or reach the BlueField (RShim, SSH, BMC) are for that host. Run them yourself only if the user confirms you are on it; otherwise answer from this skill, give the commands for the user to run, and treat values you can't see as unknown.
Where to start: Reach for this skill whenever a workflow says
“prefer the structured tool per doca-structured-tools-contract”.
Read ## The agent behavior contract
first, then the matching schema in ## Schemas. If the
host has the structured tool, prefer its output; if not, fall back to
the manual chain in the same section and always report which path
was taken.
Scope boundary. Writing library code is not a structured-tools question: name the library skill and stop. Checking a spec before commit IS in scope: apply the validate-before-commit schema.
Load this skill whenever another skill's workflow says prefer the structured tool, OR the user wants a one-shot answer consolidating multiple manual commands. Concretely:
Do not load for general DOCA orientation, library API questions,
or install-from-scratch guidance — use the matching library skill +
doca-public-knowledge-map + doca-setup.
Running probes and fallbacks requires shell access to the target
host, directly or via user-run commands.
<helper> (path: <path>)” OR “falling back to
manual chain (structured <helper> probe failed: <reason>)”,
substituting the schema-selected helper and the actual probe
failure; never report a different helper than selected.sudo is emitted for the user to run or executed only through an
approved privileged channel — never silently elevate because the
helper was absent. If none exists, ask the user to run it or
report the gap.A four-step loop run every time a Command appendix references this contract:
command -v <site env-report helper> or
test -f <site capability-availability table path>). No such
helper ships with public DOCA. Probes are read-only and safe;
failed probes are expected.## Schemas. It is
authoritative only when parsing succeeds and every required field
has the documented type. Malformed JSON, missing fields, or type
mismatches fail the structured path: report that failure and use
step 3. Ignore extra fields as advisory (rule 5). Do NOT run the
manual chain "to double check" valid structured output — it
replaces the chain.doca-setup). If that cannot
resolve it, name the missing commands, state the answer cannot be
completed, and stop rather than presenting partial data as
complete.<tool> (path: <path>).” — probe succeeded
and output validated.<tool> probe
failed: <reason>).” — probe failed. Include the probe command
and reason; for command -v, failure means not on PATH, not
definitively absent. Do not suggest installing it (rule 6).<tool> output failed schema
validation: <reason>).” — the helper exists but its output is
malformed, missing required fields, or invalid types.The report step proves the agent tried the helper first.
Select the schema from the question shape: env/install state uses
the env-report schema; capability minimum-version lookup uses the
capability-availability table;
per-device library capabilities use capability-snapshot; spec
validation uses validate-before-commit; host-vs-DPU comparison uses
the two collect-state schemas. When a per-skill Command appendix names
a schema, use it directly. Each subsection names ONE structured
tool, its probe, its top-level JSON shape, and the manual chain
walked when the probe fails.
Detection probe: command -v <site env-report helper> (a
hypothetical site-provided script that emits this JSON).
Top-level shape (JSON object):
| Field | Type | Notes |
|---|---|---|
version | object | pkg_config / applications_version / doca_caps / bfb (string|null) / consistent (bool) |
devices | array of object | per visible PCIe function: pcie_address (e.g. 0000:03:00.0), kind (PF|VF|SF), name, representor_of (string|null), state (active|down|unknown), mtu (number) |
libraries | array of object | one per public DOCA library: pkg_config_name, installed (bool), pc_path (string|null) |
sample_paths | array of object | one per library: library, path (on-disk samples root) |
drivers | object | mlx5_core_loaded (bool), mlx5_ib_loaded (bool), kernel_version (string) |
hugepages | object | available_2m (number), available_1g (number), mount_point (string|null) |
host_kind | string | host | bluefield | unknown |
bf_mode | string | null | smartnic | dpu | switch | null (when host_kind != bluefield) |
Manual fallback chain (in order; combine outputs to synthesize the same answer):
pkg-config --modversion doca-common → version.pkg_configcat /opt/mellanox/doca/applications/VERSION → version.applications_versiondoca_caps --version → version.doca_capsdoca_caps --list-devs → devices array (PCIe address + kind + representor)doca-common.pc first: if find /opt/mellanox/doca -name doca-common.pc -print -quit is empty, stop, surface the partial-install gap, and route to doca-setup; never expand an empty glob. Otherwise set PCDIR to its directory and run for pc in "$PCDIR"/*.pc; do m="${pc##*/}"; pkg-config --exists "${m%.pc}" && echo "$pc"; done → libraries array. If PCDIR is not a directory or no module resolves, surface the gap and route to doca-setup. PCDIR is commonly /opt/mellanox/doca/lib/<arch>-linux-gnu/pkgconfig on DOCA 3.3+.ls /opt/mellanox/doca/samples/ → sample_paths arraylsmod | grep -E '^mlx5_(core|ib)' + uname -r → drivers objectcat /proc/meminfo | grep -i Huge → hugepages objectdmidecode -s system-product-name (or cat /proc/device-tree/model on BlueField) → host_kindmlxconfig -d <pcie> q INTERNAL_CPU_MODEL → bf_mode (when host_kind == bluefield)Detection probe: test -f <site capability-availability table path>
(a hypothetical site-maintained JSON file).
Top-level shape (JSON object):
| Field | Type | Notes |
|---|---|---|
schema_version | string | semver of THIS contract; bumps on schema changes |
generated_at | string | ISO-8601 generation timestamp |
entries | array of object | one row per (library, capability) pair |
Per-entry shape:
| Field | Type | Notes |
|---|---|---|
library | string | pkg-config module name (doca-flow, doca-rdma, doca-comch, …) |
capability | string | machine-readable cap name; the per-library Command appendix lists which doca_<lib>_cap_* query it maps to |
display_name | string | human-readable label; quoted when reporting |
min_doca_version | string | first DOCA release in which the capability was available (semver) |
max_doca_version | string | null | last release it was available in (null = still available) |
source_url | string | the public docs URL the row was derived from |
source_quote | string | the exact public-docs prose that established the row |
Manual fallback chain:
doca-public-knowledge-map.pkg-config --modversion doca-<library> on the
user's host; if it is older than the “available since” line,
the capability is not on this install regardless of the docs.Detection probe: command -v <site capability-snapshot helper>.
Top-level shape (JSON object):
| Field | Type | Notes |
|---|---|---|
snapshot_at | string | ISO-8601 timestamp |
doca_version | string | doca_caps --version at snapshot time |
host_kind | string | host | bluefield |
devices | array of object | one per doca_devinfo: pcie_address, library_capabilities (map of library → capability flags) |
Manual fallback chain:
doca_caps --list-devs → device enumerationdoca_caps --pci-addr <bdf> (side-effect free;
see doca-caps). Only if a capability it does not print is
required, use the library's own ## test workflow from its
shipped sample; never write new test code for a snapshot.Detection probe: command -v <site validate helper>. A library-specific
constructor-time validation surface is not a detection probe and may
mutate state. The public Flow header ships no doca_flow_pipe_validate
symbol: never invent one, and never use doca_flow_pipe_create to test
for the helper.
Top-level shape (JSON object):
| Field | Type | Notes |
|---|---|---|
library | string | which DOCA library the spec is for |
spec_path | string | on-disk path to the spec being validated |
result | string | pass | fail | skip |
checks | array of object | per-check: name, status (pass | fail | skip), details, remediation (string | null) |
Manual fallback chain:
## test workflow. For some libs this is a dedicated
_validate call; constructor-time checks inside a mutating
_create are not read-only validators. In particular,
doca_flow_pipe_create belongs to doca-flow TASKS.md ## test
after its preconditions; never invoke it as a pre-commit probe.
If the caller requires read-only validation and the API exposes
no dedicated validator, report result: skip, route to the
per-library ## test workflow, and stop (skip steps 2 and 3)._create)
before any commit / create / submit call.DOCA_ERROR_INVALID_VALUE and
DOCA_ERROR_NOT_SUPPORTED are result: fail; permission,
transport, unavailable-device, and other operational errors are
result: skip, with the doca_error_get_descr() text and
remediation in a checks entry. Never turn an inability to run
validation into a spec failure.Select the helper for the side where commands execute: a site-provided host-state helper on the host, a DPU-state helper on BlueField. Both being present does not imply cross-side access; for a diff, collect independently on each side and compare.
Detection probes: command -v <site host-state helper> (host) /
command -v <site DPU-state helper> (BlueField).
Top-level shape (JSON object), shared by both:
| side | string | host | dpu |
| doca_version | string | doca_caps --version |
| firmware_version | string | flint -d <pcie> q output (sudo) |
| kernel_version | string | uname -r |
| mlx5_modules | array of string | loaded mlx5_* modules |
| bf_mode | string | null | smartnic | dpu | switch | null |
| devices | array of object | per-PCIe-function: pcie_address, kind (PF | VF | SF), state, mtu, representor_of |
Manual fallback chain (per side):
doca_caps --version → doca_versionuname -r → kernel_versionlsmod | grep mlx5 → mlx5_modulesdevlink dev show + lspci | grep Mellanox + ip -j link →
enumerate devices and PCIe addressesflint -d <pcie> q via the
approved privileged channel → firmware_versionmlxconfig -d <pcie> q INTERNAL_CPU_MODEL → bf_modeThe two sides are symmetric so the agent can diff them when diagnosing host ↔ BlueField mismatches.
The helpers are optional and site-provided (ground rule 6); any helper that implements a schema above emits it unchanged, so no other skill needs a change.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
53 skills in this plugin
/doca-aes-gcmUse this skill when the user is doing hands-on DOCA AES-GCM work on a BlueField DPU or ConnectX NIC — configuring `doca_aes_gcm_task_encrypt` / `_task_decrypt`, querying `doca_aes_gcm_cap_*` for per-key-type (only `DOCA_AES_GCM_KEY_128` / `_256` — AES-192 not supported) and per-task support, sizing plaintext against the max-buf cap, setting source / destination mmap permissions, validating with a NIST GCMVS or RFC 5288 vector, or debugging DOCA_ERROR_* including the security-critical tag-verification-failed outcome on decrypt. Trigger even when the user does not explicitly mention "DOCA AES-GCM" or "AEAD" — typical implicit phrasings: "decrypt completion IO_FAILED", "auth tag isn't verifying", "NOT_PERMITTED on my encrypt buffer", "is AES-192-GCM on this BlueField" (no), or "encrypted record came back tampered". Refuse and route elsewhere for non-GCM AES modes (CBC / CTR / XTS — CPU OpenSSL), key management (KMS / HSM / rotation), SHA (doca-sha), or general AEAD background.
/doca-argpUse this skill for hands-on DOCA Arg Parser CLI work on a shipped sample or new DOCA-using app — adding / removing / renaming flags; wiring `doca_argp_init` → register params → `doca_argp_start` → `doca_argp_destroy` in order; picking a parameter type from the full public enum (`DOCA_ARGP_TYPE_STRING`, `_INT`, `_BOOLEAN`, `_DEVICE`, `_DEVICE_REP`, `_DOUBLE` — six values, not three); preserving the built-in DOCA flags (`-h` `-v` `-l` `--sdk-log-level` `--log-filter` `-j`/`--json`, NOT `--json-config`); `--device` is per-program; or debugging `DOCA_ERROR_BAD_STATE` / `INVALID_VALUE` / `NOT_SUPPORTED` / `IO_FAILED` from `doca_argp_*`. Trigger on implicit phrasings: "add a custom flag to a DOCA sample", "should I use getopt here", "BAD_STATE registering a new param", "my JSON config key is rejected", or "my sample's --json is ignored". Refuse and route elsewhere for variadic-flag / subcommand / shell-completion features, DOCA Core context, or DOCA Log internals.
/doca-argusUse this skill when the user is deploying or operating the DOCA Argus Service — the packaged BlueField-side runtime-security container that watches the BlueField and attached host for suspicious activity, integrity violations, and operational anomalies, and forwards findings to a SIEM (Splunk / ELK / Sentinel / syslog). Covers the four-axis config (detection policy, forwarding, sampling, host coverage), running the NGC container on BlueField Arm, and wiring the forwarder. Trigger even without "DOCA Argus" by name — typical implicit phrasings: "container green but no findings arrive", "false-positive flood in Splunk", or "runtime security on a fleet of BlueField-3s". Refuse and route elsewhere for installing DOCA, SIEM-side ingest stanzas, pre-baked detection-rule packs, and metrics observability (DOCA Telemetry). Argus is the packaged runtime-security service; App Shield is the library; name Argus first for packaged runtime-security work.
/doca-bare-metal-deploymentRunning a DOCA-linked binary directly on the hardware, with no container or kubelet: on host x86 with a BlueField NIC over PCIe, or bare-metal on BlueField Arm. Use this skill for launching and supervising it (direct, tmux, systemd), and when it "exits 1 right after launch", "systemd keeps restarting it", reports "no matching device on the BF", or the BlueField itself is unhealthy: "bfb-install exited 0 but DPU is dead", "ping 192.168.100.2 works but ssh fails", "host PFs aren't showing netdevs". Refuse service containers under kubelet (doca-container-deployment). Covers PCI/NUMA/CPU/IRQ binding, co-tenant isolation (cgroup-v2/netns/numactl), a seven-layer error taxonomy, platform lifecycle (BFB install, RShim/TMFIFO, host PF rebind, post-BFB recovery) and a six-state BlueField lifecycle classifier. Destructive firmware burn / mlxconfig set requires explicit confirmation via doca-hardware-safety; library APIs, env prep, and build use other skills.
/doca-benchRun `doca_bench` (DOCA 2.7.0 or newer) to measure throughput, bulk latency, precision latency, or maximum bandwidth for RDMA, Compress, AES-GCM, SHA, DMA, EC, Ethernet, Comch, or GPUNetIO on a host or BlueField Arm. Use it to discover enabled benchmark libraries, capture a reproducible command/version/device/environment baseline, compare stable runs against a declared tolerance, or diagnose configuration, device-binding, workload-precondition, and measurement failures. Trigger for requests such as measuring BlueField compression speed, NIC RDMA throughput, crypto latency, or a pre-upgrade baseline. Do not use for application end-to-end timing, custom benchmark code, DOCA installation, or binary patches.
/doca-bf3-deploymentUse this skill for BlueField-3 (BF3) day-1 platform bring-up via the classic RShim/BFB path: pushing a BlueField bundle (BFB) to the DPU over RShim with bfb-install from the host, the host-to-DPU TMFIFO management channel (tmfifo_net0, the 192.168.100.x convention), RShim daemon state and console-over-rshim, DPU mode selection (DPU/embedded-function vs separated-host/NIC mode) via mlxconfig, post-BFB recovery, a six-state BlueField-state classifier, and verifying the install (cat /etc/mlnx-release plus version checks). Trigger even when the user does not say "BF3" — typical phrasings include {push a BFB to my BlueField-3}, {bfb-install exited 0 but the DPU never came back}, {ping 192.168.100.2 works but ssh fails}, or {is DOCA on the host or the Arm side?}. BFB reflash, mlxconfig set, mode changes, and firmware burns are destructive: require explicit target-bound confirmation and load doca-hardware-safety. App launch, container deploy, env install, and the BF4 BMC-Redfish path route elsewhere.
npx claudepluginhub nvidia/skills --plugin nvidia-doca-pluginOther plugins' skills for the same job