Skip to main content
skill CX Codex

dicom-series-preflight — Claude Code skill: DICOM series check

Reads DICOM headers in a single series folder and returns JSON with a pass, warn or fail verdict before conversion or inference.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add NVIDIA/skills --skill dicom-series-preflight -a claude-code
Open on GitHub

What dicom-series-preflight does

The skill walks one folder holding a DICOM series and looks at headers only. Pixel data stays untouched. Output is JSON: file inventory, orientation axcodes, PHI flags, findings, and a preflight.verdict field set to pass, warn or fail.

Execution goes through scripts/preflight_series.py with PATH_TO_DICOM_DIR as its argument. When the host agent exposes run_script, call run_script("scripts/preflight_series.py", args=[...]); otherwise use the documented Bash or Python command. Write results into a run directory the caller supplies. Read skill_manifest.yaml before you touch arguments or validation gates.

NiBabel 5.4 or newer is required, since older versions label extreme-oblique axes inconsistently across reorientation. Compressed transfer syntax and multi-frame instances raise warnings instead of being decoded. The scan covers a single directory, so several studies in one tree are not reconciled. The canonical orientation gate expects LPS-derived CT axcodes L, P, S. De-identification, private-tag review and clinical clearance are out of scope.

What it helps with

  • screen a series before conversion so broken data never reaches the pipeline
  • collect file inventory and orientation axcodes in one JSON
  • catch PHI flags in headers before anything leaves the machine
  • reject a series whose orientation does not fit the expected gate
  • keep run evidence alongside the emitted verdict

Example prompts for the agent

  • Run preflight on data/series_01 and show me the verdict
  • Execute scripts/preflight_series.py against fixtures/clean_no_phi and walk me through the JSON
  • Check the headers in runs/incoming and tell me whether any PHI flags show up

How to install dicom-series-preflight

1Skills CLI (Vercel)

npx skills add NVIDIA/skills --skill dicom-series-preflight -a claude-code

2Manually: put the files in place

~/.claude/skills/dicom-series-preflight/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/dicom-series-preflight/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about dicom-series-preflight

How do I install dicom-series-preflight in Claude Code?

Run npx skills add NVIDIA/skills --skill dicom-series-preflight -a claude-code. The skill lands at ~/.claude/skills/dicom-series-preflight/SKILL.md.

What does dicom-series-preflight do?

It reads headers from one DICOM series folder and emits JSON with inventory, orientation axcodes, PHI flags and a pass, warn or fail verdict. Pixel data is never decoded.

What is dicom-series-preflight not meant for?

De-identification, private-tag review and clinical clearance. Compressed transfer syntax and multi-frame instances only get a warning.

Source text

SKILL.md · Apache-2.0
---
name: dicom-series-preflight
description: Used for header-only preflight of one DICOM series folder before conversion or inference. Not for de-identification or clinical clearance.
license: Apache-2.0
allowed-tools: Bash
metadata:
  author: 'NVIDIA MedTech Team'
  tags:
    - MedTech
    - DICOM
    - preflight
---

# DICOM Series Preflight

## Purpose
- Used for header-only preflight of one DICOM series folder before conversion or inference. Not for de-identification or clinical clearance.
- Use the wrapper exactly as documented; do not replace the upstream entrypoint with a handwritten implementation.
- Manifest I/O: inputs are `dicom_dir`; outputs are `preflight_json`.

## Instructions
- Read `skill_manifest.yaml` before changing arguments, side effects, or validation gates.
- Run `scripts/preflight_series.py` through the documented command below; keep outputs under a caller-provided run directory.
- If a host agent exposes `run_script`, use `run_script("scripts/preflight_series.py", args=[...])`; otherwise run the Bash/Python command shown below.
- Check the emitted JSON and paired verifier guidance before treating the run as evidence.

## Available Scripts
| Script | Purpose | Arguments |
|---|---|---|
| `scripts/preflight_series.py` | Primary entrypoint declared by skill_manifest.yaml. | `PATH_TO_DICOM_DIR` |

