What problem does it solve?
Developers modifying DOCA samples or building DOCA-using applications often break the standard CLI surface, misuse the doca_argp lifecycle, or misdiagnose DOCA_ERROR codes when adding custom flags. This Skill teaches agents the correct register-before-start lifecycle, the six-value parameter type enum, and the Arg Parser error taxonomy so CLI modifications stay consistent with every shipped DOCA sample.
Core Features & Use Cases
- Lifecycle wiring: Walks the doca_argp_init → register params → doca_argp_start → doca_argp_destroy order, preventing the common BAD_STATE failure from registering params after parsing.
- Parameter type selection: Chooses from the full public enum (STRING, INT, BOOLEAN, DEVICE, DEVICE_REP, DOUBLE) and explains JSON config as an input surface, not a type.
- Standard CLI surface preservation: Keeps --device, --representor, --rep-list, --json (-j), and --sdk-log-level working identically across samples, and refuses getopt/argparse rewrites that silently drop JSON-config support.
- Error diagnosis: Maps DOCA_ERROR_BAD_STATE, INVALID_VALUE, NOT_SUPPORTED, and IO_FAILED from doca_argp_* calls to lifecycle, type-mismatch, unknown-JSON-key, or file-access root causes.
- Use Case: A developer wants to add --my-flag to the dma_local_copy sample while keeping --device and JSON-config support intact; the Skill routes them to the sample's *_main.c, prescribes a minimum-diff modification, and validates the result via --help, argv, and JSON smoke tests.
Quick Start
Ask your agent to add a custom flag to a shipped DOCA sample using the doca-argp skill while preserving the standard CLI surface.