AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
← Back to list

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_tags allowlists, defer_size) and forbids printing full Dataset objects 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_original deprecation, pixel_data_handlers sunset, 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

  1. "Summarize this DICOM folder by modality and image size" → python scripts/extract_metadata.py authorized/ --recursive returns a redacted aggregate report.
  2. "Export frame 0 of this CT as a PNG" → pixel_array(path, index=0) with LUT transforms, or dicom_to_image.py --acknowledge-pixel-phi.
  3. "Build a pseudonymized derivative for export" → generate a UID key, run anonymize_dicom.py, then deidentification_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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on AI 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.

  1. Open a terminal in the folder where you keep source checkouts.
  2. Clone the repo: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy the skill: cp -r scientific-agent-skills/skills/pydicom ~/.claude/skills/
  5. 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"
  6. 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"
  7. Restart Claude Code and try a prompt like "inspect the DICOM metadata in ./authorized".
  8. Use it only on local data you are authorized to access, and keep original files preserved in controlled storage.