## Prerequisites
- Runtime requirements: Python packages listed in `runtime.side_effects.pip_packages`.
- NiBabel 5.4 or newer is required so extreme-oblique axes remain labeled consistently across reorientation.
- Run commands from the repository root unless an existing section below says otherwise.

## Limitations
- Header-only; does not decode pixel data or detect burnt-in PHI.
- Canonical orientation gate assumes LPS-derived CT axcodes L,P,S.
- Compressed transfer syntax and multi-frame instances are warned, not decoded.
- Single-directory scan; does not reconcile multiple studies in one tree.
- Not for clinical deployment, regulatory de-identification, autonomous diagnosis, production ingestion without a vetted converter.

## Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| Missing dependency or import error | Runtime package drift from `skill_manifest.yaml`. | Install the packages declared in the manifest or use the documented setup command. |
| Empty or schema-invalid output | Wrong input path, unsupported modality, or upstream failure. | Re-run with a known fixture and inspect the wrapper JSON plus stderr. |
| Validation gate failure | Output violated a declared engineering invariant. | Keep the failed evidence pack and use the gate message to repair inputs or wrapper code. |

Scans a DICOM **directory** (one series per folder) without decoding pixels.
Emits JSON with inventory, orientation axcodes, PHI flags, findings, and a
`preflight.verdict` of `pass`, `warn`, or `fail`.

```bash
python scripts/preflight_series.py PATH_TO_DICOM_DIR
```

Pair with `verifiers/dicom_preflight_quality_v1` for a trusted preflight pack:

```bash
make run-trusted SKILL=dicom_series_preflight \
  FIXTURE=skills/dicom-series-preflight/fixtures/clean_no_phi \
  OUT=runs/dicom_preflight_demo
```

Flagship workflow:

```bash
make run-workflow \
  WORKFLOW=examples/workflows/dicom_preflight_gate.yaml \
  WORKFLOW_INPUT=skills/dicom-series-preflight/fixtures/clean_no_phi \
  WORKFLOW_OUT=runs/dicom_preflight_gate
```

Not for de-identification, private-tag review, or clinical clearance.

© NVIDIA MedTech Team · Apache-2.0 · NVIDIA/skills

Similar skills

Everything for AI and ML →

From the same set194

digital-health-clinical-asr-eval Scores a NeMo manifest for clinical ASR, computes WER, CER, KER and SER, and builds a five-section leaderboard. Use it when you need to decide between fine-tuning and fixing pronunciation coverage. CX Codex +1 1,900installs digital-health-clinical-asr-build Curates clinical terms, synthesizes eval audio through Magpie TTS and writes a NeMo manifest. Stage 2 of the Clinical ASR Flywheel. CX Codex +1 1,900installs digital-health-clinical-asr-setup Sets up the environment for NVIDIA's Clinical ASR Flywheel, verifies the NVIDIA_API_KEY, installs Python dependencies, and runs an end-to-end smoke test. CX Codex +1 1,900installs dicom-series-to-volume Turns one CT DICOM series folder into an HU NIfTI volume plus a JSON summary with the affine. Handy before feeding scans to a segmentation model. CX Codex +1 1,900installs dicom-metadata-extract Runs a pydicom script on a single DICOM file to extract metadata and detect standard PHI tags. Useful for quick agent inspections of medical imaging files. CX Codex +1 1,900installs nemotron-policy-generator Turn moderation requirements or an existing policy into structured artifacts for NVIDIA Nemotron safety models. Useful when a project needs its rules prepared for model inference. CX Codex +1 1,900installs holoscan-install-source Builds and verifies NVIDIA Holoscan SDK 5.x from source using the repository container wrapper. Helps with Early Access branches and custom SDK components. CX Codex +1 1,800installs holoscan-install-debian Installs native C++ Debian packages of Holoscan SDK 5.x on Ubuntu 24.04 and checks that the bundled examples build. CX Codex +1 1,800installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor