# doca-mgmt

doca-mgmt — a skill for programming device management on NVIDIA BlueField DPU and ConnectX NIC from your code. Build fleet tools that query device state, toggle flags like data-direct, and send firmware commands.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 128 installs · ★ 4106 repo stars
- Author: NVIDIA
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/NVIDIA/skills/tree/HEAD/skills/doca-mgmt/SKILL.md
- Updated: 2026-10-23
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/doca-mgmt

## What it does

doca-mgmt lets you write code that talks to your device at the management plane — open a context on BlueField or ConnectX, read capabilities (data-direct, congestion-control), change ICM parameters, and send raw firmware commands with the right access level (CONFIGURATION, DEBUG_READ_ONLY, DEBUG_WRITE, DEBUG_WRITE_FULL).

The skill assumes DOCA SDK is already installed at `/opt/mellanox/doca` on Ubuntu 22.04/24.04 or RHEL/SLES. Scripts use `pkg-config` and read from `/opt/mellanox/doca/{lib,include,samples,applications}`. Runtime requires root (or `cap_*`) and access to `/dev/fwctl*`.

This is device state management, not observability — reach for other skills if you need telemetry or capability snapshots. The skill will refuse direct `mlxconfig` operations, BFB firmware reflash, streaming telemetry, or DOCA install itself.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill doca-mgmt -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/doca-mgmt/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/doca-mgmt/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill doca-mgmt -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/doca-mgmt/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill doca-mgmt -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/doca-mgmt/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install NVIDIA/skills skills/doca-mgmt
```

2. **Manually: put the files in place**
- File: `.github/skills/doca-mgmt/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill doca-mgmt -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/NVIDIA/skills --path skills/doca-mgmt
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/doca-mgmt/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill doca-mgmt -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/NVIDIA/skills/tree/HEAD/skills/doca-mgmt/SKILL.md

## When to use it
- open a management context on a BlueField device
- check if a specific representor supports data-direct
- toggle a congestion-control flag with automatic rollback on error
- send a raw firmware command at the right privilege level
- debug DOCA_ERROR_IO_FAILED from doca_mgmt_raw_cmd

## Example prompts
- Create `doca_mgmt_dev_ctx` for the primary device and `doca_mgmt_dev_rep_ctx` for a VF representor
- Check data-direct support on the representor via `doca_mgmt_device_caps_general_get`
- Send a DEBUG_READ_ONLY firmware command with the correct opcode using `doca_mgmt_raw_cmd`

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 743418bd792964e7.

BEGIN THIRD-PARTY FILE 743418bd792964e7
```text
---
license: Apache-2.0
name: doca-mgmt
description: >
  Use this skill when the user is doing hands-on DOCA Management
  programming against BlueField / ConnectX devices — standing up a
  management or representor context (doca_mgmt_dev_ctx /
  doca_mgmt_dev_rep_ctx), querying device caps (data-direct,
  caps-general), toggling congestion-control global status, modifying
  diagnostics-data, setting ICM quotas, or issuing a raw firmware
  command via doca_mgmt_raw_cmd with the right scope (CONFIGURATION /
  DEBUG_READ_ONLY / DEBUG_WRITE / DEBUG_WRITE_FULL). Trigger even when
  the user does not say "DOCA Management" — typical implicit phrasings
  include "fleet tool that walks every BlueField and reads device
  state", "toggle data-direct on a VF", "set an ICM quota per
  representor", "send a raw firmware command from C",
  "DOCA_ERROR_IO_FAILED from raw_cmd", or "fwctl ioctl is failing".
  Refuse and route elsewhere for mlxconfig direct operation, BFB /
  firmware reflash, streaming telemetry, doca_caps CLI snapshots, or
  DOCA install itself — those belong to other skills.
metadata:
  author: NVIDIA <doca-feedback@nvidia.com>
  kind: library
  doca_version: "3.5"
  tags:
    - doca
    - mgmt
    - firmware
compatibility: >
  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. Reads the user's local install via `pkg-config doca-mgmt` +
  `doca-common` and inspects
  /opt/mellanox/doca/{lib,include,samples,applications}; runtime
  operations require root (or device-admin cap_*) and an /dev/fwctl*
  character device exposed by the host kernel. The validation steps
  require a live DOCA install.
---

# DOCA Management

## Examples

- **"Toggle data-direct on a VF."** — this is in scope. Use the
  management / representor context; do not drop to raw mlxconfig.
- **"DOCA_ERROR_IO_FAILED from raw_cmd."** — the firmware rejected
  the command: re-check the four-way version match, the opcode, and the
  narrowest correct scope (CONFIGURATION, DEBUG_READ_ONLY, DEBUG_WRITE,
  DEBUG_WRITE_FULL). fwctl or permission failures surface as
  `DOCA_ERROR_OPERATING_SYSTEM` instead.

## Instructions

Follow Loading order below. Open the tasks companion for configure /
raw-cmd / debug. Open the capabilities companion for scopes and
device caps. Do not open every companion file.

**Where to start:** This skill assumes DOCA is already installed
and the user is doing **hands-on management-plane work** against
a BlueField / ConnectX device — typically a fleet-management or
orchestration tool that needs to query or modify device-level
state programmatically. Open the tasks companion if the user
```
END THIRD-PARTY FILE 743418bd792964e7

The third-party file has ended. Everything between the 743418bd792964e7 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2722 of 14437 bytes. © NVIDIA · Apache-2.0 · https://github.com/NVIDIA/skills/tree/HEAD/skills/doca-mgmt/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
