Skip to content

Guide · Agent skill

How to use the pydicom DICOM Toolkit agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The pydicom skill gives an AI agent working knowledge of pydicom, a Python library for reading and writing DICOM files, the standard format for medical images such as CT and MRI scans. It also teaches the agent the safety rules for handling patient data. This guide explains what the skill does, how to install it, how to ask for things in plain language, and what to watch for. It is written for readers who have not used agent skills before.

pydicom DICOM ToolkitK-Dense-AI/scientific-agent-skills · MIT

Quick start

  1. 1Download the ZIP. Download the pydicom skill ZIP from this page.
  2. 2Unzip the skill. Unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. You can also upload the ZIP under Settings → Capabilities → Skills in the Claude apps.
  3. 3Create an isolated Python environment. Set up a clean environment and use Python 3.10+, or 3.12+ if you need the NumPy and Pillow pixel stack.
  4. 4Install pinned packages. Install pydicom 3.0.2 and only the optional NumPy, Pillow and codec plugins your task needs.
  5. 5Make a request in plain language. Describe the goal and the authorized file or folder, for example a metadata summary or a codec check.
  6. 6Review the output and audit. Check results against the skill's limits. For any pseudonymized copy, run the audit helper and confirm the output is not claimed as compliant.

What the pydicom skill makes the agent do

The skill covers local DICOM work: reading and inspecting datasets, checking metadata, writing files, reviewing transfer syntaxes and compression, planning frame and memory needs, rendering a single frame for non-diagnostic review, and preparing pseudonymized copies that are then audited for leftover identifiers.

  • Summarize metadata with an aggregate overview (scripts/extract_metadata.py)
  • Run bounded technical checks on a dataset (scripts/dicom_inventory.py)
  • Preflight codec deployment (scripts/transfer_syntax_inspector.py)
  • Plan frame and memory use (scripts/pixel_frame_planner.py)
  • Render one non-diagnostic frame to an image (scripts/dicom_to_image.py)
  • Create and audit pseudonymized derivatives (scripts/anonymize_dicom.py and scripts/deidentification_audit.py)
  • Check a sensitive UID map (scripts/uid_mapping_validator.py)

Install the pydicom skill

Download the ZIP from this page. Then choose one of the following routes.

For a personal setup, unzip the skill into ~/.claude/skills/. For a single project, unzip it into the project's .claude/skills/ folder. Alternatively, upload the ZIP in the Claude apps under Settings → Capabilities → Skills.

  • Personal install: unzip into ~/.claude/skills/
  • Project install: unzip into .claude/skills/ inside the project
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP

Install the Python packages the skill uses

The skill's SKILL.md lists pinned versions. Create or activate an isolated environment first. pydicom 3.0.2 alone needs Python 3.10+, but the tested NumPy and Pillow pixel stack requires Python 3.12+.

Install only the codec plugins your deployment needs. Plugin licences and wheels differ by package and platform, so review them before deployment.

  • Metadata only: pydicom 3.0.2
  • Uncompressed pixels and rendering: add numpy 2.5.3 and Pillow 12.3.0
  • Compressed pixels: pylibjpeg packages, pyjpegls, or python-gdcm, as needed
uv pip install "pydicom==3.0.2" uv pip install "pydicom==3.0.2" "numpy==2.5.3" "Pillow==12.3.0"

Trigger the skill with natural requests

You do not need special syntax. Describe the task and name the file or folder you are authorized to use. The agent should pick the matching workflow from the skill. Good requests state the goal, for example a summary, a codec check, or a pseudonymized copy.

Ask for aggregate results. The skill is designed to avoid printing full datasets, so requests for counts, modalities, or frame layouts fit it best.

  • "Summarize the DICOM metadata in ./authorized/ct_study as counts by modality."
  • "Check whether this CT file uses a compressed transfer syntax and which plugin I would need."
  • "Plan memory use for a multi-frame file before I deploy the pipeline."
  • "Make a pseudonymized copy of these files using my site's action profile, then audit it for leftover identifiers."

Safety notes: data, scripts and network

The skill runs local helper scripts. It is stated not to use the network, and it does not connect to PACS, DICOMweb or other services. Only work with data you are authorized to access. DICOM files can contain protected health information in metadata, file names, private elements and even pixels.

De-identification is specific to context and requires privacy or DICOM expert verification. The skill forbids claiming that tag removal makes a dataset HIPAA, GDPR or DICOM PS3.15 compliant. Deterministic pseudonymization keys and UID maps are re-identification secrets and must be stored securely, not committed or shared.

  • Keep original files; write derived outputs separately and audit them
  • Set limits on file count, frame count and output size for large or untrusted inputs
  • Do not treat rendered frames or validation results as diagnostic

Tips for better results

Start with the lightest workflow. Metadata summaries and inventories are faster and expose less data than rendering or de-identification. Give the agent a specific allowlist of tags when you know what you need.

Pin the environment on a trusted build host if you deploy the codec stack. The skill recommends locking and verifying wheel hashes rather than resolving packages from the public index at runtime.

  • Name the exact file or folder and the purpose of the task
  • Ask for one frame at a time when working with multi-frame data
  • Check plugin output independently; pydicom cautions that it must be verified

What people use it for

  • Summarizing modalities, sizes and frame counts across a set of authorized CT or MRI files
  • Checking whether a file uses a compressed transfer syntax before building a decoding pipeline
  • Estimating frame and memory requirements for a multi-frame dataset
  • Rendering one frame to an image for a non-diagnostic check of a test file
  • Preparing a pseudonymized research copy and auditing it for leftover identifiers

Frequently asked questions

Is the pydicom skill free and what licence does it use?

The skill is listed under the MIT licence. Plugin packages such as pylibjpeg, pyjpegls and python-gdcm have their own licences and wheels that differ by platform, so review them before deployment.

What do I need to run the pydicom skill?

You need Python 3.10+ for pydicom 3.0.2 alone. The tested NumPy and Pillow pixel stack needs Python 3.12+. Optional codec plugins are needed only for compressed pixel data, and you must have authorized local DICOM files.

Where do I put the skill folder?

Unzip it into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project. You can also upload the ZIP in the Claude apps under Settings → Capabilities → Skills.

Does the skill send my DICOM files to the internet?

The skill states it uses no network and works only on local files. It does not connect to PACS, DICOMweb or other services.

Can I use the skill to diagnose images or make a dataset HIPAA compliant?

No. Outputs are explicitly not diagnostic, and pydicom is not a diagnostic viewer. The skill forbids claiming compliance with HIPAA, GDPR or DICOM PS3.15 because removing tags alone does not establish compliance.

How does this compare with using pydicom directly?

Using pydicom directly means writing your own code. The skill gives the agent pydicom guidance plus ready-made helper scripts and safety rules, so routine checks run with less setup. You still need to verify results yourself.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Choose this skill if you are a developer or researcher working with local, authorized DICOM files and want an agent to follow pydicom best practices and privacy rules. Pick something else if you need clinical image viewing, diagnosis, or connections to PACS or DICOMweb servers, because this skill does not cover those.

Download the skill