Generated banner for Pva Opgen
Generated logo for Pva Opgen

Pva Opgen

NVIDIAOfficialCreated by Venkat BalanDistributed by NVIDIA

  • Skill
  • Workflow
  • Software development
  • Apache-2.0
  • Medium risk
  • Has scripts

From the author

Generate, change, or repair a complete vectorized NVIDIA PVA operator from a validated pva-spec handoff. Deliver the contract's API, host and VPU code, independent CPU reference, sample, build integration, tests, and documentation. Verify with pva-build-test and use pva-debug within the configured attempt limit.
— the description by Venkat Balan

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

pva-opgen is a workflow skill designed to implement NVIDIA Programmable Vision Accelerator (PVA) operators. It takes a validated specification handoff and generates the necessary components, including public APIs, host code, VPU code, independent CPU references, build integration, tests, and documentation. The skill incorporates an automated verification and repair loop, utilizing pva-build-test for validation and pva-debug for iterative fixes within a defined attempt limit.

What it does

  • Validates input specifications and project requirements.
  • Generates host and VPU code, APIs, and CPU reference implementations.
  • Integrates build configurations, samples, and test suites.
  • Executes automated verification using pva-build-test.
  • Performs iterative repairs on failed implementations using pva-debug.
  • Produces a final report detailing the implementation status and deliverables.

When to use it

  • When you need to implement a new PVA operator from an approved specification.
  • When modifying or repairing an existing PVA operator implementation.
  • When you have a validated pva-spec handoff and require a complete set of project deliverables.
  • When you need to verify operator correctness against a specified test matrix.

Advantages

  • Ensures consistency by following strict specification contracts.
  • Automates the repetitive aspects of operator implementation and build wiring.
  • Provides a structured repair loop to address verification failures.
  • Maintains traceability through recorded evidence and validation reports.

Usage examples

“Generate the PVA operator implementation based on the validated handoff in my current work directory.”
The agent validates the input, generates the required host/VPU code and tests, runs the build-test suite, and provides a final opgen-report.md.
“Repair the failed PVA operator implementation using the available debug budget.”
The agent invokes pva-debug to address the identified failures, then re-runs pva-build-test to verify the fix.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/nvidia/pva-opgen/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip pva-opgen.zip -d .agents/skills

Documentation by Venkat Balan

<!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -->

Generate a PVA operator

Implement the approved Spec contract. Do not redefine it.

Resolve paths

SKILL_ROOT is the absolute directory containing this skill's SKILL.md, after resolving symlinks. Bundled files are relative to that directory. Resolve supplied relative paths against the invocation directory before changing directories. Set OPGEN_INPUTS to the absolute handoff path and WORK_DIR to the caller's report work directory. For a handoff at <work-directory>/configure/opgen-inputs.json, default WORK_DIR to that <work-directory>; otherwise require an explicit report work directory. Use only the validated handoff's workspace as the project root.

Inputs

Before changing source, require installed pva-build-test and, when PVA_OPERATOR_MAX_DEBUG_ATTEMPTS is greater than zero, pva-debug. Resolve them by name through the agent's skill discovery; their directories need not be adjacent. Return BLOCKED if a required skill is unavailable.

Run these skills using the agent's available skill mechanism. If no callable skill tool exists, load the named skill's SKILL.md and execute its complete workflow as the Build-Test or Debug phase. Save that phase's reports, then resume OpGen with its verdict. Reading instructions alone does not execute a phase.

Require:

  • Spec's opgen-inputs.json.

  • The recorded operator specification, test matrix, and evidence manifest.

  • A Doctor report that is ready for opgen, or accepted limitations.

  • Direct-Tegra inputs that Build-Test needs.

  • A writable report directory.

ScriptCommandInputsOutputsExit codes
finalize_opgen_inputs.pypython3 "$SKILL_ROOT/scripts/finalize_opgen_inputs.py" --check "$OPGEN_INPUTS"Spec handoff and its recorded inputs.JSON validation summary; read-only check.0: valid; 1: failed; 2: invalid command arguments.

Run this command before you inspect or change the workspace:

python3 "$SKILL_ROOT/scripts/finalize_opgen_inputs.py" \
  --check "$OPGEN_INPUTS"

Return BLOCKED if the command reports an invalid structure, unknown requirement link, unsafe path, missing evidence, changed input, stale hash or size, or mismatched count. Do not repair Spec-owned files or handoff metadata.

