SkillAgentSearch skills...

doca-structured-tools-contract

Use this skill whenever another DOCA skill says "prefer the structured tool per doca-structured-tools-contract", or when the user wants a one-shot answer that consolidates info multiple manual commands would produce — DOCA env / version / devices / capabilities / validate / host vs DPU state.

Install / Use

npx skills add NVIDIA/skills --skill doca-structured-tools-contract

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

88/100

Category

Legal

Supported Platforms

Universal

Tags

Our assessment of doca-structured-tools-contract

doca-structured-tools-contract scores 88/100 on our quality scale, 50th of 123 Legal skills we index (top 41%).

Its SKILL.md is 19 KB long, well organised into 13 sections and no code examples: a thorough specification that gives an agent plenty to work with.

With 3,421 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
30/30
Structure
13/20
Description
15/15
Adoption
15/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 5 days ago, so doca-structured-tools-contract is actively maintained.
  • It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

doca-structured-tools-contract compared with similar skills

All 4 of these similar skills score higher than doca-structured-tools-contract; compare them before choosing.

SkillScoreStarsUpdatedFormat
doca-structured-tools-contract (this skill)by NVIDIA883.4k5d agoSKILL.md
algorithmic-artby anthropics100177.9k6d agoSKILL.md
pptxby anthropics100177.9k6d agoSKILL.md
designby nextlevelbuilder100130.2k7d agoSKILL.md
ui-ux-pro-maxby nextlevelbuilder100130.2k7d agoSKILL.md

Frequently asked questions

How do I install doca-structured-tools-contract?
Run npx skills add NVIDIA/skills --skill doca-structured-tools-contract. The install tabs above show the steps for each supported agent.
Which AI agents does doca-structured-tools-contract work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is doca-structured-tools-contract safe to use?
It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is doca-structured-tools-contract still maintained?
The repository was last updated 5 days ago, so doca-structured-tools-contract is actively maintained.

license: Apache-2.0 AND CC-BY-4.0 name: doca-structured-tools-contract description: > Use this skill whenever another DOCA skill says "prefer the structured tool per doca-structured-tools-contract", or when the user wants a one-shot answer that consolidates info multiple manual commands would produce — DOCA env / version / devices / capabilities / validate / host vs DPU state. Trigger even when the user does not explicitly mention "structured tool" or "doca-env --json" — typical implicit phrasings include "is there one command that tells me everything about my DOCA install", "what version is X capability available since", "every PF/VF/SF visible on this BlueField with PCIe address", "will this pipe pass validate before commit", "diff host vs DPU state", or "why does the agent give a one-line answer on host A and five commands on host B". Refuse and route elsewhere for general DOCA orientation, specific library API how-to, or install-from-scratch guidance — those belong to the per-library skill, doca-public-knowledge-map, or doca-setup. metadata: kind: knowledge compatibility: > No DOCA install required to read this skill (it is an overlay loaded against any DOCA artifact skill); the validation steps within DO require a live DOCA install at /opt/mellanox/doca.

DOCA structured-tools contract

Where to start: Reach for this skill whenever a workflow in another skill says "prefer the structured tool per doca-structured-tools-contract". Read ## The agent behavior contract first; then drill into the matching schema in ## Schemas. If the host has the structured tool, prefer its output. If it does not, fall back to the manual command chain in the same schema section. Always report which path was taken so the user can fix the gap (or so a future bundle update can detect that the structured path was never tried).

Example questions this skill answers well

See references/examples.md for the five worked routing examples. Keep this loader focused on detection, fallback behavior, and the authoritative schemas below.

When to load this skill

Load this skill whenever another skill's workflow tells the agent to prefer the structured tool, OR whenever the user's question implies they want a single one-shot answer that consolidates information multiple manual commands would otherwise produce.

Concretely:

  • A library / service / tool skill's Command appendix references this skill in its first column.
  • The user asks "is there one command that tells me X about my DOCA install" (env / devices / version / capabilities / hardware topology).
  • The user asks "how do I know X is valid before I commit" for any DOCA library that has a validate-before-commit call.
  • The agent has computed the manual fallback answer and wants to also surface the equivalent structured-tool one-liner so the user can adopt it next time.

Do not load this skill for general DOCA orientation, for specific library API questions, or for install-from-scratch guidance. For those, use the matching library skill + doca-public-knowledge-map

Running probes and fallbacks requires shell access to the target host, either directly by the agent or through commands the user runs.

Ground rules for any agent using this skill

  1. Detect first; never assume the tool is present. Each schema below names the probe command that decides whether the structured tool is installed on this host. Run the probe before reading the schema's output as authoritative.
  2. Prefer structured when present; fall back to manual when not. When the probe succeeds and the output validates against the selected schema, the structured JSON is the source of truth. When the probe fails or the output is invalid, walk the manual command chain in the same schema section and synthesize the equivalent answer.
  3. Report which path you took. Always tell the user at the start of the answer: "using structured <helper> (path: <path>)" OR "falling back to manual chain (structured <helper> probe failed: <reason>)", substituting the helper selected by the schema and the actual probe failure. Never report a helper different from the one the schema selected.
  4. Schemas are locked here; per-skill overlays are NOT. A library / service / tool skill MAY add a per-skill row to its own Command appendix that uses a schema; it MUST NOT redefine the schema. If a schema needs to grow, the change happens here first and every Command appendix that consumes it inherits the change automatically.
  5. Never invent a JSON field that is not in the schema. The structured tool's output is exactly the shape this contract says it is. If the user pastes JSON that contains a field not in the schema, treat the extra field as advisory and quote the official schema as the boundary.
  6. Schemas describe contracts, not implementations. The executables that satisfy these contracts are deferred to a subsequent PR on the maintainer roadmap. This skill exists so every other skill in the bundle can be infra-aware before the executables ship.
  7. Privilege is never implicit. A manual fallback command that requires sudo is emitted for the user to run or executed only through an already approved privileged channel. Never silently elevate merely because the structured helper was absent. Do not assume such a channel exists; if it does not, ask the user to run the command or report the privileged-data gap.

