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.
npx skills add NVIDIA/skills --skill dicom-series-preflight -a claude-codeWhat 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_01and show me the verdict - Execute
scripts/preflight_series.pyagainstfixtures/clean_no_phiand walk me through the JSON - Check the headers in
runs/incomingand 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-code2Manually: put the files in place
~/.claude/skills/dicom-series-preflight/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/dicom-series-preflight/
1Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill dicom-series-preflight -a codex2Manually: put the files in place
.agents/skills/dicom-series-preflight/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill dicom-series-preflight -a cursor2Manually: put the files in place
.cursor/skills/dicom-series-preflight/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install NVIDIA/skills dicom-series-preflight2Manually: put the files in place
.github/skills/dicom-series-preflight/SKILL.md1Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill dicom-series-preflight -a gemini-cli2Platform CLI
gemini skills install https://github.com/NVIDIA/skills --path skills/dicom-series-preflightManually: put the files in place
.devin/skills/dicom-series-preflight/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill dicom-series-preflight -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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