Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

pyhealth

Skill by K-Dense-AI

Guides building and validating PyHealth clinical machine-learning pipelines for EHR, signals, imaging and medical codes. Written for developers and researchers working with PyHealth 2.0.2 datasets and prediction tasks.

  • Score 94
  • 58k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install pyhealth

Built from the published package, never by AI.

git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/pyhealth ~/.claude/skills/pyhealth

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install pyhealth in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill helps an AI assistant build and validate clinical machine-learning pipelines with the PyHealth 2.0.2 library. It covers EHR, physiological signal, imaging and medical-code work, including MIMIC-III, MIMIC-IV, eICU and OMOP prediction tasks. The source describes the pipeline as Dataset, Task, Model, Trainer and Metrics.

The skill tells the assistant to define the cohort, prediction time, observation window and outcome horizon before modeling. It stresses patient-level splitting, a one-batch check before training and a single held-out test evaluation. It includes a synthetic in-memory demo and reference files on datasets, tasks, models and medical codes. It is aimed at researchers and developers doing clinical prediction with PyHealth.

Written from the project's SKILL.md and checked against it.

What it can do

  • Load clinical datasetsSets up PyHealth dataset classes for MIMIC-III, MIMIC-IV, eICU and OMOP data.
  • Define prediction tasksBuilds supervised tasks such as mortality, readmission and length-of-stay prediction.
  • Split by patientUses split_by_patient to keep each patient in a single partition.
  • Train modelsRuns PyHealth models such as Transformer through the Trainer with metrics and monitoring.
  • Restore best checkpointsKeeps the best checkpoint according to a declared validation metric.
  • Map medical codesLooks up and maps ICD, ATC, NDC and RxNorm codes.
  • Run a synthetic demoRuns a bundled starter pipeline on invented records to test the setup.
  • Check task semanticsReviews label definitions, required tables and possible leakage before training.

What you need

  • Python 3.12 or 3.13
  • PyHealth 2.0.2 with Torch 2.7.1
  • Network access for installation, public datasets and medical-code resources
  • Authorized local access for restricted clinical datasets

Try asking

  • Run the PyHealth synthetic demo pipeline for one epoch
  • Build a MIMIC-III mortality task with patient-level splits
  • Map ICD diagnosis codes to ATC codes using PyHealth

Good to know

  • The demo uses invented records and provides no evidence of clinical performance.
  • Random patient splits are not chronological or stratified.
  • Restricted clinical datasets require authorized local access.
  • The MIMIC-III mortality task predicts death in the next admission, not the current stay.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/pyhealth/SKILL.md, skills/pyhealth/assets/starter_pipeline.py. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md8 KB
  • assets/starter_pipeline.py4 KB
  • references/datasets.md5 KB
  • references/examples.md7 KB
  • references/installation.md4 KB
Show all 8 files
  • references/medcode.md4 KB
  • references/models.md6 KB
  • references/tasks.md6 KB

Alternatives to pyhealth

All alternatives →

Compare with literature-search-arxiv, alphafold-database-fetch-and-analyze or quickgo-database

pyhealth: common questions

What is the PyHealth skill used for?

It helps build and validate clinical machine-learning pipelines for EHR, signals, imaging and medical codes using PyHealth 2.0.2.

Does the skill need real patient data?

No. The bundled starter trains on invented in-memory records. Restricted clinical datasets need authorized local access.

Does the demo show clinical accuracy?

No. The source says the demo exercises the pipeline only and provides no evidence of clinical performance.

How do I install pyhealth?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is pyhealth free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is pyhealth safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to pyhealth?

Similar skills: literature-search-arxiv, alphafold-database-fetch-and-analyze, quickgo-database, peloton.

pyhealth Install

Add to stack

Loading.