Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
k-dense-ai avatar

Pathml

  • 839 installs
  • 32k repo stars
  • Updated July 29, 2026
  • k-dense-ai/scientific-agent-skills

pathml is a Claude Code scientific skill that stores, retrieves, and batch-processes massive pathology whole-slide images in HDF5 for developers who need efficient tile management and ML-ready datasets in computational p

About

pathml is a data-management skill from k-dense-ai/scientific-agent-skills for handling large-scale pathology whole-slide images in machine learning pipelines. It documents PathML's HDF5-centric storage for images, masks, features, and metadata with chunked compression, fast random access, and hierarchical organization suited to arbitrarily large slide libraries. Developers reach for pathml when building computational pathology agents that must tile whole-slide images, persist processed subsets, and feed batch loaders without reloading multi-gigabyte WSIs each epoch. The skill covers storage schemas, tile management strategies, and optimized batch processing workflows for downstream model training and analysis.

  • HDF5 integration with efficient compression and chunked storage for arbitrarily large pathology datasets
  • SlideData and SlideDataset classes supporting single-slide and distributed multi-slide workflows
  • Optimized tile management with level, size, and stride controls for ML-ready feature extraction
  • Hierarchical organization of images, masks, features, and metadata in one cross-platform file
  • Seamless integration with preprocessing pipelines before downstream model training

Pathml by the numbers

  • 839 all-time installs (skills.sh)
  • +39 installs in the week ending Jul 29, 2026 (Skillselion tracking)
  • Ranked #355 of 2,065 Data Science & ML skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/k-dense-ai/scientific-agent-skills --skill pathml

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs839
repo stars32k
Security audit3 / 3 scanners passed
Last updatedJuly 29, 2026
Repositoryk-dense-ai/scientific-agent-skills

How do you batch-process pathology slides in HDF5?

Efficiently store, retrieve, and batch-process massive pathology whole-slide images with HDF5 for machine learning pipelines.

Who is it for?

ML engineers and bioimaging developers building computational pathology pipelines that must tile and persist massive whole-slide image datasets.

Skip if: Developers working with small raster images or non-pathology datasets should skip pathml because it targets whole-slide HDF5 tile workflows.

When should I use this skill?

Trigger when an agent pipeline must store, tile, or batch-retrieve pathology whole-slide images in HDF5 for ML.

What you get

HDF5 slide archives, chunked tile stores, batch-ready pathology datasets, and metadata hierarchies

  • HDF5 slide archives
  • Tile batch loaders
  • Processed mask and feature stores

Files

SKILL.mdMarkdownGitHub ↗

PathML

Overview

PathML is a comprehensive Python toolkit for computational pathology workflows, designed to facilitate machine learning and image analysis for whole-slide pathology images. The framework provides modular, composable tools for loading diverse slide formats, preprocessing images, constructing spatial graphs, training deep learning models, and analyzing multiparametric imaging data from technologies like CODEX and multiplex immunofluorescence.

When to Use This Skill

Apply this skill for:

  • Loading and processing whole-slide images (WSI) in various proprietary formats
  • Preprocessing H&E stained tissue images with stain normalization
  • Nucleus detection, segmentation, and classification workflows
  • Building cell and tissue graphs for spatial analysis
  • Training or deploying machine learning models (HoVer-Net, HACTNet) on pathology data
  • Analyzing multiparametric imaging (CODEX, Vectra, MERFISH) for spatial proteomics
  • Quantifying marker expression from multiplex immunofluorescence
  • Managing large-scale pathology datasets with HDF5 storage
  • Tile-based analysis and stitching operations

Core Capabilities

PathML provides six major capability areas documented in detail within reference files:

1. Image Loading & Formats

Load whole-slide images from 160+ proprietary formats including Aperio SVS, Hamamatsu NDPI, Leica SCN, Zeiss ZVI, DICOM, and OME-TIFF. PathML automatically handles vendor-specific formats and provides unified interfaces for accessing image pyramids, metadata, and regions of interest.

See: references/image_loading.md for supported formats, loading strategies, and working with different slide types.

2. Preprocessing Pipelines

Build modular preprocessing pipelines by composing transforms for image manipulation, quality control, stain normalization, tissue detection, and mask operations. PathML's Pipeline architecture enables reproducible, scalable preprocessing across large datasets.

Key transforms:

  • StainNormalizationHE - Macenko/Vahadane stain normalization
  • TissueDetectionHE, NucleusDetectionHE - Tissue/nucleus segmentation
  • MedianBlur, GaussianBlur - Noise reduction
  • LabelArtifactTileHE - Quality control for artifacts