Use the project workspace recorded in the validated handoff.

Verify the recorded hashes before reading project evidence files. Use API, CPU-reference, test, workload, KPI, benchmark, and build files only as contracts. Do not copy CPU-reference or test code into the implementation.

Read the technical basis

Use the Doctor report recorded in the validated handoff. Require its public-reference-corpus check to be PASS. Set SDK_REFERENCES to that report's absolute sdk_reference_root. Require a readable index.md and reference-lock.json, a lock SHA-256 matching the report's sdk_reference_lock_sha256, and the reported SDK version matching this task. If these fields are absent or no longer match, return BLOCKED for a fresh Doctor report and regenerated Spec handoff. Do not edit a finalized report or fall back to an installed package or CWD path. Read the pva-opgen route in $SDK_REFERENCES/index.md. Before reading Markdown, check its SHA-256 against the lock outputs entry; return BLOCKED on a mismatch. Resolve links relative to each generated file.

Use rg to select only the programming, data-movement, build, tutorial, and API Markdown that applies. Read the relevant Orin GEN2 or Thor GEN3 guide chapters for the core, VMEM, address generation, vector operations, and programming examples.

Before use of an intrinsic or mnemonic, find its exact type and operation in the generated guide pages. Record the SDK documentation root, local Markdown path, packaged source path, source SHA-256, guide revision, generation, and section or PDF page.

Use supplied or public implementations within the user's authorized scope and their license terms.

Inspect the project

Record:

  • Public API and ownership conventions.

  • Host and device target patterns.

  • Registration, sample, test, and documentation patterns.

  • Installed SDK version and PVA generation.

  • Files that OpGen will add or change.

Do not require Git metadata or a fixed repository layout.

Design the implementation

Use the behavior and test contracts from Spec.

  1. Select an algorithm that gives the specified result.

  2. Separate parallel work from reductions and dependencies.

  3. Select the PVA dataflow and transfer plan.

  4. Select a tile and VMEM layout that fit the target generation.

  5. Define vector-tail, alignment, border, and scratch handling.

  6. Estimate compute and transfer work when the required facts exist.

  7. Record unavailable facts as limitations. Do not invent a Speed-of-Light value.

Use RasterDataFlow for suitable raster tiles. Use another documented dataflow only when the access pattern needs it.

Create the deliverables

Create or update all items that the Spec contract requires:

DeliverableRequirement
Public APIUse project naming, ownership, validation, and error conventions. Preserve asynchronous behavior.
Host codeCreate resources, load VPU code, configure dataflows, submit work, check status, synchronize as required, and release owned resources.
VPU codeUse documented device APIs and vector intrinsics. Keep the main data path vectorized. Use a correct predicated or scalar tail only where required.
CPU referencePreserve an approved independent reference. For a new operator, create independent scalar logic that implements the contract.
Build wiringAdd host, device, sample, test, and optional performance targets. Add a complete install target or deployment manifest.
SampleShow one valid lifecycle, check the result, and release resources.
TestsImplement the approved Spec test matrix without weakening expected results or tolerances.
DocumentationDocument the API, formats, shapes, parameters, arithmetic, borders, limits, build steps, and sample.

Do not reuse a VMEM buffer before its transfer or compute use is complete. Do not replace a documented vector operation with scalar work in the main data path. Record each necessary scalar region and its reason.

Do not derive an expected result from PVA output.

Verify with Build-Test

Run pva-build-test using the child-skill mechanism defined above.

Pass:

  • Caller identity OpGen, WORK_DIR, and the Debug calls used and maximum.

  • The validated Doctor report and Spec handoff.

  • The active project root.

  • The complete correctness matrix and EMU policy.

  • SKIPPED_OPTIONAL evidence when optional EMU support is unavailable.

  • L4T build, install, target, and direct-SSH inputs.

  • build-test-opgen as the report label.

  • An absolute result directory under $WORK_DIR for each Build-Test call.

Use correctness-only when the matrix has no performance case. Use correctness-and-performance when it has one or more performance cases. Pass performance targets, clock inputs, filters, and sample policy only in the second scope.

Build-Test owns all build, EMU, hardware, profiling, evidence, and verdict rules. Follow its instructions without skipping or weakening checks.

After every Build-Test call, resume OpGen and inspect its returned verdict and report. A child skill's final response does not complete OpGen. Follow the repair rules below, then write the final OpGen report before ending the run.

Repair a failed implementation

