pydicom DICOM Toolkit Skill
Guides Claude to read, write, and process DICOM files with pydicom 3.0.2 while enforcing PHI-safe output and a bounded de-identification preflight.
Dev & CodingAdvanced★ 33,030⑂ 3,248AI score 9/10Last updated: Aug 9, 2026
What it does
- Enforces safe reading patterns (
stop_before_pixels,specific_tagsallowlists,defer_size) and forbids printing fullDatasetobjects or full JSON so protected health information never leaks into logs. - Covers transfer syntax inspection, compression/decompression, encapsulation, frame-level decoding via
pydicom.pixels, and the correct Modality LUT → VOI LUT ordering. - Provides a 9-step de-identification workflow grounded in DICOM PS3.15 Annex E, plus bundled helper CLIs for metadata aggregation, codec preflight, frame/memory planning, audit, and UID-map validation.
- Documents pydicom 3.0 migration traps (
read_file()removal,write_like_originaldeprecation,pixel_data_handlerssunset, JPEGLossless UID change).
Who it's for
- Medical imaging researchers and healthcare-AI data engineers wrangling large DICOM archives.
- Teams preparing pseudonymized export datasets who need a technical preflight before expert review.
- Developers validating JPEG 2000 / JPEG-LS / RLE plugin availability in a controlled deployment.
Examples
- "Summarize this DICOM folder by modality and image size" →
python scripts/extract_metadata.py authorized/ --recursivereturns a redacted aggregate report. - "Export frame 0 of this CT as a PNG" →
pixel_array(path, index=0)with LUT transforms, ordicom_to_image.py --acknowledge-pixel-phi. - "Build a pseudonymized derivative for export" → generate a UID key, run
anonymize_dicom.py, thendeidentification_audit.py, keeping originals intact and flagging the result for expert verification.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/HEAD/skills/pydicom/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/pydicom folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/pydicom/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git && mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/pydicom ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal in the folder where you keep source checkouts.
- Clone the repo:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r scientific-agent-skills/skills/pydicom ~/.claude/skills/ - Create and activate a Python 3.10+ virtual environment, then install the pinned stack:
uv pip install "pydicom==3.0.2" "numpy==2.5.1" "Pillow==12.3.0" - Add only the codec plugins you need, e.g.
uv pip install "pylibjpeg==2.1.0" "pylibjpeg-libjpeg==2.4.0" "pylibjpeg-openjpeg==2.5.0" - Restart Claude Code and try a prompt like "inspect the DICOM metadata in ./authorized".
- Use it only on local data you are authorized to access, and keep original files preserved in controlled storage.
View source on GitHub ↗License: MIT