PyHealth Clinical ML Pipeline Assistant
Builds clinical prediction pipelines (mortality, readmission, drug recommendation, sleep staging) on EHR and signal datasets using PyHealth's standard 5-stage workflow.
Data & AnalyticsAdvanced★ 33,030⑂ 3,248AI score 9/10Last updated: Aug 9, 2026
What it does
- Writes minimal, idiomatic code following PyHealth's Dataset → Task → Model → Trainer → Metrics pipeline.
- Helps pick the right dataset class: MIMIC-III/IV, eICU, OMOP-CDM, EHRShot, SleepEDF, SHHS, ISRUC, ChestX-ray14, TUEV/TUAB.
- Matches tasks (mortality, readmission, length of stay, drug recommendation, sleep staging, ICD coding, EEG events) to models (Transformer, RETAIN, GAMENet, SafeDrug, MICRON, StageNet, AdaCare, CNN/RNN/MLP).
- Looks up and cross-maps medical codes: ICD-9-CM, ICD-10-CM, ATC, NDC, RxNorm, CCS.
- Prevents the classic mistakes: passing a
BaseDatasetinstead of aSampleDataset, sample-level splits that leak patients, mismatchedmonitormetrics, MIMIC-IV'sehr_root=quirk, and missingcache_dircaching.
Who it's for
- Healthcare ML engineers, clinical data scientists, and medical AI researchers.
- Grad students who just got MIMIC access and need a first working model.
- Not needed if you only want plain PyTorch on generic tabular data.
Example uses
- "Build a mortality prediction pipeline on synthetic MIMIC-III" → under-20-line train/eval script pointed at the public synthetic bucket, no credentialing required.
- "Train SafeDrug for drug recommendation on MIMIC-IV" → uses
ehr_root=, multilabel metrics likejaccard_samplesfor checkpoint monitoring. - "Map prescription NDC codes to ATC level 3" → cross-mapping snippet with
pyhealth.medcode.
· · · 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/pyhealth/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/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 --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills.git /tmp/sas && mkdir -p ~/.claude/skills && cp -r /tmp/sas/skills/pyhealth ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and make sure the skills folder exists:
mkdir -p ~/.claude/skills - Clone the repository:
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills.git /tmp/sas - Copy just this skill:
cp -r /tmp/sas/skills/pyhealth ~/.claude/skills/ - Verify with
ls ~/.claude/skills/pyhealth— you should seeSKILL.mdplusreferences/andassets/. - Restart Claude Code and try a prompt like "build a mortality prediction pipeline on MIMIC-III".
- Set up a runtime environment:
uv init my-pyhealth-project && cd my-pyhealth-project && uv python pin 3.12 && uv add pyhealth - Real MIMIC/eICU data needs credentialed PhysioNet access — start with the synthetic MIMIC-III bucket the skill recommends.
View source on GitHub ↗License: MIT