Start with zero Debug calls used and read the maximum from PVA_OPERATOR_MAX_DEBUG_ATTEMPTS. Check the budget before every Debug call; 0 means no automatic repair. The next attempt number is calls used plus one. Count each execution of the Debug workflow as one Debug call, regardless of the invocation mechanism, including one that returns without a repair.

If Build-Test returns FAILED and an attempt remains, run pva-debug using the same child-skill mechanism with the complete failure report, failing source identity, command, logs, case, expected result, tolerance, next attempt number, and maximum attempts. Pass the same WORK_DIR for Debug reports.

After Debug returns, resume OpGen. For each REPAIRED result, invoke Build-Test again on the changed source using a new result directory and the complete original matrix. Choose the next action from the returned result:

ResultOpGen action
Build-Test PASSEDWrite the final PASSED report.
Build-Test FAILED, calls used below maximumInvoke Debug, then resume OpGen.
Build-Test FAILED, zero or exhausted budgetWrite the final FAILED report with the failed stage, reason, evidence, and calls used. Do not attempt a repair.
Build-Test or Debug BLOCKEDWrite the final BLOCKED report with the exact unavailable prerequisite.
Debug NOT_REPRODUCEDWrite the final FAILED report, retaining the original failure and Debug's reproduction result.

Record one attempt entry per Debug invocation, with its result and source identity. Do not reset or discount calls used when a failure remains unchanged.

Do not invoke Debug for an external BLOCKED result. Do not invoke Doctor or Spec.

Output Format

Write $WORK_DIR/reports/opgen-report.md with the result template. Write it for every terminal outcome, including zero or exhausted debug budget, before returning the final response. Report zero calls explicitly when Debug was not invoked. If the report directory is unavailable, identify the exact path and write error in the final response.

Return one verdict:

  • PASSED: All deliverables exist, and Build-Test passed the current source.

  • FAILED: An executed implementation or verification stage produced a negative result that the bounded repair loop did not repair.

  • BLOCKED: A required input, dependency, permission, corpus, or target is unavailable.

Report the changed files, API, supported matrix, vectorization, dataflow, VMEM plan, build targets, deployment method, Build-Test result, Debug attempts, evidence paths, hashes, and limitations.

Do not claim hardware verification from EMU execution. Stop after the OpGen result.

Files

README.md

<!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -->

PVA development skills

Agent skills for creating, changing, or repairing NVIDIA PVA operators in your PVA SDK application or PVA Solutions source tree. They turn requirements into code, verify it on Tegra hardware, and repair failures within a debug budget.

Skills

SkillPurpose
DoctorCheck the SDK, toolchain, project, target, and SDK references.
SetupInstall missing SDK, NVVPU, and L4T runtime components, then rerun Doctor.
SpecDefine operator behavior, correctness tests, and the OpGen handoff.
OpGenGenerate and integrate the operator, then invoke Build-Test and Debug.
Build-TestBuild, verify correctness on hardware, and measure requested performance cases.
DebugDiagnose and repair a reproduced failure.

Prerequisites

  • An authenticated coding agent with local skill support and shell/file access. See agent support below.

  • A development host running regular x86-64 Ubuntu supported by the requested SDK.

  • An Arm64 Jetson board running compatible Jetson Linux (L4T), with working key-based SSH and a trusted host key.

  • A matching SDK installation guide (file or URL), access to its installer, and administrative permissions for required installation steps.

  • A writable project: your PVA SDK application or a PVA Solutions source package or checkout. This is where OpGen adds or changes code. Install Git LFS if the project uses it.

When PVA Solutions is selected, Setup uses NVIDIA/PVA-Solutions by default and clones into the supplied project path, or $WORK_DIR/source when omitted. It reuses an existing source tree and accepts another repository or archive. Doctor checks the selected source and reports missing required files.

Run the agent and build tools on the development host. PVA_BUILD_MODE=L4T cross-compiles there for execution on the board. PVA_BUILD_MODE=EMU builds for emulation on the development host.

Setup installs or reuses the SDK, NVVPU, required build and reference tools, and board runtime. EMU is optional. Setup calls Doctor before making changes and again afterward; no existing Doctor report is required. Setup reads the installer URL from the guide. Supply a separate installer path or URL only when the guide does not provide one. The guide and installer must match the requested SDK release. Setup reads the board's installed BSP and checks SDK compatibility. Supply an expected BSP release only when you want to require a specific release.

Set up a workspace

