Agent skill · software engineering · nvidia

doca-argp

Use 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.

Why this skill is useful

Provides specific commands and workflows for using the DOCA Arg Parser that the AI wouldn't reliably generate on its own.

What it needs

Requires doca installed locally. About 7k tokens when loaded. Last updated 2026-08-07. 2,816 stars on the source repository.

What this skill does

DOCA Arg Parser Examples "Add a custom flag to a DOCA sample." — this is in scope. Register a typed docaargp param; do not drop to getopt. "BADSTATE registering a new param." — check init → register → start order before changing the flag type. Instructions Follow Loading order below. Open the tasks companion for configure / register / debug. Open the capabilities companion for the public param types. Do not open every companion file. Where to start: This skill assumes DOCA is already installed and the user is doing hands-on CLI work on a DOCA sample or new DOCA-using app. Open the tasks companion if the user wants to do something (configure / build / modify / run / test / debug); open the capabilities companion when the question is what can the Arg Parser express on this version. If the user has not installed DOCA yet, route to doca-setup/SKILL.md first. If the user is about to rewrite a sample's CLI with getopt / argparse / custom parsing instead of reusing the Arg Parser, read the load-bearing rule in the capabilities companion before any code change. Example questions this skill answers well The CLASSES of Arg Parser 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. "How do I add a new flag to a DOCA sample without breaking the standard CLI?" — worked example: "add --my-flag to /opt/mellanox/doca/samples/docadma/dmalocalcopy/ so the sample still accepts --device <PCI> and --sdk-log-level <level> the same way it did before". Answered by the reuse-the-Arg-Parser rule in the capabilities companion the register-before-start workflow in the tasks companion. "Why does docaargpparamset return BADSTATE on my second call?" — worked example: "registering a new param after docaargpstart has already parsed argv". Answered by the lifecycle order in the capabilities companion the error-taxonomy row in the capabilities companion for DOCAERRORBADSTATE. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills nvidia/doca-argp

View the source on GitHub

Browse the @skills marketplace