The agent behavior contract

The contract is a four-step loop the agent runs every time a skill's Command appendix references this contract:

  1. Detect. Run the probe command listed in the schema section for the relevant tool. Examples: command -v doca-env, test -f /opt/mellanox/doca/share/version-matrix.json, command -v doca-capability-snapshot. Probes are read-only and safe to run on any host. The executable helpers are deferred to PR2, so until they ship, failed command probes are expected and the manual chains are the operative path unless a helper was installed separately.
  2. Prefer. If the probe succeeds, invoke the structured tool and parse its JSON per the schema in ## Schemas. It is authoritative only when parsing succeeds and every required field has the documented type. Malformed JSON, missing fields, or type mismatches make the structured path fail: report that exact validation failure and use step 3. Ignore unexpected extra fields as advisory per ground rule 5; do not expose them as contract output. Do NOT run the manual chain merely "to double check" valid structured output — valid structured output replaces the chain.
  3. Fall back. If the probe fails, walk the manual command chain documented in the same schema section. Synthesize the answer by combining the manual command outputs in the order the chain lists them. If a manual command is unavailable on the host, surface that as a gap and route the user to the matching skill (typically doca-setup). If that route cannot resolve the gap, name the missing commands or artifacts, state that the consolidated answer cannot be completed, and stop rather than presenting partial data as complete.
  4. Report. Open the answer with one of:
    • "Using structured <tool> (path: <path>)." — when the probe succeeded and its output validated.
    • "Falling back to manual chain (structured <tool> probe failed: <reason>)." — when the probe failed. Include the actual probe command and failure reason; for command -v, note that failure means the helper was not found on PATH, not that it is definitively absent. Plus a one-line note pointing the user at how to install the helpers when they become available.
    • "Falling back to manual chain (<tool> output failed schema validation: <reason>)." — when the helper exists but its output is malformed, missing required fields, or has invalid field types.

The report step proves the agent tried the helper before falling back.

Schemas

Select the schema from the question shape: environment/install state uses doca-env; capability minimum-version lookup uses version-matrix; per-device library capabilities use capability-snapshot; spec validation uses validate-before-commit; and a host-versus-DPU state comparison uses the two collect-state schemas. When a per-skill Command appendix names a schema, use that schema directly.

Each subsection below names ONE structured tool the bundle expects to interoperate with, gives its detection probe, names its top-level JSON shape, and lists the manual command chain the agent walks when the probe fails.

doca-env --json schema

Detection probe: command -v doca-env. The structured tool, if installed, lives at the same $PATH location as doca_caps (i.e. under the DOCA install tree's bin/).

Top-level shape (JSON object):

| Field | Type | Notes | | --- | --- | --- | | version | object | pkg_config / applications_version / doca_caps / bfb (string | null) / consistent (bool) | | devices | array of object | one entry per visible PCIe function: pcie_address (e.g. 0000:03:00.0), kind (PF | VF | SF), name, representor_of (string | null), state (active | down | unknown), mtu (number) | | libraries | array of object | one entry per public DOCA library: pkg_config_name, installed (bool), pc_path (string | null) | | sample_paths | array of object | one entry per library: library, path (the on-disk samples root) | | drivers | object | mlx5_core_loaded (bool), mlx5_ib_loaded (bool), kernel_version (string) | | hugepages | object | available_2m (number), available_1g (number), mount_point (string | null) | | host_kind | string | one of host | bluefield | unknown | | bf_mode | string | null | one of smartnic | dpu | switch | null (when host_kind != bluefield) |

Manual fallback chain (run in order; combine the outputs to synthesize the same answer):

  1. pkg-config --modversion doca-common → version.pkg_config
  2. cat /opt/mellanox/doca/applications/VERSION → version.applications_version
  3. doca_caps --version → version.doca_caps
  4. doca_caps --list-devs → devices array (parse PCIe address + kind + representor)
  5. Find doca-common.pc first. If find /opt/mellanox/doca -name doca-common.pc -print -quit returns empty, stop this row, surface the partial-install gap, and route to doca-setup; do not expand an empty directory glob. Otherwise derive PCDIR from that result and run for pc in "$PCDIR"/*.pc; do pkg-config --exists "$(basename "$pc" .pc)" && echo "$pc"; done → libraries array. If PCDIR is not a directory or no module resolves through pkg-config --exists, surface that gap and route to doca-setup. PCDIR is commonly /opt/mellanox/doca/lib/<arch>-linux-gnu/pkgconfig on DOCA 3.3+, or /opt/mellanox/doca/infrastructure/lib/pkgconfig on legacy / split-profile installs.
  6. ls /opt/mellanox/doca/samples/ → sample_paths array
  7. lsmod | grep -E '^mlx5_(core|ib)' and uname -r → drivers object
  8. cat /proc/meminfo | grep -i Huge → hugepages object
  9. dmidecode -s system-product-name (or cat /proc/device-tree/model on BlueField) → host_kind
  10. mlxconfig -d <pcie> q INTERNAL_CPU_MODEL → bf_mode (when host_kind == bluefield)

version-matrix.json schema

Detection probe: test -f /opt/mellanox/doca/share/version-matrix.json. If absent, use the manual fallback; do not guess another install path.

Top-level shape (JSON object):

| Field

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars3.4k
CategoryLegal
Updated5d ago
Forks412

Languages

Python

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions