pydicom

pydicom is a skill for Claude Code, Codex from K-Dense-AI/scientific-agent-skills. It costs 56 tokens per session (4,117 once invoked), scanned A, original, MIT.

A Python toolkit for reading, inspecting, writing, and transforming DICOM files, the standard format used for medical images and their associated data. It can also process pixel data and review datasets for possible de-identification issues.

In plain words
What is it for?
Use it to inspect local DICOM files, convert or process pixel data, handle compressed and multi-frame images, work with JSON representations, and prepare privacy reviews.
Why use it?
It provides controlled access to medical-image metadata and pixels while highlighting that filenames, private fields, overlays, and images may contain protected health information.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

not rated 44krepo +1.6k today A scan Socket: passSnyk: passSkillSpector: warn 56 tokens original MIT

Good fit Use it to inspect local DICOM files, convert or process pixel data, handle compressed and multi-frame images, work with JSON representations, and prepare privacy reviews.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/k-dense-ai/scientific-agent-skills/pydicom
About the project

Scientific Agent Skills is a collection of reusable procedures that give AI agents capabilities for scientific research across areas such as biology, chemistry, medicine, and drug discovery. It is used by researchers and by people building AI scientist workflows with compatible coding agents. The catalogue contains many of the project's skills and supporting instructions.

K-Dense-AI/scientific-agent-skills · 44,469 stars · on GitHub · arxiv.org

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add K-Dense-AI/scientific-agent-skills --skill pydicom
Clone the repo
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pydicom

README.md
[![agentmods](https://agentmods.dev/badge/skills/k-dense-ai/scientific-agent-skills/pydicom/github.svg)](https://agentmods.dev/skills/k-dense-ai/scientific-agent-skills/pydicom)
Your own site
<a href="https://agentmods.dev/skills/k-dense-ai/scientific-agent-skills/pydicom"><img src="https://agentmods.dev/badge/skills/k-dense-ai/scientific-agent-skills/pydicom/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pydicom

Your own site · 80×15
<a href="https://agentmods.dev/skills/k-dense-ai/scientific-agent-skills/pydicom"><img src="https://agentmods.dev/badge/skills/k-dense-ai/scientific-agent-skills/pydicom.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,117 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 9 Apr 2026
  • Snyk pass 9 Apr 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 295
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.04117
Opus 5 $0.00028 $0.02058
Sonnet 5 $0.00011 $0.00823
Haiku 4.5 $0.00006 $0.00412

Measured 8d ago against content hash 3c8d3a5880d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

pydicom scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 10 executable files (scripts/__init__.py, scripts/_common.py, scripts/anonymize_dicom.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/pydicom/SKILL.md · 399 lines

How it starts

The opening of the file, as written. The whole thing — 399 lines — stays where its author put it; the contents beside it link to each section on GitHub.

pydicom

Use pydicom for DICOM dataset I/O and pixel processing. Version 3.0.2 is the current stable release reviewed here. It fixes CVE-2026-32711, a crafted DICOMDIR path-traversal issue. pydicom 3.0.2 declares Python >=3.10; its bundled DICOM dictionary is 2024c, while the live DICOM Standard may be newer.

Mandatory safety boundary

  • Work only with local data that the user is authorized to access.
  • DICOM metadata, file names, private elements, overlays, structured content, and pixels may contain protected health information (PHI).
  • Never print Dataset, export full metadata/JSON, or log element values by default. Use a documented allowlist and aggregate output.
  • pydicom is a general DICOM framework, not a diagnostic viewer. Pixel output, validation, conversion, and plugin availability are not diagnostic claims.
  • De-identification is profile-, purpose-, recipient-, jurisdiction-, and threat-context-specific. It requires privacy/DICOM expert verification.
  • Never claim that a tag-removal script is DICOM PS3.15, HIPAA, GDPR, or other compliance. Preserve originals and audit derived outputs.
  • Treat deterministic pseudonymization keys and UID maps as re-identification secrets: use least privilege and encrypted/managed secret storage, never commit, sync, log, or share them with derivatives, and define backup, rotation, revocation, and destruction procedures. A leaked key invalidates the intended separation; rotation also changes deterministic mappings.
  • Set explicit input-file, file-count, frame-count, decoded-byte, and output limits before parsing untrusted or unusually large datasets.

Installation

Create or activate an isolated environment, then install the exact reviewed release:

uv pip install "pydicom==3.0.2"

Uncompressed pixel arrays and image rendering:

uv pip install "pydicom==3.0.2" "numpy==2.5.1" "Pillow==12.3.0"

Install only the transfer-syntax plugins required by the deployment:

# JPEG/JPEG-LS, JPEG 2000/HTJ2K, and faster RLE through pylibjpeg
uv pip install "numpy==2.5.1" "pylibjpeg==2.1.0" \
  "pylibjpeg-libjpeg==2.4.0" "pylibjpeg-openjpeg==2.5.0" \
  "pylibjpeg-rle==2.2.0"

# JPEG-LS encoder/decoder
uv pip install "numpy==2.5.1" "pyjpegls==1.5.1"

# Alternative decoder with platform-specific wheels
uv pip install "python-gdcm==3.2.6"

Read the full file on GitHub · 399 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 399 lines · 56 tokens per session scan A 3c8d3a5880d5

Subscribe to this mod's changes

pydicom is a skill published in the GitHub repository K-Dense-AI/scientific-agent-skills (44,469 stars, last pushed today), licensed MIT. It adds 56 tokens to every session and 4,117 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

slides-as-code

Build research slides with text-first source (Slidev/Marp/Reveal/Quarto) and reproducible export (PDF). Includes structure, figure reuse rules, and quality checklist for top-tier scientific presentations.

foryourhealth111-pixel/Vibe-Skills · 46 tokens

digital-twin-discharge-drafter

Use when drafting patient discharge summaries, creating personalized discharge instructions, simulating post-discharge outcomes, reducing hospital readmissions, or optimizing care transitions. Generates AI-enhanced discharge documentation with digital twin predictions for improved patient safety.

aipoch/medical-research-skills · 53 tokens

discharge-summary-writer

Generate hospital discharge summaries from admission data, hospital course, diagnoses, procedures, and follow-up plans; use when a structured discharge document is required from clinical notes.

aipoch/medical-research-skills · 38 tokens

synthesize

Thesis report synthesis — turn a thesis's markdown artifacts into its letter-size thesis-report.html, then OPTIMIZE it against real page renders. Four-step loop — pack (deterministic Python bundle of all sources + report/metrics.json), author (the LLM writes report/content.html — narrative, KPI tiles, badges…

agentii-ai/agentii-investment-intelligence · 134 tokens

figure-duplicate-audit

A review of scientific figure images for duplicated, reused, altered, or uninformative panels. Scientific figures are the charts, photographs, and image panels included in research papers.

xuzhougeng/wisp-science · 115 tokens

LaTeX工具

A tool for creating, compiling, and checking mathematical modelling papers written in LaTeX, a document system often used for technical writing.

XiaoMaColtAI/math-modeling-skill · 46 tokens