Copy all six PVA skill folders from the public NVIDIA skills catalog into $HOME/pva-sdk-skills. Keep each folder's scripts, references, and assets. The resulting layout is $HOME/pva-sdk-skills/pva-setup/SKILL.md, and the same layout for the other five skills.

git clone --depth 1 https://github.com/NVIDIA/skills.git "$HOME/nvidia-skills"
mkdir -p "$HOME/pva-sdk-skills"
for pva_skill in pva-setup pva-doctor pva-spec pva-opgen pva-build-test pva-debug; do
  cp -R "$HOME/nvidia-skills/skills/$pva_skill" "$HOME/pva-sdk-skills/"
done

Use a separate workspace for each operator task. Replace the project path below with your writable PVA SDK application or PVA Solutions source directory.

mkdir -p "$HOME/operator_test/my_operator"
cd "$HOME/operator_test/my_operator"
ln -s "/absolute/path/to/your/project" source

pva_skill_dir=.claude/skills # For Codex, use .agents/skills
mkdir -p "$pva_skill_dir"
for pva_skill in "$HOME/pva-sdk-skills"/pva-*; do
  ln -s "$pva_skill" "$pva_skill_dir/"
done

Reload skills or restart the agent session after creating the links. source/ points to the project OpGen will modify; the surrounding workspace holds your inputs, generated configuration, and reports. Each skill carries its required scripts and templates. Install all six for the full workflow; OpGen invokes Build-Test and Debug by their installed skill names. Generated SDK references belong in references/sdk/ in this workspace. Doctor records their verified absolute location in its report.

Agent support

  • Claude Code: Used for the recorded operator runs and the commands below.

  • Codex: Supports local skills in .agents/skills, invoked with $pva-spec or another skill name. These skills include agents/openai.yaml metadata. OpGen uses the agent's available skill mechanism for Build-Test and Debug. Without a callable skill tool, it loads the child skill's SKILL.md and executes its full workflow before resuming OpGen with the reports and verdict.

Run Setup → Doctor → Spec → OpGen

Create requirements.md in the workspace: operator name/path, task mode (new, change, or repair), required behavior, supported inputs, API, and performance requirements. For an existing operator, include relevant source and test paths.

Run these headless Claude Code commands one at a time from the development host's workspace. Replace the guide and board settings below. Setup resolves the SDK release, installer, package names, and installation paths from the guide and package metadata. Package paths are not fixed in the skill. You can provide an explicit SDK release or path override when needed.

export PVA_OPERATOR_MAX_DEBUG_ATTEMPTS=3

# 1. Setup: check and prepare the host and board
claude -p "Run pva-setup for spec, opgen, and build-test.
Installation guide: http://docs.nvidia.com/pva/sdk/installation.html.
Target: user@<board-IP>; PVA generation: <generation for your board>.
Project: $PWD/source; work directory: $PWD."

# 2. Doctor: verify readiness after Setup
claude -p "Run pva-doctor for spec, opgen, and build-test using
$PWD/reports/pva-setup-report.md.
Project: $PWD/source; work directory: $PWD."

# 3. Spec: run after Doctor is ready
# Spec runs its finalizer to create and validate configure/opgen-inputs.json.
claude -p "Invoke pva-spec through the Skill tool using
$PWD/requirements.md and $PWD/reports/doctor-report.md.
Project: $PWD/source; work directory: $PWD."

# 4. OpGen: run after Spec returns CONFIGURED
claude -p "Invoke pva-opgen through the Skill tool using $PWD/configure/opgen-inputs.json."

Doctor writes $WORK_DIR/reports/doctor-report.md automatically. The examples use $PWD as the work directory so Spec and OpGen can use the resulting files.

OpGen runs Build-Test and invokes Debug as needed. Read the final result in reports/opgen-report.md.

See reference maintenance for SDK-reference regeneration and upgrades.

Maintaining the helpers

Spec owns finalize_opgen_inputs.py. OpGen ships an identical copy so handoff validation works when the skills are installed separately. After changing the Spec helper, update the OpGen copy too. Generated SDK references and operator reports belong in the operator workspace.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Python

Security

What our scanner noticed· Medium risk

  • Large base64-encoded blobs
  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Venkat Balan
Publisher
NVIDIA (Official)
Distributed by
NVIDIA
Source
NVIDIA/skills · skills/pva-opgen · commit fce3cca
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE-APACHE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Venkat Balan or NVIDIA.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download pva-opgen.zip