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-contractInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
LegalSupported Platforms
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.
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.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| doca-structured-tools-contract (this skill)by NVIDIA | 88 | 3.4k | 5d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 6d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 6d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 7d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 7d ago | SKILL.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.
Skill content
View source on GitHublicense: 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
- 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.
- 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.
- 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. - 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.
- 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.
- 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.
- Privilege is never implicit. A manual fallback command that
requires
sudois 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:
- 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. - 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. - 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. - 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; forcommand -v, note that failure means the helper was not found onPATH, 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.
- "Using structured
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):
pkg-config --modversion doca-common→version.pkg_configcat /opt/mellanox/doca/applications/VERSION→version.applications_versiondoca_caps --version→version.doca_capsdoca_caps --list-devs→devicesarray (parse PCIe address + kind + representor)- Find
doca-common.pcfirst. Iffind /opt/mellanox/doca -name doca-common.pc -print -quitreturns empty, stop this row, surface the partial-install gap, and route todoca-setup; do not expand an empty directory glob. Otherwise derivePCDIRfrom that result and runfor pc in "$PCDIR"/*.pc; do pkg-config --exists "$(basename "$pc" .pc)" && echo "$pc"; done→librariesarray. IfPCDIRis not a directory or no module resolves throughpkg-config --exists, surface that gap and route todoca-setup.PCDIRis commonly/opt/mellanox/doca/lib/<arch>-linux-gnu/pkgconfigon DOCA 3.3+, or/opt/mellanox/doca/infrastructure/lib/pkgconfigon legacy / split-profile installs. ls /opt/mellanox/doca/samples/→sample_pathsarraylsmod | grep -E '^mlx5_(core|ib)'anduname -r→driversobjectcat /proc/meminfo | grep -i Huge→hugepagesobjectdmidecode -s system-product-name(orcat /proc/device-tree/modelon BlueField) →host_kindmlxconfig -d <pcie> q INTERNAL_CPU_MODEL→bf_mode(whenhost_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
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
