# cdf-defect-image-generation

cdf-defect-image-generation produces synthetic solder-defect images for board inspection via a DAG in CDF Orchestration. Useful when rare defects need volume without manual annotation.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 4106 repo stars
- Author: NVIDIA
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/NVIDIA/skills/tree/HEAD/skills/cdf-defect-image-generation/SKILL.md
- Updated: 2026-10-23
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/cdf-defect-image-generation

## What it does

This skill drives `defect_image_generation_smt_dag_k8s`. The simulation stage renders components, a sim2real step converts renders into clean golden images, and AnomalyGen applies texture defects: solder bridges, excess solder, missing parts. Pose defects like shift, tombstone and sideflip come straight out of the simulation render.

A script called `scripts/payload.py` runs the payload through the DAG's model and compiler. It reports job counts, output paths and the effective AnomalyGen staging. Nothing gets submitted, and no storage or cluster access happens at this stage.

You need an authorized Kubernetes connection, an Airflow 3 controller with the DIG DAG loaded, plus storage and model access. The payload checker expects a trusted CDF Orchestration checkout that includes `skills/cdf-orchestration-preflight/scripts/storage_check.py`. If that file is missing, the skill treats it as a readiness blocker and will not skip the storage mapping check.

The `pipeline_mode` field selects the stages: `simulation`, `sim2real`, `full` or `defect`. The skill does not run Simulation, Augmentation or AnomalyGen on their own; separate NVIDIA skills cover that.

## Requirements
- Works with: Kubernetes

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill cdf-defect-image-generation -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/cdf-defect-image-generation/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/cdf-defect-image-generation/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill cdf-defect-image-generation -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/cdf-defect-image-generation/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill cdf-defect-image-generation -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/cdf-defect-image-generation/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install NVIDIA/skills skills/cdf-defect-image-generation
```

2. **Manually: put the files in place**
- File: `.github/skills/cdf-defect-image-generation/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill cdf-defect-image-generation -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/NVIDIA/skills --path skills/cdf-defect-image-generation
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/cdf-defect-image-generation/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/NVIDIA/skills/tree/HEAD/skills/cdf-defect-image-generation/SKILL.md

## When to use it
- Generate synthetic solder-defect images for PCB inspection pipelines
- Validate a payload against the DAG model without hitting the cluster
- Run the full path from scene render to defected images
- Match each defect image back to its golden and simulated source
- Check GPU and storage readiness before launching a run

## Example prompts
- Build a payload for `full` mode and check it locally with `scripts/payload.py`
- Create JSON with `pipeline_mode: defect` for a prepared clean-image dataset under `staging.fetch.input`
- Verify GPU readiness on the cluster before starting the DAG

## Similar
- [ai-pipeline-orchestration](https://affpapa.org/en/nevibecode/skills/ai-pipeline-orchestration.md) — skill · 361 installs
- [deploying-airflow](https://affpapa.org/en/nevibecode/skills/deploying-airflow.md) — skill · 847 installs
- [gke-custom-golden-image-discovery](https://affpapa.org/en/nevibecode/skills/gke-custom-golden-image-discovery.md) — skill · 3500 installs
- [gpu-kubernetes-operations](https://affpapa.org/en/nevibecode/skills/gpu-kubernetes-operations.md) — skill · 365 installs
- [deploying-go-sdk-bundles](https://affpapa.org/en/nevibecode/skills/deploying-go-sdk-bundles.md) — skill · 217 installs
- [physical-ai-infrastructure-setup-and-resilient-scaling](https://affpapa.org/en/nevibecode/skills/physical-ai-infrastructure-setup-and-resilient-scaling.md) — skill · ★ 8052 repo stars

From the same set: [nvidia/skills](https://affpapa.org/en/nevibecode/by/nvidia/skills.md) — 312 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
