Skip to content

PyHealth Clinical ML Pipelines

Builds and checks PyHealth clinical prediction pipelines on EHR, signal, and medical-code data

Stars
55,780
Licence
MIT
Files
8 files

What it does

Once installed, the agent follows PyHealth's structured workflow (dataset, task, model, trainer, metrics) when building clinical machine-learning pipelines, and checks common pitfalls such as patient-level splitting, leakage, and outcome timing. It also knows how to map medical codes (ICD, ATC, NDC, RxNorm) and includes a starter script that runs a demo on invented data to confirm the setup works.

Great for

  • Researchers or data scientists prototyping clinical prediction models on EHR datasets such as MIMIC-III or MIMIC-IV with authorized access
  • Developers who need a correct PyHealth 2.0.2 starting point and want the agent to avoid legacy 1.x API patterns
  • Analysts who need medical code lookups or mapping between coding systems

Skip it if

  • Clinical decision-making or patient care: the skill itself states the demo gives no evidence of clinical performance and the upstream mortality task is next-admission prediction, not early warning
  • General tabular machine learning with no PyHealth dataset or task, which the skill says it is optional for
  • Working with restricted patient data without authorization, since restricted clinical datasets require authorized local access

Try asking

  • “Set up a PyHealth 2.0.2 mortality prediction pipeline on my local MIMIC-III extract with patient-level splits”
  • “Run the PyHealth starter demo to check my environment works”
  • “Map these ICD-10 diagnosis codes to their CCS or ATC equivalents using PyHealth's medical code tools”
  • “Review my PyHealth training script for leakage and monitor-metric mistakes”
Step-by-step guide: how to use PyHealth Clinical ML PipelinesInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 8 original files, the MIT licence and an attribution note.

    pyhealth.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip pyhealth.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip pyhealth.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Run the built-in demo first (uv run ... assets/starter_pipeline.py --demo --epochs 1) to confirm the install before pointing it at real data.
  • Give the agent your cohort definition, prediction time, observation window, and evaluation unit up front, since the skill asks for these before modeling.
  • Use a fresh cache directory after changing data, configuration, or custom task code, because cache identity does not track file contents.

What's inside

  • assets/starter_pipeline.py
  • references/datasets.md
  • references/examples.md
  • references/installation.md
  • references/medcode.md
  • references/models.md
  • references/tasks.md
  • SKILL.md

Redistributed unmodified from K-Dense-AI/scientific-agent-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.