write-dag

Composes custom Kubernetes Airflow DAGs from shared PAIDF Orchestration task groups.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

When a user needs a custom PAIDF Orchestration pipeline — a specific ordered combination of stages like augmentation-only, auto-labeling-only, or detection+captioning — that no existing DAG in airflow/dags/workflows/ covers, this Skill generates the complete Kubernetes DAG artifacts instead of hand-writing them.

Core Features & Use Cases

  • DAG Composition from Shared Task Groups: Builds a new K8s-only Airflow DAG from existing task groups (CosmosTaskGroup, DetectionAndTrackingTaskGroup, CaptioningTaskGroup, VisualQATaskGroup, and more), producing a K8s manifest, DAG builder Python file, pydantic payload model, and workflow-local callables.
  • Existing-DAG Coverage Check: Verifies whether the requested pipeline is just a payload variation of an existing DAG before writing anything, avoiding redundant DAGs.
  • Spec Parity Validation: Diffs generated manifests against external spec documents (e.g. a PAIDF launchable.md) for model names, serving flags, and endpoint adapters.
  • Full Lifecycle Ownership: Runs readiness checks, deploys via make sync-dag (with explicit confirmation), triggers runs, and monitors to completion.
  • Use Case: A user asks for a Kubernetes DAG that runs only the IAA Cosmos image-edit stage with no auto-labeling; the Skill trims the IAA base manifest, writes the DAG and callables, computes the GPU footprint, and walks through deployment.

Quick Start

Ask your agent to create a new Kubernetes DAG that runs only the augmentation stage on your input dataset with no auto-labeling afterward.

Frequently Asked Questions about write-dag

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

FAQPage Schema
How do I create a custom Airflow DAG for a PAIDF Orchestration pipeline?

Describe the ordered pipeline stages you need, and the Skill maps them to shared task groups, then generates the K8s manifest, DAG builder, payload model, and callables under airflow/dags/workflows/<dag_name>_dag/. It first checks that no existing DAG already covers your stage sequence.

When should I write a new DAG instead of reusing an existing one?

Only a structural difference — a task group added, removed, or reordered relative to an existing DAG's chain — justifies a new DAG. Different input paths, output directories, service URLs, or model overrides are payload differences already handled by the existing DAG's payload schema.

Does this Skill support NVCF or OSMO backends?

No. The repository's current branches check in Kubernetes manifests only, so the Skill generates K8s DAGs exclusively. NVCF or OSMO would be treated as new scope requiring separate investigation, and only if the user confirms their environment supports it.

How is the GPU footprint of a generated DAG calculated?

The Skill resolves each manifest task's deployment profile: k8s_gpu_task-profiled pods claim 1 GPU each regardless of service mode, while internally deployed endpoints add 1 GPU per replica (2 for image2video). Both external-mode and internal-mode totals are reported in the summary.

Why does the Skill ask for confirmation before deploying the DAG?

Running make sync-dag uploads DAG files and configs to S3 and deploys them to a shared Airflow cluster, which is a state-changing action on shared infrastructure. Invoking the Skill authorizes file generation only, so explicit confirmation is required before deploy and before triggering a run.