npx skills add ...
npx skills add nvidia/skills --skill rtvi-cv-scaffold-vss-service
Scaffold a standalone RTVI CV microservice that plugs into VSS Search and Alerts profiles via Kafka mdx-raw. The shipped scaffold script is a YOLO26 reference implementation (ONNX, labels, custom parser required). Use when building a new perception microservice repo, validating the VSS integration contract, extending that scaffold for segmentation frame-mask payloads, or scaffolding with placeholders before customer YOLO26 assets exist. For swapping the detector in the stock vss-rt-cv container, use rtvi-cv-customize-model instead. Live DeepStream integration cannot run until the customer-supplied ONNX, labels file, and parser library exist.
npx skills add nvidia/skills --skill rtvi-cv-scaffold-vss-service
Scaffolds a deployable custom perception microservice that:
mdx-raw Kafka topic, andbp_developer_search_2d and bp_developer_alerts_2d_cv profile flags so
the downstream Search Workflow, Alert Verification, and Behavior
Analytics services consume it without further changes.The scaffolded output is a runnable repo, not a design document.
This skill name describes the service type (a VSS-bound RTVI CV microservice), not a model family. What is generic vs YOLO26-specific:
| Layer | Scope |
|---|---|
| VSS integration | Generic — compose profiles, host networking, mdx-raw, protobuf-2 payload, tests, smoketest |
| Scaffold script output | YOLO26 reference — pgie-yolo26-config.txt, YOLO26_* mount paths, NvDsInferParseYolo26 |
| Other ONNX detectors | Adapt the scaffold manually, or use rtvi-cv-customize-model to swap the model inside the stock vss-rt-cv perception container |
| Segmentation frame masks | Documented in integration-contract.md; not auto-generated by the scaffold — extend msgconv/wrapper after scaffolding |
Do not treat the scaffold as a model-agnostic generator. Agents should either run the YOLO26 scaffold as-is or consciously edit pgie/compose paths for another detector while keeping the VSS contract fixed.
Use this skill when the user wants to:
Do not use this skill to:
vss-rt-cv container without a new
microservice (use rtvi-cv-customize-model).This skill assumes a target VSS deployment already exists or will be brought up separately.
mdx-raw, msg-conv-payload-type=2, broker reachability, and the protobuf-2 contract fixed unless the user explicitly wants to break VSS compatibility..so, say so plainly: scaffolding and unit tests can proceed with placeholders, but the live DeepStream app cannot run yet. Point them at Ultralytics/Hugging Face for pretrained weights and ONNX export (see references/yolo26-deepstream.md).docker compose up, deepstream-app, or kafka_smoketest.py can succeed without the customer-supplied ONNX, labels matching num-detected-classes, and a parser exposing NvDsInferParseYolo26.KAFKA_BOOTSTRAP to Kafka's host-reachable advertised listener (default: localhost:9092). Compose cannot resolve depends_on across separate invocations..so yet. Can the live VSS integration still run?"This skill ships the scaffold generator, but not the VSS deployment. Clone the
public VSS Blueprint repository separately or reuse an existing checkout, then
set VSS_ROOT to that checkout explicitly. Do not search for or clone VSS
relative to the generated service directory:
Relevant customer-accessible VSS locations include:
deploy/docker/scripts/dev-profile.sh — brings up Search or Alerts using the documented Quickstart flowdeploy/docker/developer-profiles/dev-profile-search/deploy/docker/developer-profiles/dev-profile-alerts/deploy/docker/services/rtvi/rtvi-cv/ — stock RTVI-CV service definitionThe custom service generated by this skill remains in <target-dir> and runs as a separate, host-networked Compose application alongside VSS. Set KAFKA_BOOTSTRAP to Kafka's host-reachable advertised listener (default: localhost:9092). Do not look for generated YOLO26 files inside either the DeepStream or stock VSS checkout.
Read these before generating code so the implementation matches the documented VSS data path rather than a generic Kafka producer:
https://docs.nvidia.com/vss/latest/object-detection-tracking.htmlhttps://docs.nvidia.com/vss/latest/behavior-analytics.htmlhttps://docs.nvidia.com/vss/latest/agent-workflow-search.htmlGst-nvmsgconv — https://docs.nvidia.com/metropolis/deepstream/9.1/text/DS_plugin_gst-nvmsgconv.htmlGst-nvmsgbroker — https://docs.nvidia.com/metropolis/deepstream/9.1/text/DS_plugin_gst-nvmsgbroker.htmlAsk the user for these. Use placeholders if not provided — do not block.
service-name (slug; becomes container name and python package)yolo26-onnx-path (host path to the YOLO26 ONNX export — not .pt)yolo26-labels-path (host path to a one-class-per-line labels file)yolo26-parser-lib (host path to the YOLO26 custom-parser .so, or the
parser function name if compiled into the customer image)num-classes (integer; must match the labels file)target-vss-profiles — any subset of:
bp_developer_search_2d (Search Profile)bp_developer_alerts_2d_cv (Alerts Profile + Behavior Analytics consumer)kafka-bootstrap (Kafka's host-reachable advertised listener; default localhost:9092)kafka-topic (default mdx-raw — VSS consumers expect this name)input-rtsp-uri or input video file pathRead references/integration-contract.md. The fixed parts of the contract (topic name, payload type, schema library) are not negotiable if the goal is to plug into an existing VSS deployment. For segmentation/frame-mask services, follow the segmentation payload contract in that reference before changing msgconv or wrapper code.
Scaffold the YOLO26 reference service (do not generalize pgie paths unless the user explicitly needs another detector):
Drop the customer's YOLO26 ONNX, labels file, and custom-parser library
into the paths the generated service_config.json references.
If those artifacts do not exist yet, stop after scaffolding and host-only
unit tests; the live DeepStream service cannot start correctly without
them.
Build the image:
From the separate VSS checkout, bring up the matching Search or Alerts
profile using the VSS Quickstart and deploy/docker/scripts/dev-profile.sh.
Confirm that VSS and its one-shot Kafka topic initializer are ready, then
start the generated service as a separate Compose application:
For Search or Alerts, find the matching one-shot initializer without assuming a Compose project or container name:
Identify the selected deployment's initializer and confirm it is
Exited (0), then start the generated service with the matching gate:
Do not add a cross-file depends_on entry. The generated service uses
network_mode: host. Set KAFKA_BOOTSTRAP to Kafka's host-reachable
advertised listener (default: localhost:9092). The readiness check
enforces startup order.
Verify the metadata flow:
The smoke test auto-detects Kafka only when exactly one matching container
is running. If multiple deployments are active, pass the selected running
name with --kafka-container. Its --bootstrap-server is resolved inside
that Kafka container and normally remains localhost:9092, even when the
detector's host-facing KAFKA_BOOTSTRAP uses a different port.
A successful consume confirms at least one non-empty message arrived on
mdx-raw within the timeout. It does not decode the protobuf payload or
validate sensorId, objects, or bbox fields.
Confirm downstream pickup:
mdx-incidents for behavior-analytics
output; the alert-bridge service should generate VLM-verified
incidents.mdx-raw and emits behavior windows to mdx-incidents.The scaffolder emits this layout:
The customer can change almost everything except these — they're what the VSS stack consumes:
mdx-raw, using the host-reachable advertised listener selected by KAFKA_BOOTSTRAP (default: localhost:9092).msg-conv-payload-type=2 (NVDS_PAYLOAD_DEEPSTREAM_PROTOBUF) with msg-conv-msg2p-new-api=1 so the generated deepstream-app serializes frame/object metadata directly: protobuf serialized by
msg-conv-msg2p-lib (libnvds_msgconv_mega2d.so, or libnvds_msgconv.so
on DGX-SPARK/THOR); libnvds_kafka_proto.so is the msg-broker-proto-lib
Kafka transport adapter only.Frame payload with sensorId, timestamp, and objects[]
carrying id, bbox, type, confidence. This is what
vss-search-analytics-*, vss-behavior-analytics-*, and
vss-video-analytics-api-* deserialize.network_mode: host.kafka-topic-init-container
completed successfully before this separate Compose application starts.If any of these change, the customer is no longer plugging into VSS — they are running an isolated CV service.
Run unit tests on any host (no GPU required):
Run end-to-end on a host with GPU + a deployed VSS stack:
A successful smoke test confirms non-empty bytes arrived on mdx-raw within the timeout. It does not decode the protobuf payload or prove the message came from this service specifically. To verify downstream pickup, check the Search / Alerts / Behavior Analytics services via their own APIs.
Do not present local unit-test success as proof that live VSS integration is ready. Without the customer ONNX, labels file, and parser library, the live DeepStream path remains blocked even if scaffolding and unit tests succeed.
mdx-raw is the single perception ingress.
Per-service prefixes break the existing VSS consumers.msg-conv-payload-type=0 or =1. VSS deserializers
expect type 2.nvmsgconv → nvmsgbroker boundary is what produces correctly-framed
protobuf with timestamps in nanoseconds. A Python producer drift will
silently degrade Behavior Analytics.track_id stable across frames. Behavior Analytics derives dwell
and direction from track continuity; a per-frame regenerated id makes
every frame look like a new object.