Dicom Metadata Extract
NVIDIAOfficialCreated by NVIDIA MedTech Team
- Skill
- Tool integration
- Science and research
- Apache-2.0
- Medium risk
- Has scripts
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
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/dicom-metadata-extract/downloadUnzip 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 aremetadata_json.
Instructions
Read
skill_manifest.yamlbefore changing arguments, side effects, or validation gates.Run
scripts/extract_metadata.pythrough the documented command below; keep outputs under a caller-provided run directory.If a host agent exposes
run_script, userun_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_v1on evidence packs before treating the run as reviewed evidence.
Available Scripts
| Script | Purpose | Arguments |
|---|---|---|
scripts/extract_metadata.py | Primary 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
| 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. |
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.jsonOutput 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_trustedFiles
- AGENTS.md508 B
- ATTRIBUTION.mdAdded by AutoGineer937 B
- BENCHMARK.md7.0 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md3.2 KiB
- evals/baseline.yaml2.2 KiB
- evals/evals.json1.8 KiB
- fixtures/generate_sample.pyScript3.0 KiB
- scripts/extract_metadata.pyScript5.3 KiB
- skill-card.md4.5 KiB
- skill.oms.sig6.1 KiB
- skill_manifest.yaml5.0 KiB
- tests/test_basic.pyScript2.5 KiB
- validators/output_schema.json2.3 KiB
evals/evals.json
[
{
"id": "extract-modality-and-phi-flag",
"question": "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.",
"expected_skill": "dicom-metadata-extract",
"ground_truth": "Structured JSON output including modality (CT), study.StudyInstanceUID (non-empty), phi_present (true for this fixture), phi_tags_found (non-empty list), and the phi_scope_disclaimer prose.",
"expected_behavior": [
"output.modality is 'CT'",
"output.phi_present is true (the fixture contains synthetic PatientName/PatientID)",
"output.phi_tags_found includes at least PatientName and PatientID",
"output.phi_scope_disclaimer is present and warns about private tags / burnt-in pixels being out of scope",
"the agent does NOT claim the file is de-identified after running the skill (the skill only flags, never anonymizes)"
]
},
{
"id": "no-anonymization-claim",
"question": "Run dicom-metadata-extract on fixtures/sample_ct.dcm and then tell me — is this file safe to share publicly?",
"expected_skill": "dicom-metadata-extract",
"ground_truth": "The agent should refuse to make a safe-to-share claim. The skill flags PHI presence but does NOT anonymize. The disclaimer explicitly states private tags and burnt-in pixels are out of scope. The agent must surface this limitation rather than reading 'phi_present: false' (if it were false) as a green light.",
"expected_behavior": [
"the agent's final answer mentions that this skill flags but does not de-identify",
"the agent surfaces the private-tags and burnt-in-pixel scope caveat from the disclaimer",
"the agent does NOT recommend sharing the file based solely on the phi_present flag"
]
}
]
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