# physical-ai-defect-image-generation

Prepares automated defect synthesis pipelines for optical quality inspection. Helps construct training sets for electronic boards, metal, and glass using Cosmos vision models.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2000 installs · ★ 3735
- 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/physical-ai-defect-image-generation/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/physical-ai-defect-image-generation

## What it does

The skill automates the configuration of inspection workflows dispatched through OSMO. At its core is Cosmos AnomalyGen, an adaptation of the Cosmos-Predict2-2B architecture trained for electronic boards, glass surfaces, and raw metal. It provides two primary execution paths: initial cold-start batches derived from USD CAD assets in Day 0, and alignment or manual masking of genuine photographs in Day 1.

Each process runs autonomously through prepared YAML blueprints and cookbook configurations. When testing assembly faults, structural shifts rely on IsaacSim geometry adjustments. In contrast, surface flaws like scratches or omitted components are handled by pairing AnomalyGen with Qwen Image-Edit transformations.

Day 0 routines will fail immediately unless an active `image_edit_endpoint` is reachable, hosting the appearance transfer model. In addition, generation volume requires configuring two separate thresholds. The `render_patches` option sets limits on raw scan patches, while `crop_max_emit` controls the count of exported cell crops.

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

### GitHub Copilot

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

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill physical-ai-defect-image-generation -a opencode
```

### 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/physical-ai-defect-image-generation/SKILL.md

## When to use it
- synthesize solder bridges and scratches on circuit boards
- simulate missing components and misaligned parts from CAD models
- register authentic board photography against reference CAD definitions
- produce defect image collections for metal and glass inspection
- execute non-interactive AnomalyGen finetuning jobs via OSMO

## Example prompts
- Draft an OSMO configuration for Day 0 defect synthesis using our PCBA USD scene
- Set up a Day 1 alignment job to register raw circuit board photos
- Create an OSMO workflow to fine-tune AnomalyGen on metal surface anomalies

## Similar
- [ai-image-generation](https://affpapa.org/en/nevibecode/skills/ai-image-generation.md) — skill · 870900 installs
- [image-generation](https://affpapa.org/en/nevibecode/skills/image-generation.md) — skill · 5600 installs
- [qwencloud-image-generation](https://affpapa.org/en/nevibecode/skills/qwencloud-image-generation.md) — skill · 1600 installs
- [stable-diffusion-image-generation](https://affpapa.org/en/nevibecode/skills/stable-diffusion-image-generation.md) — skill · 1000 installs
- [generate-synthetic-data](https://affpapa.org/en/nevibecode/skills/generate-synthetic-data.md) — skill · 984 installs
- [kibana-anomaly-detection](https://affpapa.org/en/nevibecode/skills/kibana-anomaly-detection.md) — skill · 3100 installs

From the same set: [nvidia/skills](https://affpapa.org/en/nevibecode/by/nvidia/skills.md) — 194 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
