/nvidia-doca-plugin:doca-commonfrom NVIDIA DOCA
Guides DOCA programming on BlueField DPU/ConnectX NIC: doca_ctx lifecycle, device discovery, zero-copy I/O with mmap/buf/PE, and DOCA Log's two-tier model. Activates on implicit phrasings like 'tasks submit but nothing completes' or 'DOCA_ERROR_BAD_STATE'.
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.
pkg-config --modversion doca-common, four-way matched with
doca_caps --version and cat /opt/mellanox/doca/applications/VERSION.doca_pe_create (one per worker thread), doca_<library>_create,
doca_pe_connect_ctx BEFORE doca_ctx_start, then a loop that calls
doca_pe_progress; nothing completes without it.doca_ctx_stop and any destroy, with
doca_ctx_flush_tasks or doca_pe_progress until
doca_ctx_get_num_inflight_tasks is 0; then stop, destroy the context,
the buffer inventory, the mmap and the PE, in reverse order.pkg-config --modversion doca-common, four-way matched with
doca_caps --version and cat /opt/mellanox/doca/applications/VERSION.
On shutdown drain first: doca_ctx_flush_tasks or loop doca_pe_progress
until doca_ctx_get_num_inflight_tasks is 0, then doca_ctx_stop, the
library destroy, doca_buf_inventory_stop / destroy, doca_mmap_stop /
destroy, doca_pe_destroy, and close the device.Follow Loading order below. Open the tasks companion for configure / build / run. Open the capabilities companion for ctx / buf / pe / log. Do not open every companion file.
Where to start: This skill is the foundation every DOCA app
loads first — before doca-flow, doca-rdma, doca-eth, doca-comch, or
any other higher-level library. Every doca_<library>_* context is
built on top of doca_ctx, every device handle is a doca_dev
discovered through doca_devinfo, every zero-copy buffer is a
doca_buf from a doca_buf_inventory over a doca_mmap, every
task completion drains through a doca_pe, and every log line emits
through doca_log. Open the capabilities companion when
the question is what does Common express on this install; open
the tasks companion when the user wants to do something
(configure / build / modify / run / test / debug). If the user has
not installed DOCA yet, route to
doca-setup/SKILL.md first. If the user is
already past the foundation and asking a library-specific question
(e.g. "how do I program a Flow pipe"), load the matching per-library
skill alongside this one — they cross-link back here for the shared
primitives.
The CLASSES of doca-common questions this skill is built to answer, each with one worked example. The agent should treat the class as the load-bearing piece — the worked example is a single instance.
doca_eth_txq but the docs hint at a feature only on certain
firmware bands". Answered by the capability-discovery rule
(doca_devinfo_create_list → doca_*_cap_* against the active
doca_devinfo is the runtime authority) in
--sdk-log-level and the app-side
setter?" — worked example: "I set --sdk-log-level 60 (DEBUG), my
own DOCA_LOG_DBG lines still don't print". Answered by the
two-tier log model in ## log
DOCA_ERROR_* from a doca_buf_* / doca_ctx_*
/ doca_dev_* / doca_pe_* / doca_log_* call mean?" —
worked example: "DOCA_ERROR_BAD_STATE from doca_ctx_start".
Answered by the Common overlay on the cross-library DOCA_ERROR_*
taxonomy in
doca-debug/SKILL.md.This skill serves every external developer building applications
that consume any DOCA library — i.e., users whose code calls any
doca_* symbol (directly in C/C++, or through FFI/bindings from
another language). Whether the user's primary library is doca-flow,
doca-rdma, doca-eth, doca-comch, doca-dma, doca-rmax, doca-sha,
doca-aes-gcm, doca-erasure-coding, or any other, the doca-common
surface is under it and the user will hit doca_buf, doca_ctx,
doca_dev, doca_pe, and doca_log as part of the first-app
journey. It is not for NVIDIA developers contributing to DOCA
Common itself.
DOCA Common ships as a C library with pkg-config module name
doca-common. The shipped samples that demonstrate Common primitives
live inside every per-library samples tree (any
/opt/mellanox/doca/samples/<library>/<sample>/*_main.c is a worked
example of the universal foundation — doca_devinfo_create_list
→ doca_dev_open → per-library doca_ctx create → doca_pe_create
→ doca_pe_connect_ctx → doca_ctx_start → submit work → drive
doca_pe_progress → drain completions → doca_ctx_stop → destroy).
C and C++ consumers are the canonical case and the worked examples
in the tasks companion assume that path. Other-language consumers (Rust, Go,
Python, …) consume the same *.so through FFI or language-specific
bindings; the skill's contribution in that case is to keep the
universal foundation walk, the lifecycle, the capability-discovery
rule, the PE-drives-completion rule, and the two-tier log model
language-neutral, and to route the agent to the public C ABI as the
authoritative surface that any wrapper will eventually call.
Load this skill whenever the user is doing any hands-on DOCA work — it is the foundation. Concretely:
doca_devinfo via the doca_*_cap_* family.doca_mmap + doca_buf_inventory + doca_buf for
zero-copy I/O that crosses libraries (e.g. doca-eth feeds
doca-dma feeds doca-rdma — they share the same buf surface).doca_pe_create /
doca_pe_connect_ctx / doca_pe_progress) — the universal
task-completion drain every DOCA Core context relies on.--sdk-log-level vs app-side registry) model.DOCA_ERROR_* returned from any doca_buf_* /
doca_ctx_* / doca_dev_* / doca_pe_* / doca_log_* call —
the Common surface is where most lifecycle / capability /
permission errors first surface for higher-level libraries.Do not load this skill for library-specific Flow, RDMA, Eth,
Comch, DMA, Rmax, … questions in isolation — load the matching
per-library skill alongside this one. Do not load this skill for
general DOCA orientation, install of DOCA itself, or
"where do I find docs". For those, use
doca-public-knowledge-map/SKILL.md
or doca-setup/SKILL.md.
This is a thin loader. The body keeps only the orientation needed to pick the right next file. The substantive Common material lives in two companion files:
## Capabilities and modes overview of the universal
primitives every DOCA application touches; the five subsystem
H2s (## log, ## buf, ## ctx, ## dev, ## progress engine) that own the per-primitive surface; the
## Version compatibility doca-common-specific overlay;
the ## Error taxonomy Common-side view of the universal
DOCA_ERROR_* set; the ## Observability surface (logs, PE
events, capability snapshots); and the ## Safety policy overlay
on the bundle-wide hardware-safety meta-policy.configure, build, modify, run, test, debug, use)
PLUS a ## log verb-side that covers the two-tier log model in
workflow form. Plus a Deferred task verbs block that points
install / deploy / rollback questions at the right next skill.The skill assumes a host or BlueField where DOCA is already
installed at the standard location and the user has the privileges
their public install profile expects. It does not cover installing
DOCA — that path goes through
doca-setup/SKILL.md.
This skill is agent guidance, not a samples or templates bundle. To keep the boundary clean, it deliberately does not contain — and pull requests should not add:
/opt/mellanox/doca/samples/<library>/<sample>/*_main.c
and inside every shipped reference application. The agent's job
is to route the user to those files and prescribe a minimum-diff
modification on them via the universal modify-a-sample workflow
in
doca-programming-guide/SKILL.md.meson.build,
CMakeLists.txt, Cargo.toml, setup.py, go.mod, …) parked
inside the skill. The agent constructs the build manifest in
the user's project directory against the user's installed DOCA,
where pkg-config --modversion doca-common is the source of
truth.samples/, bindings/, or reference/ subtree of any
kind. A mock or incomplete artifact in this skill's tree, even
one labeled "reference", is misleading: users will read it as
buildable.log / buf / ctx / dev /
progress engine), the pkg-config --modversion doca-common
anchor, the Common error overlay, observability, and safety
policy, see the capabilities companion.Both companion files cross-link to each other,
doca-version/SKILL.md for the canonical
version-handling rules,
doca-programming-guide/SKILL.md
for the universal modify-a-shipped-sample workflow and the
cross-library DOCA_ERROR_* taxonomy,
doca-debug/SKILL.md for the cross-cutting
debug ladder, and
doca-public-knowledge-map/SKILL.md
whenever the right answer is "look it up in the public docs or the
installed package layout" rather than "Common-specific guidance".
doca-public-knowledge-map/SKILL.md —
the routing table for every public DOCA documentation source and
the on-disk layout of an installed DOCA package. Always available
alongside this skill; this skill expects to be able to defer
documentation-finding and install-layout questions there instead
of duplicating them.doca-setup/SKILL.md — env preparation,
install verification, and the I have no install yet path with
the public NGC DOCA container (nvcr.io/nvidia/doca/doca) as the
universal Stage-1 fallback. This skill assumes its preconditions
are satisfied.doca-version/SKILL.md — canonical DOCA
version-handling rules (four-way match, NGC semantics,
headers-win-over-docs). pkg-config --modversion doca-common is
the build-time anchor every DOCA install carries; this skill's
## Version compatibility overlays the Common-specific notes on
top.doca-programming-guide/SKILL.md —
general DOCA programming patterns shared by every library: the
canonical pkg-config + meson build pattern, the universal
modify-a-shipped-sample first-app workflow, the universal
lifecycle, the cross-library DOCA_ERROR_* taxonomy, and the
program-side debug order. This skill is the primitives layer
the programming-guide patterns rest on.doca-debug/SKILL.md — the cross-cutting
debug ladder (install / version / build / link / runtime /
program / driver) and the verbosity-escalation surface. DOCA Log
is the foundation doca-debug builds its runtime-debug story on;
this skill is where the two-tier log model and the universal
lifecycle errors first surface, and doca-debug cross-links here
for both.doca-structured-tools-contract/SKILL.md —
the bundle's structured-tools precedence rule (detect / prefer /
fall back / report). The Command appendix in
the tasks companion honors this contract.doca-hardware-safety/SKILL.md —
the cross-cutting hardware-safety meta-policy this skill's
## Safety policy overlays.doca-flow, doca-rdma, doca-eth,
doca-comch, doca-dma, doca-rmax, doca-sha, doca-aes-gcm,
doca-erasure-coding, doca-compress, doca-dpa, doca-gpunetio,
doca-pcc, doca-sta, doca-telemetry, doca-urom,
doca-verbs, doca-argp, doca-devemu,
doca-dpdk-bridge, …) — every per-library skill cross-links
back to this skill for the foundation primitives. Loading this
skill alongside any of them is the recommended default.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nvidia/skills --plugin nvidia-doca-plugin53 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.
Other plugins' skills for the same job