# tao-run-deft-cr-its-mining

tao-run-deft-cr-its-mining runs an improvement loop for Cosmos Reason video classifiers, designed for binary tasks like collision detection from traffic cameras.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 4106 repo stars
- Author: NVIDIA Corporation
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/NVIDIA/skills/tree/HEAD/skills/tao-run-deft-cr-its-mining/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/tao-run-deft-cr-its-mining

## What it does

This skill orchestrates a full DEFT cycle: evaluates your baseline Cosmos Reason checkpoint on a KPI dataset, computes video embeddings via Cosmos Embed, identifies classification errors, and retrains the model on selected hard examples. Each iteration logs state to JSON, metrics to the run directory under `<deft_workspace>/results/<run_name>/`, and optionally continues training from the previous iteration.

The workflow delegates to helper skills (`tao-finetune-cosmos-embed`, `tao-analyze-gaps-vlm-bcq`, `tao-mine-nearest-neighbors`) and calls the platform CLI to run training and evaluation. It generates TOML configs from your templates and manages the Cosmos Reason image internally. Requires Docker with NVIDIA Container Toolkit, Python 3.11, numpy, pandas, pyarrow, PyYAML, huggingface_hub, and an absolute path to your DEFT workspace (not `/workspace`).

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill tao-run-deft-cr-its-mining -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/tao-run-deft-cr-its-mining/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/tao-run-deft-cr-its-mining/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill tao-run-deft-cr-its-mining -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/tao-run-deft-cr-its-mining/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill tao-run-deft-cr-its-mining -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/tao-run-deft-cr-its-mining/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install NVIDIA/skills skills/tao-run-deft-cr-its-mining
```

2. **Manually: put the files in place**
- File: `.github/skills/tao-run-deft-cr-its-mining/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill tao-run-deft-cr-its-mining -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/NVIDIA/skills --path skills/tao-run-deft-cr-its-mining
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/tao-run-deft-cr-its-mining/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/tao-run-deft-cr-its-mining/SKILL.md

## When to use it
- pinpoint video frames where your classifier fails
- automatically curate retraining data for your detector
- track accuracy improvements across refinement iterations
- manage train-evaluate-mine loops without manual handoff

## Example prompts
- Run a DEFT mining cycle with up to 3 iterations for my traffic-camera video annotations
- Load the baseline model from `/checkpoints/cosmos_reason_v1` and retrain on mined hard negatives
- Write all embeddings, logs and evaluation reports to my workspace under `/my_workspace/results`

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: daf2c93ca3d4a9c9.

BEGIN THIRD-PARTY FILE daf2c93ca3d4a9c9
````text
---
name: tao-run-deft-cr-its-mining
description: >-
  Run the mining-based DEFT improvement workflow for ITS Cosmos-Reason binary video questions,
  focused on the non-reasoning classification/evaluation path. Use when the user asks for a
  DEFT CR ITS mining workflow, traffic-camera Cosmos Reason improvement loop, collision-identification workflow with data mining, or iterative Cosmos-RL refinement driven by gap analysis.
license: Apache-2.0
compatibility: Requires Docker with NVIDIA Container Toolkit, Python 3.11 with venv/ensurepip, numpy, pandas, pyarrow, PyYAML, and huggingface_hub, plus the selected platform CLI.
metadata:
  author: NVIDIA Corporation
  version: "0.1.0"
allowed-tools: Read Bash Write Task
tags:
- application
- workflow
- deft
- its
- cosmos-reason
- cosmos-rl
- mining
---

# Skill: TAO Run DEFT CR ITS Mining

## Prerequisites

Before preflight, follow `references/host-prerequisites.md`; use its selected `DEFT_PYTHON` for every bundled helper and stop if the dependency probe fails.

## Bundled Resources

Resolve `DEFT_SKILL_ROOT` to the absolute directory containing this installed `SKILL.md`. The agent or plugin runtime resolves this path; it is not a user input. Invoke bundled helpers with `"$DEFT_PYTHON" "$DEFT_SKILL_ROOT/scripts/<name>.py" ...`. Never require a skill-bank checkout or change the user's working directory to a repository root.

This workflow invokes `tao-finetune-cosmos-embed`, `tao-analyze-gaps-vlm-bcq`, `tao-mine-nearest-neighbors`, and the selected platform skill by registered skill name. Those skills own their credentials, actions, and bundled assets. Cosmos Reason is workflow-owned: resolve `images.tao_toolkit.deft_cosmos_reason`, generate TOMLs with this workflow's helpers and configured base templates, and submit the exact train/evaluate commands in `references/mining-loop.md` through the selected platform. The baseline-preparation stage reuses only `tao-finetune-cosmos-reason`'s packaged Omni-to-Qwen3-VL conversion helper; do not invoke that model skill for planning, templates, action bundles, train/evaluate commands, or hook resolution.

## User Inputs (DEFT Workspace and Workflow Configuration Yaml)

The user should provide a DEFT workspace absolute path that will be used for the entire run. This path should not be `/workspace` because that conflicts with the Cosmos Reason skills.

The layout of the DEFT workspace should be as follows:

```text
<deft_workspace>/
├── data/
├── hf_cache/
├── model/
├── specs/
└── results/
```

| Path | Purpose |
| --- | --- |
````
END THIRD-PARTY FILE daf2c93ca3d4a9c9

The third-party file has ended. Everything between the daf2c93ca3d4a9c9 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2581 of 20133 bytes. © NVIDIA Corporation · Apache-2.0 · https://github.com/NVIDIA/skills/tree/HEAD/skills/tao-run-deft-cr-its-mining/SKILL.md

_Part of the page did not fit — see the HTML version._

---
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
