doca-structured-tools-contract

Defines detection, preference, and fallback contracts for DOCA structured helper tools.

3.2k|370|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/NVIDIA/skills --skill doca-structured-tools-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doca-structured-tools-contract
Source: https://github.com/NVIDIA/skills/tree/main/skills/doca-structured-tools-contract
Command: npx skills add https://github.com/NVIDIA/skills --skill doca-structured-tools-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Agents answering DOCA environment, version, device, capability, and validation questions often run many manual commands inconsistently across hosts. This Skill defines a shared contract so agents detect structured helper tools first, prefer their JSON output when present, fall back to documented manual command chains when absent, and always report which path was taken.

Core Features & Use Cases

  • Detect-Prefer-Fallback-Report loop: A four-step agent behavior contract with read-only probe commands (e.g., command -v doca-env) that decide between structured JSON output and manual command chains.
  • Locked JSON schemas: Authoritative schemas for doca-env --json, version-matrix.json, capability-snapshot, validate-before-commit, and host/DPU state collection, each with an ordered manual fallback chain.
  • Use Case: A user asks "is there one command that tells me everything about my DOCA install?" The agent probes for doca-env, uses its JSON if valid, otherwise walks the pkg-config, doca_caps, lsmod, and meminfo fallback chain, and reports which path it took.

Quick Start

Ask your agent whether a single command can show the full DOCA environment including version, devices, libraries, drivers, and hugepages on this host.

Frequently Asked Questions about doca-structured-tools-contract

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get a one-shot answer about my DOCA install?

Ask for a consolidated view of version, devices, libraries, sample paths, drivers, and hugepages. The agent probes for the doca-env structured tool first, uses its JSON if valid, and otherwise walks the documented manual fallback chain of pkg-config, doca_caps, lsmod, and meminfo commands.

How do I validate a DOCA Flow pipe spec before committing it?

Use the validate-before-commit schema: probe for doca-validate, and if absent use the library's documented validation surface. The contract explicitly forbids inventing a doca_flow_pipe_validate symbol or using doca_flow_pipe_create as a read-only probe.

Does this skill require a DOCA installation to use?

Reading the skill requires no DOCA install since it is a contract overlay loaded alongside other DOCA skills. However, running the probes and manual fallback commands requires shell access to a host with a live DOCA install at /opt/mellanox/doca.

What happens when the structured helper tool is not installed?

The agent falls back to the manual command chain documented in the same schema section and reports the probe failure reason. It never silently elevates privileges and surfaces missing commands as gaps routed to the doca-setup skill.

When should this skill not be used?

Do not use it for general DOCA orientation, library API how-to questions, or install-from-scratch guidance. Those requests route to the per-library skill, doca-public-knowledge-map, or doca-setup instead.