If you're building clinical ML pipelines and tired of reinventing EHR preprocessing, this wraps PyHealth's opinionated five-stage workflow: dataset, task definition, model instantiation, training, metrics. It handles MIMIC-III/IV, eICU, OMOP, sleep signals, and chest X-rays out of the box, plus a stable of architectures like Transformer, RETAIN, and SafeDrug. The real value is in the task library (mortality, readmission, drug recommendation, ICD coding) and the medical code utilities for mapping between ICD-9/10, ATC, NDC, and RxNorm vocabularies. It's prescriptive by design, so if your workflow fits the mold you save weeks of plumbing. If it doesn't, you'll fight it. The skill emphasizes the critical gotchas: models need SampleDatasets not BaseDatasets, always split by patient to avoid leakage, and match your monitor metric to the task type.
- skills.sh installs
- 2K
- GitHub stars
- 56.6K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add k-dense-ai/scientific-agent-skills --skill pyhealth --agent claude-codeInstalls into .claude/skills of the current project.
Files
PyHealth
Targets PyHealth 2.0.2, verified against its released wheel, current official
documentation, and CPU execution on Python 3.12/Torch 2.7.1. PyHealth's pipeline is
Dataset -> Task -> Model -> Trainer -> Metrics; its 1.x and 2.x interfaces differ.
Do not combine legacy Visit examples with the 2.x event/processor API.
When to use
Use for clinical prediction with PyHealth, including EHR sequences, physiological signals, imaging tasks, or medical-code lookup. Establish the cohort, prediction time, observation window, outcome horizon, and unit of evaluation before modeling. For general tabular learning without a PyHealth dataset/task, this skill is optional.
Install and smoke-test
uv run --no-project --isolated --python 3.12 --with pyhealth==2.0.2 python assets/starter_pipeline.py --demo --epochs 1
Run that command from the skill directory, or use the absolute path to the asset. It trains on invented in-memory records and exercises patient splitting, metrics, and best-checkpoint restoration. It provides no evidence of clinical performance. See installation for project setup and device options.
Workflow
Sponsors
Details
- Repository
- github.com/k-dense-ai/scientific-agent-skills
- Categories
- DevOps & CI/CD, AI & Agent Building, Data Science & ML, Automation & Workflows, Sales & Marketing
- First seen
- Jun 3, 2026
