Generated banner for Dicom Metadata Extract
Generated logo for Dicom Metadata Extract

Dicom Metadata Extract

NVIDIAOfficialCreated by NVIDIA MedTech Team

  • Skill
  • Tool integration
  • Science and research
  • Apache-2.0
  • Medium risk
  • Has scripts

From the author

Used for extracting selected metadata from one DICOM file and flagging standard-tag PHI presence. Not for anonymization or clinical use.
— the description by NVIDIA MedTech Team

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The dicom-metadata-extract skill provides a programmatic interface for reading DICOM files to retrieve core metadata and identify the presence of Protected Health Information (PHI) based on a subset of standard tags. It is designed for technical evaluation and data processing workflows rather than clinical or regulatory use. The skill outputs structured JSON containing modality, transfer syntax, and grouped study information, while explicitly warning against its use for anonymization or clinical decision-making.

What it does

  • Extracts study, series, and image metadata from a single DICOM file.
  • Flags the presence of PHI based on standard DICOM tags.
  • Outputs metadata in a structured JSON format.
  • Provides a command-line interface for integration into automated pipelines.
  • Supports validation of output quality through dedicated verification tools.

When to use it

  • When you need to inspect DICOM file headers for technical metadata.
  • When performing initial data screening to identify standard PHI tags.
  • When building automated data processing pipelines for medical imaging research.
  • When verifying the structure of DICOM files during development or testing.

Advantages

  • Provides a lightweight and standardized way to access DICOM metadata.
  • Includes built-in PHI flagging for common standard tags.
  • Integrates easily with existing Python-based medical imaging workflows.
  • Supports trusted execution patterns for evidence-based review.

Usage examples

“Extract metadata from the file scan_01.dcm and save it to output.json.”
The agent runs the extraction script on the specified file and generates a JSON file containing the extracted metadata and PHI flags.
“Check if the DICOM file at /data/ct_scan.dcm contains any standard PHI tags.”
The agent processes the file and returns a report indicating whether PHI was detected and which specific tags were identified.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/nvidia/dicom-metadata-extract/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip dicom-metadata-extract.zip -d .agents/skills

Documentation by NVIDIA MedTech Team

DICOM Metadata Extract

Purpose

  • Used for extracting selected metadata from one DICOM file and flagging standard-tag PHI presence. Not for anonymization or clinical use.

  • Use the wrapper exactly as documented; do not replace the upstream entrypoint with a handwritten implementation.

  • Manifest I/O: inputs are dicom_path; outputs are metadata_json.

Instructions

  • Read skill_manifest.yaml before changing arguments, side effects, or validation gates.

  • Run scripts/extract_metadata.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/extract_metadata.py", args=[...]); otherwise run the Bash/Python command shown below.

  • Check the emitted JSON and run medagent.verifiers.dicom_metadata_quality_v1 on evidence packs before treating the run as reviewed evidence.

Available Scripts

ScriptPurposeArguments
scripts/extract_metadata.pyPrimary entrypoint declared by skill_manifest.yaml.PATH_TO_DICOM [--output OUT.json]

Prerequisites

  • Runtime requirements: Python packages listed in runtime.side_effects.pip_packages.

  • Run commands from the repository root unless an existing section below says otherwise.

Limitations

  • Small PS3.15-inspired standard-tag subset only; not a complete Basic Application Confidentiality Profile implementation.

  • Private tags not checked

  • Burnt-in pixel PHI not detected

  • Multi-frame handling minimal

  • Not for clinical deployment, regulatory de-identification, autonomous diagnosis, patient-facing use.

Troubleshooting

ErrorCauseFix
Missing dependency or import errorRuntime package drift from skill_manifest.yaml.Install the packages declared in the manifest or use the documented setup command.
Empty or schema-invalid outputWrong input path, unsupported modality, or upstream failure.Re-run with a known fixture and inspect the wrapper JSON plus stderr.
Validation gate failureOutput violated a declared engineering invariant.Keep the failed evidence pack and use the gate message to repair inputs or wrapper code.

Reads one DICOM file with pydicom and emits JSON on stdout.

python scripts/extract_metadata.py PATH_TO_DICOM
python scripts/extract_metadata.py PATH_TO_DICOM --output result.json

Output includes transfer_syntax, modality, grouped study/series/image metadata, phi_present, and phi_tags_found.

Use this as the smallest end-to-end example of a Medical AI Skills skill. Do not use it for anonymization, private-tag review, pixel PHI detection, or clinical interpretation.

For second-pass evidence review, generate a trusted run:

python -m eval_engine.run_trusted skills/dicom-metadata-extract \
  --fixture skills/dicom-metadata-extract/fixtures/sample_ct.dcm \
  --out runs/dicom_metadata_trusted

Files

evals/baseline.yaml

# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

schema_version: "0.1.0"
scenario_id: extract-modality-and-phi-flag
skill: dicom-metadata-extract
description: >
  Baseline paired comparison for the reference DICOM metadata extractor.
  The mock with-skill arm is expected to satisfy every assertion, while the
  mock without-skill arm must fail at least one assertion so the runner proves
  it can detect lift.
task: >
  I have a DICOM file at fixtures/sample_ct.dcm. Extract its metadata - I
  specifically need to know the modality, the study UID, and whether it
  contains any PHI before I share it externally.
fixture: skills/dicom-metadata-extract/fixtures/sample_ct.dcm
assertions:
  - id: modality-is-ct
    kind: json_path_value
    params:
      path: modality
      expected: CT
  - id: study-uid-present
    kind: json_path_value
    params:
      path: study.StudyInstanceUID
      expected: __truthy__
  - id: phi-present
    kind: json_path_value
    params:
      path: phi_present
      expected: true
  - id: patient-name-flagged
    kind: json_path_contains
    params:
      path: phi_tags_found
      expected: PatientName
  - id: patient-id-flagged
    kind: json_path_contains
    params:
      path: phi_tags_found
      expected: PatientID
  - id: scope-caveat-present
    kind: text_contains
    params:
      substring: Private tags
  - id: no-deidentified-claim
    kind: text_not_contains
    params:
      substring: de-identified
with_skill_docs:
  - skills/dicom-metadata-extract/SKILL.md
  - skills/dicom-metadata-extract/skill_manifest.yaml
without_skill_docs: []
backend:
  name: mock

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Declares allowed tools, Needs Python

Security

What our scanner noticed· Medium risk

  • Large base64-encoded blobs
  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
NVIDIA MedTech Team
Publisher
NVIDIA (Official)
Source
NVIDIA/skills · skills/dicom-metadata-extract · commit fce3cca
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE-APACHE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by NVIDIA MedTech Team or NVIDIA.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download dicom-metadata-extract.zip