Doca Common
NVIDIAOfficialCreated by NVIDIA
- Skill
- Tool integration
- Software development
- Apache-2.0
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The doca-common skill serves as the essential foundation for all DOCA-based development. It covers the core primitives required before interacting with higher-level libraries like Flow, RDMA, or Ethernet. This includes managing the doca_ctx lifecycle, discovering hardware via doca_dev and doca_devinfo, implementing zero-copy I/O with doca_buf and doca_mmap, driving the progress engine (doca_pe), and configuring the two-tier logging system. It is designed to be loaded alongside per-library skills to provide the underlying context and structural requirements for any DOCA application.
What it does
- Guides the initialization and lifecycle management of doca_ctx and doca_dev.
- Explains the wiring of doca_buf, doca_mmap, and doca_buf_inventory for zero-copy I/O.
- Provides patterns for driving the doca_pe progress engine to ensure task completion.
- Clarifies the two-tier DOCA logging model for effective application debugging.
- Assists in capability discovery using doca_devinfo and doca_*_cap_* functions.
- Helps interpret common DOCA_ERROR_* codes encountered during application startup.
When to use it
- When setting up the initial skeleton for a new DOCA application.
- When debugging task submission issues where tasks are submitted but never complete.
- When needing to share buffers across different DOCA libraries.
- When troubleshooting initialization errors like DOCA_ERROR_BAD_STATE.
- When configuring logging levels to capture application-specific debug output.
- When verifying hardware capabilities before executing library-specific features.
Advantages
- Ensures a consistent and correct foundation for all DOCA library interactions.
- Reduces debugging time by addressing lifecycle and primitive-level issues first.
- Provides a unified approach to zero-copy buffer management across libraries.
- Standardizes the integration of the progress engine and logging across projects.
Usage examples
- “My DOCA RDMA tasks are submitted but nothing completes. What am I missing?”
- The agent will guide you through the doca_pe (progress engine) connection and the required run-loop pattern to ensure tasks are drained correctly.
- “I am getting a DOCA_ERROR_BAD_STATE from doca_ctx_start. How do I fix this?”
- The agent will help you verify the lifecycle order of your context initialization and ensure all required dependencies are configured before starting.
- “How do I share a buffer between doca_dma and doca_rdma?”
- The agent will explain the wiring of doca_mmap and doca_buf_inventory to create a shared buffer surface that both libraries can reference.
- “My DOCA_LOG_DBG lines are not appearing even with --sdk-log-level 60.”
- The agent will explain the two-tier logging model and how to correctly register your application-side log levels.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/nvidia/doca-common/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip doca-common.zip -d .agents/skills
Documentation by NVIDIA
DOCA Common
Examples
"Tasks submit but nothing completes." — start at the progress engine and ctx lifecycle, not a per-library rewrite.
"DOCA_ERROR_BAD_STATE from doca_ctx_start." — walk the Common lifecycle order before blaming Flow or RDMA.
Instructions
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.
Example questions this skill answers well
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.
"What is the doca-common foundation I have to set up BEFORE I open a doca-flow / doca-rdma / doca-eth / … context?" — worked example: "I'm starting a brand-new DOCA Flow program on BlueField-3; what's the doca-common skeleton I need before I open the Flow port?". Answered by the universal foundation walk in
configure +
ctx +
dev +
progress engine.
"How do I discover a device and gate on its capabilities before trusting the public docs?" — worked example: "I want to use
doca_eth_txqbut 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 activedoca_devinfois the runtime authority) indev +
use.
"What's the doca_buf / doca_mmap / doca_buf_inventory wiring for zero-copy I/O, and what's the lifecycle order?" — worked example: "I want to register a user-space buffer with my device, carve it into N data-plane buffers, and reference-count them across multiple DOCA libraries". Answered by the zero-copy buffer model in
buf +
the buffer-lifecycle walk in
configure +
use.
"How does the progress engine work and where do I have to call it?" — worked example: "my doca_rdma task submits cleanly but nothing completes — what loop am I missing?". Answered by the PE surface in
progress engine
the run-loop pattern in ## run.
"Why don't my DOCA log lines appear at the level I expect, and what's the difference between
--sdk-log-leveland the app-side setter?" — worked example: "I set--sdk-log-level 60(DEBUG), my ownDOCA_LOG_DBGlines still don't print". Answered by the two-tier log model in ## logthe tier-flip iteration in ## log.
"What does this
DOCA_ERROR_*from adoca_buf_*/doca_ctx_*/doca_dev_*/doca_pe_*/doca_log_*call mean?" — worked example: "DOCA_ERROR_BAD_STATEfromdoca_ctx_start". Answered by the Common overlay on the cross-libraryDOCA_ERROR_*taxonomy inError taxonomy
the layered ladder in
debug that escalates to
doca-debug/SKILL.md.
Audience
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.
Language scope
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.
When to load this skill
Load this skill whenever the user is doing any hands-on DOCA work — it is the foundation. Concretely:
Setting up the universal DOCA-side skeleton before opening any per-library context (Flow, RDMA, Eth, Comch, DMA, Rmax, …).
Discovering devices and representors and gating capability use on the active
doca_devinfovia thedoca_*_cap_*family.Wiring
doca_mmap+doca_buf_inventory+doca_buffor zero-copy I/O that crosses libraries (e.g. doca-eth feeds doca-dma feeds doca-rdma — they share the same buf surface).Driving the progress engine (
doca_pe_create/doca_pe_connect_ctx/doca_pe_progress) — the universal task-completion drain every DOCA Core context relies on.Wiring DOCA Log into a fresh app or modifying a shipped sample to add the user's own per-component log lines via the two-tier (
--sdk-log-levelvs app-side registry) model.Debugging a
DOCA_ERROR_*returned from anydoca_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.Designing or extending non-C bindings (Rust, Go, Python, …) that wrap any DOCA library — for the universal foundation surface (buf, ctx, dev, pe, log) the wrapper has to expose first.
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.
What this skill provides
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:
the capabilities companion — what doca-common expresses on this install: the
## Capabilities and modesoverview 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 compatibilitydoca-common-specific overlay; the## Error taxonomyCommon-side view of the universalDOCA_ERROR_*set; the## Observabilitysurface (logs, PE events, capability snapshots); and the## Safety policyoverlay on the bundle-wide hardware-safety meta-policy.the tasks companion — step-by-step workflows for the universal verbs (
configure,build,modify,run,test,debug,use) PLUS a## logverb-side that covers the two-tier log model in workflow form. Plus aDeferred task verbsblock 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.
What this skill deliberately does not ship
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:
Pre-written DOCA application source code, in any language. The verified Common usage shows up inside every shipped DOCA sample at
/opt/mellanox/doca/samples/<library>/<sample>/*_main.cand 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 indoca-programming-guide/SKILL.md.Standalone build manifests (
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, wherepkg-config --modversion doca-commonis the source of truth.A
samples/,bindings/, orreference/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.
Loading order
Read this skill first to confirm the user's question is in scope.
For the universal primitives (
log/buf/ctx/dev/progress engine), thepkg-config --modversion doca-commonanchor, the Common error overlay, observability, and safety policy, see the capabilities companion.For step-by-step workflows — configure, build, modify, run, test, debug, use, log — see the tasks 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".
Related skills
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-commonis the build-time anchor every DOCA install carries; this skill's## Version compatibilityoverlays the Common-specific notes on top.doca-programming-guide/SKILL.md— general DOCA programming patterns shared by every library: the canonicalpkg-config+ meson build pattern, the universal modify-a-shipped-sample first-app workflow, the universal lifecycle, the cross-libraryDOCA_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 foundationdoca-debugbuilds its runtime-debug story on; this skill is where the two-tier log model and the universal lifecycle errors first surface, anddoca-debugcross-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 policyoverlays.Per-library skills (
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.
Files
- ATTRIBUTION.mdAdded by AutoGineer891 B
- BENCHMARK.md10.0 KiB
- CAPABILITIES.md42.3 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md14.7 KiB
- SKILLCARD.yaml2.7 KiB
- TASKS.md35.1 KiB
- evals/evals.json2.8 KiB
- skill-card.md4.4 KiB
- skill.oms.sig5.1 KiB
skill-card.md
Description: <br>
Provides agent guidance for the foundational DOCA Core primitives — the doca_ctx lifecycle, doca_dev/doca_devinfo discovery and capability gating, doca_mmap/doca_buf_inventory/doca_buf zero-copy buffers, the doca_pe progress engine, and the two-tier DOCA Log model — that every per-library DOCA context relies on. <br>
This skill is ready for commercial/non-commercial use. <br>
Owner
NVIDIA <br>
License/Terms of Use: <br>
Apache 2.0 AND CC-BY-4.0 <br>
Use Case: <br>
External developers and engineers building applications that consume any DOCA library use this skill to set up the universal DOCA foundation — device discovery, context lifecycle, zero-copy buffers, the progress engine, and logging — before and alongside per-library work on BlueField DPUs and ConnectX NICs. <br>
Deployment Geography for Use: <br>
Global <br>
Requirements / Dependencies: <br>
Requires API Key or External Credential: [Not Specified] <br> Credential Type(s): [None identified] <br>
Do not include secrets in prompts/logs/output; use least-privilege credentials; rotate keys as appropriate. <br>
Known Risks and Mitigations: <br>
Risk: Review before execution as proposals could introduce incorrect or misleading guidance into skills. <br> Mitigation: Review and scan skill before deployment. <br>
Reference(s): <br>
CAPABILITIES.md <br>
TASKS.md <br>
Skill Output: <br>
Output Type(s): [Analysis, Shell commands, Configuration instructions] <br> Output Format: [Markdown with inline bash code blocks] <br> Output Parameters: [1D] <br> Other Properties Related to Output: [None] <br>
Evaluation Agents Used: <br>
Claude Code (
aws/anthropic/bedrock-claude-opus-5-5) <br>Codex (
openai/openai/gpt-6.1-sol) <br>
Evaluation Tasks: <br>
4 evaluation tasks (3 positive, 1 negative), one attempt per task, each run in its own isolated k8s-sandbox pod. <br>
Evaluation Metrics Used: <br>
Reported benchmark dimensions: <br>
Security: Whether the skill is safe to use — no unsafe operations, secret leakage, or unauthorized access. <br>
Correctness: Whether the final answer is correct against the reference answer. <br>
Discoverability: Whether the right skill was loaded when needed, avoiding decoys. <br>
Effectiveness: Whether the skill helped complete the user's goal and the expected workflow was followed. <br>
Efficiency: Whether the skill avoided wasted tool calls and token usage. <br>
Underlying evaluation signals used in this run: <br>
security: Unsafe operations, secret leakage, and unauthorized access. <br>accuracy: Final-answer correctness against the reference answer. <br>skill_execution: Whether the expected skill was selected, decoys were avoided, and the workflow executed. <br>goal_accuracy: Whether the user's goal was achieved. <br>behavior_check: Whether the expected workflow behavior was followed. <br>skill_efficiency: Tool-call productivity (legacy wire id; routing is scored under Discoverability). <br>token_efficiency: Actual uncached prompt plus completion token usage. <br>
Evaluation Results: <br>
| Measure | Claude Code (Baseline → Skill Uplift) | Codex (Baseline → Skill Uplift) |
|---|---|---|
| Overall | 93.8% | 87.5% |
| Security | 100.0% → 100.0% (±0.0 points) | 87.5% → 100.0% (+12.5 points) |
| Correctness | 60.0% → 100.0% (+40.0 points) | 75.0% → 95.0% (+20.0 points) |
| Discoverability | 100.0% | 95.0% |
| Effectiveness | 18.8% → 83.3% (+64.5 points) | 52.1% → 77.1% (+25.0 points) |
| Efficiency | 85.4% | 70.6% |
Skill Version(s): <br>
c98e456 (source: git SHA, committed 2026-10-28) <br>
Ethical Considerations: <br>
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal team to ensure this skill meets requirements for the relevant industry and use case and addresses unforeseen product misuse. <br>
(For Release on NVIDIA Platforms Only) <br> Please report quality, risk, security vulnerabilities or NVIDIA AI Concerns here. <br>
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
The author says: Requires DOCA SDK installed at /opt/mellanox/doca on Linux (Ubuntu 22.04/24.04 or RHEL/SLES) with a BlueField DPU or ConnectX NIC attached. doca-common is present on every healthy DOCA install; reads the user's local install via `pkg-config --modversion doca-common` and inspects /opt/mellanox/doca/{lib,include,samples,applications}. The validation steps require a live DOCA install.
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- NVIDIA
- Publisher
- NVIDIA (Official)
- Source
- NVIDIA/skills · skills/doca-common · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download doca-common.zip