See: references/preprocessing.md for complete transform catalog, pipeline construction, and preprocessing workflows.

3. Graph Construction

Construct spatial graphs representing cellular and tissue-level relationships. Extract features from segmented objects to create graph-based representations suitable for graph neural networks and spatial analysis.

See: references/graphs.md for graph construction methods, feature extraction, and spatial analysis workflows.

4. Machine Learning

Train and deploy deep learning models for nucleus detection, segmentation, and classification. PathML integrates PyTorch with pre-built models (HoVer-Net, HACTNet), custom DataLoaders, and ONNX support for inference.

Key models:

  • HoVer-Net - Simultaneous nucleus segmentation and classification
  • HACTNet - Hierarchical cell-type classification

See: references/machine_learning.md for model training, evaluation, inference workflows, and working with public datasets.

5. Multiparametric Imaging

Analyze spatial proteomics and gene expression data from CODEX, Vectra, MERFISH, and other multiplex imaging platforms. PathML provides specialized slide classes and transforms for processing multiparametric data, cell segmentation with Mesmer, and quantification workflows.

See: references/multiparametric.md for CODEX/Vectra workflows, cell segmentation, marker quantification, and integration with AnnData.

6. Data Management

Efficiently store and manage large pathology datasets using HDF5 format. PathML handles tiles, masks, metadata, and extracted features in unified storage structures optimized for machine learning workflows.

See: references/data_management.md for HDF5 integration, tile management, dataset organization, and batch processing strategies.

Quick Start

Installation

# Install PathML
uv pip install pathml

# With optional dependencies for all features
uv pip install pathml[all]

Basic Workflow Example

from pathml.core import SlideData
from pathml.preprocessing import Pipeline, StainNormalizationHE, TissueDetectionHE

# Load a whole-slide image
wsi = SlideData.from_slide("path/to/slide.svs")

# Create preprocessing pipeline
pipeline = Pipeline([
    TissueDetectionHE(),
    StainNormalizationHE(target='normalize', stain_estimation_method='macenko')
])

# Run pipeline
pipeline.run(wsi)

# Access processed tiles
for tile in wsi.tiles:
    processed_image = tile.image
    tissue_mask = tile.masks['tissue']

Common Workflows

H&E Image Analysis: 1. Load WSI with appropriate slide class 2. Apply tissue detection and stain normalization 3. Perform nucleus detection or train segmentation models 4. Extract features and build spatial graphs 5. Conduct downstream analysis

Multiparametric Imaging (CODEX): 1. Load CODEX slide with CODEXSlide 2. Collapse multi-run channel data 3. Segment cells using Mesmer model 4. Quantify marker expression 5. Export to AnnData for single-cell analysis

Training ML Models: 1. Prepare dataset with public pathology data 2. Create PyTorch DataLoader with PathML datasets 3. Train HoVer-Net or custom models 4. Evaluate on held-out test sets 5. Deploy with ONNX for inference

References to Detailed Documentation

When working on specific tasks, refer to the appropriate reference file for comprehensive information:

  • Loading images: references/image_loading.md
  • Preprocessing workflows: references/preprocessing.md
  • Spatial analysis: references/graphs.md
  • Model training: references/machine_learning.md
  • CODEX/multiplex IF: references/multiparametric.md
  • Data storage: references/data_management.md

Resources

This skill includes comprehensive reference documentation organized by capability area. Each reference file contains detailed API information, workflow examples, best practices, and troubleshooting guidance for specific PathML functionality.

references/

Documentation files providing in-depth coverage of PathML capabilities:

  • image_loading.md - Whole-slide image formats, loading strategies, slide classes
  • preprocessing.md - Complete transform catalog, pipeline construction, preprocessing workflows
  • graphs.md - Graph construction methods, feature extraction, spatial analysis
  • machine_learning.md - Model architectures, training workflows, evaluation, inference
  • multiparametric.md - CODEX, Vectra, multiplex IF analysis, cell segmentation, quantification
  • data_management.md - HDF5 storage, tile management, batch processing, dataset organization

Load these references as needed when working on specific computational pathology tasks.

Related skills

FAQ

What storage format does the pathml skill use for slide data?

The pathml skill centers on HDF5 as the primary storage format for processed PathML data. HDF5 provides chunked compression, fast random access to tile subsets, hierarchical organization of images and masks, and support for arbitrarily large pathology datasets.

When should developers invoke the pathml skill?

Developers should invoke pathml when building ML pipelines that must efficiently store, retrieve, and batch-process massive pathology whole-slide images. The skill covers tile management, HDF5 schemas, and optimized loaders for images, masks, features, and metadata.

Is Pathml safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Data Science & MLagentsautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.