Claude Skill MartBrowse skillsWhat is a Skill?
Back to list

PyHealth Clinical Deep Learning Pipeline

Guides Claude to build clinical ML pipelines with PyHealth following the dataset → task → model → trainer → metrics pattern.

Data & AnalyticsAdvanced33,0303,248AI score 8/10Last updated: Aug 9, 2026

What it does

PyHealth is a Python toolkit for clinical deep learning. This skill teaches Claude to write idiomatic PyHealth code that follows the library's 5-stage pipeline (Dataset → Task → Model → Trainer → Metrics).

  • Dataset loading: MIMIC-III/IV, eICU, OMOP-CDM, EHRShot, SleepEDF, SHHS, ISRUC, ChestX-ray14, COVID19-CXR, TUEV/TUAB
  • Task definition: mortality, readmission, length of stay, drug recommendation, sleep staging, ICD coding, EEG event detection, de-identification
  • Model selection: Transformer, RETAIN, GAMENet, SafeDrug, MICRON, StageNet, AdaCare, CNN/RNN/MLP
  • Training & evaluation: PyHealth Trainer handles checkpointing, logging and best-model selection; clinical metrics like PR-AUC, ROC-AUC, Jaccard
  • Medical code utilities: lookup and cross-mapping for ICD-9/10-CM, ATC, NDC, RxNorm, CCS

The most valuable part is the "critical things to get right" list — pass a SampleDataset (not BaseDataset) to models, always split by patient to avoid leakage, MIMIC-IV uses ehr_root=, and pick a monitor metric matching the task type.

Who it's for

  • Healthcare AI researchers and grad students modeling EHR data from MIMIC/eICU
  • Data scientists prototyping hospital risk-prediction models (mortality, readmission)
  • Health informatics practitioners doing frequent ICD/ATC/NDC code mapping
  • Anyone building signal or imaging classification pipelines (polysomnography, EEG, chest X-ray)

Example uses

  1. "Build a mortality prediction model on synthetic MIMIC-III in under 20 lines" → generates a script using the public synthetic bucket with MortalityPredictionMIMIC3 + Transformer + Trainer, and sets monitor="pr_auc" correctly.
  2. "Create a drug recommendation pipeline on MIMIC-IV and compare SafeDrug vs GAMENet" → uses multilabel-appropriate metrics (jaccard_samples, pr_auc_samples) and avoids the ehr_root= constructor gotcha.
  3. "Map NDC codes in my prescription table to ATC level 3" → produces medcode-based NDC→RxNorm→ATC cross-mapping code.

· · · Install guide · · ·

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 Claude Skill Mart.
Copy the skills/pyhealth folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/pyhealth/.
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/pyhealth ~/.claude/skills/

This is a third-party skill. Check the source repository before installing.

  1. Open a terminal and make sure the skills directory exists: mkdir -p ~/.claude/skills
  2. Clone the repository: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git
  3. Copy the skill folder: cp -r scientific-agent-skills/skills/pyhealth ~/.claude/skills/ (keep the references/ and assets/ subfolders intact).
  4. Set up Python. PyHealth 2.0 needs Python ≥ 3.12 and < 3.14: uv init my-pyhealth-project && cd my-pyhealth-project && uv python pin 3.12
  5. Install the library: uv add pyhealth (for the legacy line, uv add pyhealth==1.16).
  6. Restart Claude Code and try a prompt like "Build a MIMIC-III mortality prediction pipeline with PyHealth" — the skill triggers automatically.
  7. Real MIMIC data requires credentialed PhysioNet access. While learning, use the public synthetic MIMIC-III bucket referenced in the skill.