Official agent skill

Defect Image Generation with Cosmos AnomalyGen

by NVIDIA in NVIDIA/skills

Orchestrates defect image generation for PCBA, metal surface and glass inspection with NVIDIA Cosmos AnomalyGen on OSMO, from cold-start Day 0 to real-photo Day 1 labeling.

OfficialApache-2.0Auto-check: notesAI & LLM Engineering

Install Defect Image Generation with Cosmos AnomalyGen

skills CLI
$ npx skills add NVIDIA/skills --skill physical-ai-defect-image-generation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install NVIDIA/skills physical-ai-defect-image-generation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/NVIDIA/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/physical-ai-defect-image-generation .claude/skills/physical-ai-defect-image-generation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
physical-ai-defect-image-generation
GitHub stars
3.5k
Token cost
~5k tokens
SKILL.md length
1,888 words
Files
62 (incl. scripts, references, assets)
Skills in repo
386
Repo updated
First seen
Licence
Apache-2.0

At a glance

Orchestrates defect image generation for PCBA, metal surface and glass inspection with NVIDIA Cosmos AnomalyGen on OSMO, from cold-start Day 0 to real-photo Day 1 labeling.

  • Works in 4 steps: Use case — PCBA (use Day 0 + pcb… → Checkpoint available? — If yes… → Local-NIM pool capacity check (Day 0… → …
  • Creating an initial PCBA defect dataset before real defect photos exist
  • SKILL.md covers Table of Contents, Supported Flows, Disambiguation: handle vague… and Step 0: Select Flow, Cookbook,…, plus 5 more sections
  • Calls jq and kubectl; needs HF_TOKEN

What it does

The skill coordinates defect image generation, augmentation and labeling for automated optical inspection datasets. AnomalyGen here means Cosmos-Predict2-2B finetuned per use case for PCB, metal and glass. Each flow has a canonical OSMO workflow YAML under assets/configs that chains its steps without prompts, and cookbooks hold the use-case configs. Day 0 flows start from a CAD scene in USD: texture defects go through usd2roi, image-edit augmentation, finetune or passthrough and inference with inline labels, while structural defects render pose changes such as shift, tombstone and sideflip.

Day 1 flows run inference and labeling on real photos, with real-photo alignment or manual regions of interest. The skill governs flow selection, data handoffs and submit commands, while component internals stay in each component's own SKILL.md. It also covers first-time asset setup with setup configs for pcb, metal, glass and pretrained checkpoints, finetuning checkpoints, deployment configuration, OSMO monitoring and a disambiguation table for vague requests.

When your agent uses it

  • Creating an initial PCBA defect dataset before real defect photos exist
  • Labeling and generating defects on real inspection images
  • Setting up pretrained checkpoints or fine-tuning AnomalyGen for metal or glass
  • Submitting and monitoring an OSMO defect generation workflow

Example prompts

  • “Start a Day 0 PCBA defect dataset from our CAD scene USD.”
  • “Run the Day 1 flow on our real board photos using manual ROIs.”
  • “Set up the metal surface cookbook and fine-tune AnomalyGen for metal surface anomalies.”
  • “Submit the glass defect workflow to OSMO and monitor it.”

Requirements

  • An OSMO environment for submitting workflows
  • NVIDIA Cosmos AnomalyGen and its pretrained checkpoints
  • A CAD scene in USD format for the Day 0 PCBA flows

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Use case — PCBA (use Day 0 + pcb cookbook), metal surface (Day 1 + metal_surface cookbook), glass (Day 1 + glass cookbook), or custom?
  2. Checkpoint available? — If yes (use_pretrained_checkpoint=true), use /models/ and provide checkpoint_step. If no, finetune from…
  3. Local-NIM pool capacity check (Day 0 Option B only) — before kubectl apply, check Total Capacity via…
  4. Save user preferences to memory — after the first-time gate (and after any submit diverging from a documented default), persist…

What it can do on your machine

Read from SKILL.md and the folder at commit dfdd080. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    Shell commands in SKILL.md call:

    • jq
    • kubectl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use kubectl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • HF_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Defect Image Generation with Cosmos AnomalyGen loads about 5k tokens when it runs, and up to ~42k if it reads all its reference files. Until then it costs about 254 tokens; SKILL.md has 1,888 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~254
When it runs · the whole SKILL.md, loaded when a task matches
~5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~42k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:128
    okens** — once per conversation. **If a `.env` exists in the workspace, source it first** (`set -a; . ./.env; set +a`) s

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from NVIDIA/skills at commit dfdd080, republished under its Apache-2.0 licence (© NVIDIA). 1,888 words, ~4,955 tokens.

Download SKILL.mdSave it as .claude/skills/physical-ai-defect-image-generation/SKILL.md (or your agent's skills folder). This skill also uses 61 other files; get the full folder from GitHub.
name
physical-ai-defect-image-generation
description
Use when the user wants to orchestrate defect image generation with NVIDIA Cosmos AnomalyGen (Cosmos-Predict2-derived) on OSMO for PCBA, metal surface, and glass inspection. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint, cosmos defect generation, cosmos-predict2 defect, cosmos-anomalygen, cosmos predict2 finetune.
version
1.0.1
license
CC-BY-4.0 AND Apache-2.0
tools
Read, Shell
metadata.owner
NVIDIA
metadata.service
physical-ai-data-factory
metadata.version
1.0.1
metadata.reviewed
2026-06-23
metadata.author
NVIDIA
metadata.tags
physical-ai, defect-image-generation, aoi, anomalygen, usd2roi, cosmos, cosmos-predict2, cosmos-anomalygen

Physical AI Defect Image Generation

Table of Contents

End-to-end orchestration of defect image generation, augmentation, and labeling pipelines for AOI (Automated Optical Inspection) datasets. AnomalyGen = Cosmos-Predict2-2B finetuned per use case (Cosmos-AnomalyGen-PCB-2B, -Metal-2B, -Glass-2B). Every flow has a canonical OSMO workflow YAML in assets/configs/ that chains all steps non-interactively. Use-case cookbooks in assets/cookbooks/ provide PCBA usd2roi/image-edit configs and AnomalyGen training configs for PCBA, metal surface, and glass inspection. This skill governs flow selection, data handoffs, and submit commands; component internals live in each component's SKILL.md.

Supported Flows

FlowEntry pointOSMO YAMLStepsUse cases
Day 0 — Texture DefectsCAD scene USD (pcba_target.yaml ships in the cookbook)texture_defect_generation_day0.yamlusd2roi (scan_grid + per-cell ROI crops) → image-edit augmentation (nvidia/Qwen-Image-Edit-NVPCB-OVSL2SL) → finetune-or-passthrough → infer (anomalygen labels inline, including missing-component)PCBA
Day 0 — Good Image (usd2roi + Image-Edit)CAD scene USD + per-board pcba_target.yaml / day0_image.yaml / day0_crop.yamlgood_image_generation.yamlusd2roi-render (scan_grid + per-cell ROI crop) → Qwen Image-Edit (OVSL2SL appearance transfer)PCBA clean-image set (ChangeNet golden halves, finetune positives, real-photo pairing)
Day 0 — Structural DefectsCAD scene USD + per-board pcba_target.yamlstructural_defect_generation.yamlisaac-render (pose defects: shift / tombstone / sideflip) + per-component crop (single pod) → Qwen Image-Edit (OVSL2SL lighting transfer; pose geometry preserved)PCBA pose-defect set; ChangeNet defect halves
Day 1 — Infer + Label (real-photo alignment, DEFAULT)CAD-derived USD + real PCBA photo (both ship in datasets/pcb/assets)texture_defect_generation_day1_real_alignment.yamlusd2roi day-1 render → MI register → per-ROI crop → yq-render config → finetune-or-passthrough → infer (anomalygen labels inline)Default PCBA Day 1. Raw AOI screenshot of any usd2roi-supported board
Day 1 — Infer + Label (manual ROI)Pre-captured clean images + ROI masks (NGC artifact or user upload)texture_defect_generation_day1_manual_roi.yamlyq-render config → finetune-or-passthrough → infer (anomalygen labels inline)Metal surface, glass (no USD/real-photo flow); PCBA only when user explicitly asks for pre-captured ROI experimentation
Finetune OnlyLabeled anomaly URL artifactfinetune.yamlyq-render config → finetune (validate_dataset → prep_testcase → torchrun)Any use case; produces checkpoint for Day 0 or Day 1. Requires raw training data under <dig_url_root>/datasets/<usecase>/raw (see assets/configs/setup/setup_<usecase>.yaml).

All flows run on OSMO. Day 0 flows require image_edit_endpoint (Qwen Image-Edit OVSL2SL — existing URL or local deploy from references/nim/); Finetune Only has no external endpoints.

Pick the right workflow for the user's defect class
Defect classWorkflowMechanism
Clean / good / scan-grid / normal_img + cad_mask pairsgood_image_generation.yamlusd2roi-render + Qwen Image-Edit
Texture defects (solder bridge, scratch, discoloration) AND missing-component (handled natively by AnomalyGen, NOT structural)texture_defect_generation_day0.yamlQwen Image-Edit + AnomalyGen AMP/SDG
Structural / pose defects (tombstone, shift, sideflip)structural_defect_generation.yamlIsaacSim pose perturbation
Day 1 inference + labeling on a real imagetexture_defect_generation_day1_real_alignment.yaml (PCBA default) or texture_defect_generation_day1_manual_roi.yaml (metal/glass; PCBA only when user explicitly asks for pre-captured ROI / skip-alignment)usd2roi day-1 registration (real-alignment) or direct inference (manual-ROI)

ChangeNet golden/defect pairs: submit good_image_generation.yaml + structural_defect_generation.yaml with the same --set name= (two-submission pairing convention).

Day 0 and Day 1 share the same downstream shape: a Jinja-gated finetune-job (omitted when use_pretrained_checkpoint=true) feeding anomaly-infer. Day 0 prepends usd2roi-render + augment-image-edit; Day 1 starts from <dig_url_root>/datasets/<usecase>/raw. Per-stage detail: each flow's walkthrough.

User intent → knob mapping

Every OV flow is two-stage: crop_max_emit=N caps the final per-cell crops (stage 2); render_patches=N caps raw scan-grid patches (stage 1, each yielding multiple crops). DO NOT auto-map "generate N images" → render_patches=N (wrong stage). crop_max_emit does not exist on structural_defect_generation.yaml (one crop per component — use render_patches) or texture_defect_generation_day1_real_alignment.yaml (narrow via the cookbook's crop.classes whitelist). Full knob table, smoke-test recipes, defaults, caveats: references/knob_mapping.md.

Structural-defect sizing (no crop_max_emit knob exists)

Structural output is non-linear in render_patches — doubling frames adds ~1.6–1.7× crops, not 2×. Don't use crop_max_emit (no effect) or render_patches=0 (fails). Validated yield table + target-size formula: references/flows/structural_defect_generation.md §"Sizing the output". For ambiguous "generate N images", surface the calibration table via AskUserQuestion.


Disambiguation: handle vague requests before committing

Underspecified prompts ("generate me some images", "run the PCBA flow", "give me defects") must not be resolved by silently assuming a flow / usecase / knob mapping. When intent is ambiguous, pause and present candidate interpretations via AskUserQuestion (2–4 mutually exclusive options) before submitting. Disambiguate the load-bearing choices: which flow, which use case, what stage a count refers to, finetune vs. passthrough.

Settled defaults you should NOT disambiguate: PCBA Day 1 → real-alignment; board → 0603_H100; image-edit endpoint → local cluster service (references/nim/); use_pretrained_checkpoint=true; Day 1 real-alignment default_spatial_dependency=cad (fall back to free only when CAD masks are unavailable, see references/flows/texture_defect_generation_day1_real_alignment.md).

dig_url_root is the one exception — NO silent default. First-time (no memory entry), MUST elicit via AskUserQuestion before any submit / osmo data upload / preflight_urls.sh. s3://osmo-workflows/dig is a suggestion to confirm, never auto-picked (~80 GB+ lands there). Later runs may reuse the remembered value silently. See Step 0 + memory rules (§4).

Full trigger table, prompt construction, and when-NOT-to-ask exceptions: references/disambiguation.md — load before assembling AskUserQuestion options for any vague request.


Step 0: Select Flow, Cookbook, and Gather Inputs

Before this step, if the request is vague (e.g. "generate me images", "run the PCBA flow", "give me defects"), pause and run the disambiguation cheat sheet above — present candidate interpretations via AskUserQuestion and let the user pick. Don't auto-pick a load-bearing default the user didn't actually choose.

First-time gate

If memory has no entries for this user, ASK the up-front preference questions in ONE AskUserQuestion call BEFORE any preflight / osmo / kubectl / osmo data upload, save to memory (§4), then proceed. Bundle:

  • dig_url_root — MUST be elicited, not auto-picked. Offer s3://osmo-workflows/dig as a confirmable suggestion; else user provides their own OSMO-supported storage prefix. ~80 GB+ lands here. No escape hatch other than memory-recall of a previously confirmed value.
  • Default OSMO --pool — candidates from osmo profile list → pool.accessible.
  • Pod-template confirmation — only when osmo config show POD_TEMPLATE returns 403 (§2 has the exact question).
  • Image-edit endpoint — Day 0 only: Option A (existing URL) vs Option B (deploy local NIM).

Subsequent conversations read these silently from memory. Per-flow choices (use case, checkpoint vs finetune, board, knobs) are asked each time — see below.

Preflight ordering (after the first-time gate)

Run §1 preflight_credentials.sh → §2 preflight_pod_template.sh → §3 preflight_urls.sh <flow> <usecase> → §4 generate the run stamp. Cadence: §1 and §2 are once-per-conversation gates with cross-conversation memory caching (see §4a in references/preconditions.md) — skip when memory records them as already verified / user-confirmed. §3 runs before every submit (varies by flow). §4 is the agent's job — fresh $STAMP per submit.

Pod-template enforcement is two layers: the pre-submit preflight_pod_template.sh gate (§2) plus an in-pod runtime preflight on every OV + training task (fails fast on missing /usr/share/nvidia/nvoptix.bin or /dev/shm < 16 GiB). Runtime failure despite §2 passing → template was patched out → route to physical-ai-infrastructure-setup-and-resilient-scaling. Missing creds / URL artifacts → offer to submit setup/setup_<case>.yaml + setup/setup_pretrained.yaml first.

Then ask the user in one message — per-flow choices only (the first-time gate above already covered dig_url_root, pool, pod-template, and endpoint preferences; pull those from memory):

  1. Use case — PCBA (use Day 0 + pcb cookbook), metal surface (Day 1 + metal_surface cookbook), glass (Day 1 + glass cookbook), or custom?
  2. Checkpoint available? — If yes (use_pretrained_checkpoint=true), use <dig_url_root>/models/<usecase> and provide checkpoint_step. If no, finetune from <dig_url_root>/datasets/<usecase>/raw.
  3. Local-NIM pool capacity check (Day 0 Option B only) — before kubectl apply, check Total Capacity via physical-ai-infrastructure-setup-and-resilient-scaling. Total Capacity < 2 cannot host NIM + DIG concurrently → ask user to add GPUs or switch to Option A. image_edit_model is always nvidia/Qwen-Image-Edit-NVPCB-OVSL2SL, never generic qwen-image-edit.
  4. Save user preferences to memory — after the first-time gate (and after any submit diverging from a documented default), persist load-bearing choices (dig_url_root, OSMO pool, default board, image-edit endpoint, pod-template state, osmo-admin role). Never save image_edit_model (constant — saving invites drift) or ephemeral state (STAMP, one-off anomaly_types_json). Full table: references/preconditions.md §4a "Memory rules". Read relevant memories at the start of every new conversation and apply silently.

Review the relevant flow reference before asking — most values have sensible defaults. Day 1 routing: PCBA defaults to real_alignment; metal/glass have no USD flow so always manual_roi; don't ask the user "manual or real-alignment?" for PCBA unless they explicitly ask to skip alignment.


Show full SKILL.md (601 more words)Show less

Common Preconditions (all flows)

Quick reference. Long-form: references/preconditions.md.

  1. OSMO credentials + tokens — once per conversation. If a .env exists in the workspace, source it first (set -a; . ./.env; set +a) so HF_TOKEN is exported. Run scripts/preflight_credentials.sh; authoritative check is the OSMO cred hf-token is provisioned (images are public on nvcr.io/nvidia/ — no registry cred needed). Pass --no-probe in restricted-egress shells. See references/preconditions.md §1.

  2. Pod template — once per conversation, with cross-conversation memory caching (see Step 0 §6). Skip when memory records the cluster verified / user-confirmed / 409-skipped. Otherwise run scripts/preflight_pod_template.sh and branch on exit code (0=verified / 1=patch via infra skill / 2=ask-user (HTTP 403) / 3=skip (HTTP 409) / 4=env-fix). Full branching prose and prompts in references/preconditions.md §2.

  3. Required URL artifacts — before every submit. Run DIG_URL_ROOT=<dig_url_root> scripts/preflight_urls.sh <flow> <usecase> [variant]. If anything is missing, stop and submit the relevant setup/setup_<case>.yaml + setup/setup_pretrained.yaml first (the OSMO setup workflows) — see references/setup.md. Never download assets locally to work around a problem; if setup fails on credentials, ask the user to rectify them and re-submit on OSMO. Per-flow checklist:

    FlowUse caseRequired URL artifacts under <dig_url_root>
    Day 0 — Texture DefectsPCBAmodels/pretrained, models/pcb, datasets/pcb/raw, datasets/pcb/assets
    Day 0 — Good ImagePCBAdatasets/pcb/assets only
    Day 0 — Structural DefectsPCBAdatasets/pcb/assets only
    Day 1Metal surfacemodels/pretrained, models/metal_surface, datasets/metal_surface/raw
    Day 1Glassmodels/pretrained, models/glass, datasets/glass/raw
    Day 1 real-photo alignmentPCBADay 1 PCBA plus datasets/pcb/assets
    Finetune OnlyAnymodels/pretrained, datasets/<usecase>/raw

    Built-in usecase values are pcb, metal_surface, glass. See references/preconditions.md §3.

  4. Name stamping — regenerate $STAMP=$(cat /proc/sys/kernel/random/uuid | cut -c1-8) before every submit and pass --set name=<flow>-$STAMP. Production YAMLs ship no name default. See references/preconditions.md §4.

  5. Glass case (UC3) — Roboflow zip — only for setup_glass.yaml. Upload mobile_screen.zip to an OSMO URL prefix first; pass --set uc3_zip_url_root=<prefix>. Full procedure: references/setup.md §"Glass case (UC3)".


Flow walkthroughs

Each flow's full walkthrough — group diagrams, prerequisites, submit-command variants, data handoffs, per-stage troubleshooting — lives under references/flows/. The agent should read the matching file before submitting any flow it hasn't run in the current conversation.

FlowWorkflow YAMLWalkthrough
Day 0 — Texture Defects (PCBA)assets/configs/texture_defect_generation_day0.yamlreferences/flows/texture_defect_generation_day0.md
Day 0 — Good Image (PCBA)assets/configs/good_image_generation.yamlreferences/flows/good_image_generation.md
Day 0 — Structural Defects (PCBA)assets/configs/structural_defect_generation.yamlreferences/flows/structural_defect_generation.md
Day 1 — Infer + Label (real-photo alignment, default PCBA)assets/configs/texture_defect_generation_day1_real_alignment.yamlreferences/flows/texture_defect_generation_day1_real_alignment.md
Day 1 — Infer + Label (manual ROI, metal/glass + PCBA experimentation)assets/configs/texture_defect_generation_day1_manual_roi.yamlreferences/flows/texture_defect_generation_day1_manual_roi.md
Finetune Onlyassets/configs/finetune.yamlreferences/flows/finetune.md
Cross-flow invariants
  • use_pretrained_checkpoint=true (default) → passthrough against models/<usecase>. Set to false to insert an in-pod finetune-job group (cookbook yq-patched in-pod, no pre-submit render step).
  • Day 0 emits per-cell crop/<MATERIAL>/<cell>/... trees; Day 1 emits per-ROI crops registered against the USD; structural emits flat per-component crops.
  • Shipped per-usecase checkpoint_step + anomaly_types_json defaults: see references/preconditions.md §"Shipped checkpoint and anomaly_types_json defaults".

OSMO Monitoring

Load references/monitoring.md before any osmo workflow submit, osmo workflow query, or osmo workflow logs action in this skill. It defines the polling cadence, task-status interpretation, log-pull escalation thresholds, failure-classification routing, and what to surface to the user vs. silently retry. Do not assemble a post-submit watch loop or status summary from memory — re-read it on the first such action of every conversation.

bash
osmo workflow query <workflow_id> --format-type json | jq '{status, tasks: [.groups[].tasks[] | {name, status, exit_code}]}'
osmo workflow logs <workflow_id> -t <task_name> -n 200
osmo data download <dig_url_root>/runs/<name>/anomaly ./output/anomaly-<name>/

Monitoring discipline: references/monitoring.md. Retrieval: references/output_retrieval.md. Presentation: references/output_rendering.md. Gotchas: references/troubleshooting.md.


Response Template

For "show me the plan / recipe" requests, emit your final response with these labeled sections (so nothing truncates mid-recipe):

Workflow: <flow name> → assets/configs/<yaml>

Preflights: scripts/preflight_credentials.sh; scripts/preflight_urls.sh <0|1|finetune> <usecase> [variant]

Required URL Artifacts under <dig_url_root>: enumerate per Common Preconditions §3 for the chosen flow.

Submit Command:

bash
STAMP=$(cat /proc/sys/kernel/random/uuid | cut -c1-8)
osmo workflow submit assets/configs/<yaml> --pool <pool> \
  --set name=<flow>-$STAMP dig_url_root=<root> usecase=<usecase> \
        image_edit_endpoint=<endpoint> image_edit_model=nvidia/Qwen-Image-Edit-NVPCB-OVSL2SL \
        checkpoint_step=<step> 'anomaly_types_json=<types>'

Monitoring: load references/monitoring.md before running the submit; apply its polling cadence + log-pull thresholds after osmo workflow submit returns a workflow id.

Output Location: <dig_url_root>/runs/<flow>-$STAMP/anomaly/ (per-flow override: see flow walkthrough).


Supporting files

Full inventory — workflow YAMLs, cookbooks, scripts table, references, evals, component skills — in references/contents.md. Top-level dirs: assets/configs/, assets/cookbooks/, scripts/, references/, evals/.

© NVIDIA, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 61 other files (scripts, references, assets) in skills/physical-ai-defect-image-generation of NVIDIA/skills.

  • SKILL.md
  • BENCHMARK.md
  • assets/configs/finetune.yaml
  • assets/configs/good_image_generation.yaml
  • assets/configs/setup/setup_glass.yaml
  • assets/configs/setup/setup_metal.yaml
  • assets/configs/setup/setup_pcb.yaml
  • assets/configs/setup/setup_pretrained.yaml
  • assets/configs/structural_defect_generation.yaml
  • assets/configs/texture_defect_generation_day0.yaml
  • assets/configs/texture_defect_generation_day1_manual_roi.yaml
  • assets/configs/texture_defect_generation_day1_real_alignment.yaml
  • assets/cookbooks/glass/ag_config.yaml
  • assets/cookbooks/metal_surface/ag_config.yaml
  • assets/cookbooks/pcb
  • … and 47 more

Open the folder on GitHubat commit dfdd080

Compare with similar skills

Defect Image Generation with Cosmos AnomalyGen next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Defect Image Generation with Cosmos AnomalyGen compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Defect Image Generation with Cosmos AnomalyGen this skillNVIDIA/skills3.5k—~5kAutomated safety check: NotesApache-2.0
Mindspeed Mm Vlmascend-ai-coding/awesome-ascend-skills174—~5.2kAutomated safety check: PassNone
Debug Renderartokun/comfyui-mcp800—~1.7kAutomated safety check: PassMIT
Qwen Txt2imgartokun/comfyui-mcp800—~3.3kAutomated safety check: PassMIT
Add Pipelineverl-project/verl-omni1.2k—~1kAutomated safety check: PassApache-2.0
Hugging Face Vision Trainerhuggingface/skills11k1 repos~7.5kAutomated safety check: PassApache-2.0

Similar skills

  • Mindspeed Mm Vlm

    ascend-ai-coding/awesome-ascend-skills

    Universal VLM (vision-language understanding model) training guide for Huawei Ascend NPU using MindSpeed-MM.

    174 GitHub stars~5.2k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Debug Render

    artokun/comfyui-mcp

    Debug a WRONG or imperfect render (not a hard error) by inspecting inputs and intermediate steps with run-to-node.

    800 GitHub stars~1.7k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Qwen Txt2img

    artokun/comfyui-mcp

    Build Qwen Image 2512 text-to-image workflows with QwenImageIntegratedKSampler, separate component loading, lightning LoRAs, and fine-tuned model variants

    800 GitHub stars~3.3k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Add Pipeline

    verl-project/verl-omni

    Router for adding a diffusion or omni pipeline to verl-omni.

    1.2k GitHub stars~1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Hugging Face Vision Trainer

    huggingface/skills

    Official

    Trains and fine-tunes object detection, image classification and SAM or SAM2 segmentation models on Hugging Face Jobs cloud GPUs and saves the results to the Hub.

    11k GitHub starsUsed in 1 repo~7.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Yolo Detection 2026

    SharpAI/DeepCamera

    YOLO 2026 — state-of-the-art real-time object detection. An agent skill from SharpAI/DeepCamera.

    3.1k GitHub stars~1.5k tokensUpdated 22 days ago
    AI & LLM EngineeringAuto-check passed

More from NVIDIA/skills

All 386 skills in this repo
  • Official

    A skill your agent uses when the user wants to deploy, run, debug, tear down, or call the REST API of the RTVI-CV 2D detection / tracking microservice.

    3.5k GitHub starsUsed in 1 repo~4.5k tokens
    Auto-check passed
  • Official

    Generates, validates, compares and explains HOLOLINK_def.svh macro files for the HSB IP, using bundled Python scripts and asking before it writes anything.

    3.5k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Official

    Runs and validates an end-to-end Mission Control demo in a locally installed Isaac Sim, with a Nova Carter robot driven through a Python server.

    3.5k GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Orchestrates video data augmentation and auto-labeling workflows on OSMO, from flow selection and preflight checks to submission, monitoring and output download.

    3.5k GitHub stars~4.7k tokensUpdated today
    Auto-check: notes
  • Official

    Runs NVIDIA TAO Data Services KPI analysis on object detection results, comparing predictions to ground truth and writing per-class precision, recall and AP to a CSV.

    3.5k GitHub stars~2.7k tokensUpdated today
    Auto-check: notes
  • Official

    Runs TAO Data Services gap analysis that compares ground-truth and predicted boxes to find weak images by per-class recall, precision and AP50.

    3.5k GitHub stars~1.8k tokensUpdated today
    Auto-check: notes

Questions about Defect Image Generation with Cosmos AnomalyGen

What does Defect Image Generation with Cosmos AnomalyGen do?

Orchestrates defect image generation for PCBA, metal surface and glass inspection with NVIDIA Cosmos AnomalyGen on OSMO, from cold-start Day 0 to real-photo Day 1 labeling. The skill coordinates defect image generation, augmentation and labeling for automated optical inspection datasets. AnomalyGen here means Cosmos-Predict2-2B finetuned per use case for PCB, metal and glass.

When should I use Defect Image Generation with Cosmos AnomalyGen?

Defect Image Generation with Cosmos AnomalyGen fits situations like: creating an initial PCBA defect dataset before real defect photos exist; labeling and generating defects on real inspection images; setting up pretrained checkpoints or fine-tuning AnomalyGen for metal or glass; submitting and monitoring an OSMO defect generation workflow.

How do I install Defect Image Generation with Cosmos AnomalyGen in Claude Code?

Run `npx skills add NVIDIA/skills --skill physical-ai-defect-image-generation -a claude-code`. Or copy the skill folder (skills/physical-ai-defect-image-generation in NVIDIA/skills) into .claude/skills/physical-ai-defect-image-generation in your project. Claude Code loads it when a task matches its description.

How do I install Defect Image Generation with Cosmos AnomalyGen in Codex?

Run `npx skills add NVIDIA/skills --skill physical-ai-defect-image-generation -a codex`. Or copy the skill folder (skills/physical-ai-defect-image-generation in NVIDIA/skills) into .agents/skills/physical-ai-defect-image-generation in your project. Codex loads it when a task matches its description.

Can I use Defect Image Generation with Cosmos AnomalyGen in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add NVIDIA/skills --skill physical-ai-defect-image-generation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/physical-ai-defect-image-generation, .gemini/skills/physical-ai-defect-image-generation, .github/skills/physical-ai-defect-image-generation and .opencode/skills/physical-ai-defect-image-generation in your project.

What does Defect Image Generation with Cosmos AnomalyGen need to run?

Going by SKILL.md and its folder, Defect Image Generation with Cosmos AnomalyGen needs the command-line tools its instructions call (jq and kubectl) and credentials named HF_TOKEN. Our summary lists: An OSMO environment for submitting workflows; NVIDIA Cosmos AnomalyGen and its pretrained checkpoints; A CAD scene in USD format for the Day 0 PCBA flows.

Does Defect Image Generation with Cosmos AnomalyGen access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Defect Image Generation with Cosmos AnomalyGen safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Defect Image Generation with Cosmos AnomalyGen use?

Defect Image Generation with Cosmos AnomalyGen is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Defect Image Generation with Cosmos AnomalyGen use?

About 5k tokens (SKILL.md is roughly 20k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 37k tokens, read only when the agent opens those files.

What are the alternatives to Defect Image Generation with Cosmos AnomalyGen?

Skills that share tags, products or a category with Defect Image Generation with Cosmos AnomalyGen: Mindspeed Mm Vlm (ascend-ai-coding/awesome-ascend-skills, 174 stars), Debug Render (artokun/comfyui-mcp, 800 stars), Qwen Txt2img (artokun/comfyui-mcp, 800 stars) and Add Pipeline (verl-project/verl-omni, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Defect Image Generation with Cosmos AnomalyGen?

NVIDIA (a GitHub organization, an official publisher) maintains it in NVIDIA/skills, which has 3,546 GitHub stars. The repository holds 386 skills in this directory. The repository was last updated on October 9, 2026.

Source: NVIDIA/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.