Analyze medical DICOM imaging data (MRI, CT, X-ray) from any source — a CD/DVD, USB drive, or local directory. Use this skill whenever the user mentions an MRI scan, CT scan, DICOM files, a medical CD, a radiology disc, or wants to understand, view, or report on any medical imaging study. The skill handles the full pipeline: discovering the data, rendering slice images, analyzing findings across all sequences, and generating structured reports in plain or clinical language. Invoke this skill proactively if the user mentions any of: "MRI", "CT scan", "DICOM", "radiology CD", "medical scan", "shoulder MRI", "brain scan", "x-ray disc", "my doctor gave me a CD", "scan results", or similar.
This skill walks you through a complete, end-to-end analysis of a DICOM medical imaging study — from raw files on a disc or drive, to rendered images, to a written report the patient and their doctor can actually use.
Think of a DICOM study as a set of series — each series is one imaging sequence (e.g. "T1-weighted axial", "STIR coronal"). Every series contains many slices stored as individual DICOM files. Your job is to:
Check common mount points in this order:
ls /run/media/$USER/ # Linux auto-mount (most common for CDs)
ls /media/ # fallback
ls /Volumes/ # macOS
If you find a mounted disc/drive, look for a directory inside it. If nothing is mounted, ask the user:
DICOM/Once you have the path, count the files:
find <DICOM_PATH> -type f | wc -l
Run the check script first — it will print what's missing:
python3 scripts/check_deps.py
If anything is missing, install via the system package manager. On Omarchy/Arch Linux:
omarchy-pkg-add python-pydicom python-numpy python-matplotlib python-scipy
On Debian/Ubuntu: sudo apt install python3-pydicom python3-numpy python3-matplotlib
On macOS: pip3 install pydicom numpy matplotlib
Run the metadata script to get a clean summary of the study:
python3 scripts/extract_metadata.py <DICOM_PATH>
This will print:
Read this output carefully — it tells you what anatomical region was scanned, what sequences were acquired, and how many slices/images to expect. Use it to understand the clinical context before rendering.
Run the render script to produce PNG overview images for every series:
python3 scripts/render_dicom.py <DICOM_PATH> <OUTPUT_DIR>
This creates one s<N>_all.png per series in <OUTPUT_DIR>, showing all slices in a grid.
It also creates s<N>_overview.png with 12 representative slices for quick review.
Once rendered, read every overview image using the Read tool so you can visually inspect
the anatomy. Render focused close-up panels for areas of clinical interest (rotator cuff,
labrum, specific joints, etc.) by re-running the render script with --series <N> --slices <start>-<end>.
Work through each series systematically. For each one, note:
Anatomy present: What body part and structures are visible?
Signal/density: Are there areas of abnormal brightness (fluid, edema, hemorrhage) or darkness (air, calcification, susceptibility)?
Structures to assess by region:
Shoulder: Rotator cuff (supraspinatus, infraspinatus, subscapularis, teres minor), labrum (anterior, posterior, SLAP), biceps tendon and groove, AC joint, glenohumeral cartilage, subacromial-subdeltoid bursa, bone marrow signal, Hill-Sachs/Bankart.
Knee: Menisci (medial, lateral — body, anterior/posterior horns), cruciate ligaments (ACL, PCL), collateral ligaments, cartilage (medial, lateral, patellofemoral), bone marrow edema, effusion, Baker's cyst.
Spine: Disc height and signal, end-plate changes, foraminal stenosis, cord signal, facet joints, paraspinal muscles.
Brain: White matter signal, sulci/gyri symmetry, ventricular size, posterior fossa, brainstem, vascular flow voids.
Cross-reference sequences: Always correlate fluid-sensitive sequences (STIR, T2-SPAIR, T2W) with anatomical sequences (T1W, PDW). A finding on STIR that's also visible on T2W is more reliable. T1W tells you about bone marrow (normally bright = normal fat).
When in doubt about what you're seeing, describe it plainly: "There is a region of increased signal on STIR in the [location] which is also visible on T2W-SPAIR."
Ask the user who the report is for before writing:
# MRI Report — [Body Part]
## Patient Information
[table: name, ID, DOB, sex, weight, study date, accession, institution, scanner]
## Sequences Reviewed
[table: series number, sequence name, plane, slice count]
## Findings
[one section per finding, with status: PRESENT / ABSENT / NORMAL]
## Impression
[numbered list: primary finding first, then secondary, then incidentals]
---
⚠️ AI-generated — not a substitute for a licensed radiologist's report.
# Scan Summary — [Body Part] — Plain Language
## What was scanned and when
## What this scan shows (brief explainer of modality)
## What was found
[one section per finding — use analogies, avoid jargon, explain significance]
## Summary in simple terms
## What to do next
---
⚠️ Written by an AI to help explain findings. Always consult a qualified doctor.
Always include the disclaimer. Never present findings as a definitive diagnosis.
If the user asks for treatment context or recommendations:
Save all outputs to a dedicated directory (e.g. <study-name>-output/):
output/
├── s<N>_overview.png # 12-slice preview per series
├── s<N>_all.png # all slices per series
├── report_clinical.md # clinical report
├── report_plain.md # plain-language report
└── treatment.md # treatment notes (if requested)
Tell the user where the files are when done.