Agent skill

Pathml

by davila7 in davila7/claude-code-templates

Computational pathology toolkit for analyzing whole-slide images (WSI) and multiparametric imaging data.

MITAuto-check passedDocuments & Office

Install Pathml

skills CLI
$ npx skills add davila7/claude-code-templates --skill pathml -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davila7/claude-code-templates pathml --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davila7/claude-code-templates.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli-tool/components/skills/scientific/pathml .claude/skills/pathml && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pathml
GitHub stars
32k
Used in
12 other repos
Token cost
~1.9k tokens
SKILL.md length
698 words
Files
7 (incl. references)
Skills in repo
477
Repo updated
First seen
Licence
MIT

At a glance

Computational pathology toolkit for analyzing whole-slide images (WSI) and multiparametric imaging data.

  • Works in 6 steps: Image Loading & Formats → Preprocessing Pipelines → Graph Construction → …
  • Working with histopathology slides
  • SKILL.md covers Overview, When to Use This Skill, Core Capabilities and Quick Start, plus 2 more sections
  • Calls uv

What it does

Pathml is an agent skill from davila7/claude-code-templates. Computational pathology toolkit for analyzing whole-slide images (WSI) and multiparametric imaging data. Use this skill when working with histopathology slides, H&E stained images, multiplex immunofluorescence (CODEX, Vectra), spatial proteomics, nucleus detection/segmentation, tissue graph construction, or training ML models on pathology data. Supports 160+ slide formats including Aperio SVS, NDPI, DICOM, OME-TIFF for digital pathology workflows.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `references/data_management.md`, `references/graphs.md` and `references/image_loading.md`).

It sits in Documents & Office, covering Slides and decks, Machine learning and Bioinformatics. The repository describes itself as: CLI tool for configuring and monitoring Claude Code. The licence is MIT.

When your agent uses it

  • Working with histopathology slides
  • H&E stained images
  • Multiplex immunofluorescence (CODEX
  • Spatial proteomics

Example prompts

  • “/pathml”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Image Loading & Formats
  2. Preprocessing Pipelines
  3. Graph Construction
  4. Machine Learning
  5. Multiparametric Imaging
  6. Data Management

What it can do on your machine

Read from SKILL.md and the folder at commit 4c82aba. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pathml loads about 1.9k tokens when it runs, and up to ~28k if it reads all its reference files. Until then it costs about 115 tokens; SKILL.md has 698 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~115
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~28k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davila7/claude-code-templates at commit 4c82aba, republished under its MIT licence (© davila7). 698 words, ~1,858 tokens.

Download SKILL.mdSave it as .claude/skills/pathml/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
pathml
description
Computational pathology toolkit for analyzing whole-slide images (WSI) and multiparametric imaging data. Use this skill when working with histopathology slides, H&E stained images, multiplex immunofluorescence (CODEX, Vectra), spatial proteomics, nucleus detection/segmentation, tissue graph construction, or training ML models on pathology data. Supports 160+ slide formats including Aperio SVS, NDPI, DICOM, OME-TIFF for digital pathology workflows.

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.

Show full SKILL.md (288 more words)Show less
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
bash
# Install PathML
uv pip install pathml

# With optional dependencies for all features
uv pip install pathml[all]
Basic Workflow Example
python
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.

© davila7, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references) in cli-tool/components/skills/scientific/pathml of davila7/claude-code-templates.

  • SKILL.md
  • references/data_management.md
  • references/graphs.md
  • references/image_loading.md
  • references/machine_learning.md
  • references/multiparametric.md
  • references/preprocessing.md

Open the folder on GitHubat commit 4c82aba

Used in 12 other repositories

We found 39 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 12 other GitHub owners. This page covers the copy in davila7/claude-code-templates, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Pathml next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pathml compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pathml this skilldavila7/claude-code-templates32k12 repos~1.9kAutomated safety check: PassMIT
PyhealthK-Dense-AI/scientific-agent-skills48k1 repos~2.1kAutomated safety check: PassMIT
Bio Spatial Transcriptomics Spatial MultiomicsFreedomIntelligence/OpenClaw-Medical-Skills3.1k1 repos~1.6kAutomated safety check: PassNone
Bio Clip Seq M6a ClipGPTomics/bioSkills1.2k2 repos~5.7kAutomated safety check: PassMIT
External Model Validationaipoch/medical-research-skills2k—~3.2kAutomated safety check: PassMIT
Bio Imaging Mass Cytometry Data PreprocessingGPTomics/bioSkills1.2k1 repos~4.2kAutomated safety check: PassMIT

Similar skills

  • Pyhealth

    K-Dense-AI/scientific-agent-skills

    Builds and validates PyHealth clinical machine-learning pipelines for EHR, signals, imaging, and medical codes.

    48k GitHub starsUsed in 1 repo~2.1k tokens
    Research & ScienceAuto-check passed
  • Bio Spatial Transcriptomics Spatial Multiomics

    FreedomIntelligence/OpenClaw-Medical-Skills

    Analyze high-resolution spatial platforms like Slide-seq, Stereo-seq, and Visium HD.

    3.1k GitHub starsUsed in 1 repo~1.6k tokens
    Research & ScienceAuto-check passed
  • Bio Clip Seq M6a Clip

    GPTomics/bioSkills

    Map N6-methyladenosine (m6A) RNA modifications at single-nucleotide resolution using miCLIP (Linder 2015), miCLIP2 + m6Aboost machine learning (Kortel 2021), GLORI (Liu 2023, antibody-free chemical…

    1.2k GitHub starsUsed in 2 repos~5.7k tokens
    Research & ScienceAuto-check passed
  • External Model Validation

    aipoch/medical-research-skills

    A skill your agent uses when validating an existing prognostic risk signature on an external bulk expression cohort with survival outcomes, producing risk scores, Kaplan-Meier curves, risk…

    2k GitHub stars~3.2k tokensUpdated 20 days ago
    Research & ScienceAuto-check passed
  • Load and preprocess imaging mass cytometry (IMC) and MIBI data from raw MCD/TXT through hot-pixel removal, spillover compensation, and variance-stabilizing transformation, covering readimc/steinbock…

    1.2k GitHub starsUsed in 1 repo~4.2k tokens
    Research & ScienceAuto-check passed
  • Infers directed, time-delayed gene regulatory edges from BULK time-series expression using Granger causality (statsmodels VAR F-test), dynGENIE3 (tree ensembles regressing ODE-derived derivatives…

    1.2k GitHub starsUsed in 1 repo~5k tokens
    Research & ScienceAuto-check passed

More from davila7/claude-code-templates

All 477 skills in this repo
  • Perplexity Web Search

    davila7/claude-code-templates

    Runs web-grounded searches through Perplexity's Sonar models over OpenRouter for current events, recent literature and cited facts beyond the model's training cutoff.

    32k GitHub starsUsed in 12 repos~3.5k tokens
    Auto-check: notes
  • Neuropixels Data Analysis

    davila7/claude-code-templates

    Analyzes Neuropixels recordings from SpikeGLX or Open Ephys through preprocessing, drift correction, Kilosort4 spike sorting, quality metrics and curation.

    32k GitHub starsUsed in 10 repos~2.8k tokens
    Auto-check passed
  • Scientific Venue Templates

    davila7/claude-code-templates

    Supplies LaTeX templates and formatting rules for journals, conferences, posters, and grant proposals, then can check a draft against them.

    32k GitHub starsUsed in 9 repos~5.1k tokens
    Auto-check: notes
  • Brand Voice Content Creator

    davila7/claude-code-templates

    Analyzes a brand's existing writing to lock in a consistent voice, then builds SEO blog posts and platform-specific social content around it.

    32k GitHub starsUsed in 2 repos~1.9k tokens
    Auto-check passed
  • CAPA Officer

    davila7/claude-code-templates

    Guides corrective and preventive action (CAPA) work in a quality management system, from initiation and root cause analysis through effectiveness verification.

    32k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Fda Consultant Specialist

    davila7/claude-code-templates

    Senior FDA consultant and specialist for medical device companies including HIPAA compliance and requirement management.

    32k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed

Questions about Pathml

What does Pathml do?

Computational pathology toolkit for analyzing whole-slide images (WSI) and multiparametric imaging data. Pathml is an agent skill from davila7/claude-code-templates. Computational pathology toolkit for analyzing whole-slide images (WSI) and multiparametric imaging data.

When should I use Pathml?

Pathml fits situations like: working with histopathology slides; H&E stained images; multiplex immunofluorescence (CODEX; spatial proteomics.

How do I install Pathml in Claude Code?

Run `npx skills add davila7/claude-code-templates --skill pathml -a claude-code`. Or copy the skill folder (cli-tool/components/skills/scientific/pathml in davila7/claude-code-templates) into .claude/skills/pathml in your project. Claude Code loads it when a task matches its description.

How do I install Pathml in Codex?

Run `npx skills add davila7/claude-code-templates --skill pathml -a codex`. Or copy the skill folder (cli-tool/components/skills/scientific/pathml in davila7/claude-code-templates) into .agents/skills/pathml in your project. Codex loads it when a task matches its description.

Can I use Pathml in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davila7/claude-code-templates --skill pathml -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pathml, .gemini/skills/pathml, .github/skills/pathml and .opencode/skills/pathml in your project.

What does Pathml need to run?

Going by SKILL.md and its folder, Pathml needs the command-line tools its instructions call (uv). Our summary lists: Python 3.

Does Pathml access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Pathml safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pathml use?

Pathml is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pathml use?

About 1.9k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 26k tokens, read only when the agent opens those files.

What are the alternatives to Pathml?

Skills that share tags, products or a category with Pathml: Pyhealth (K-Dense-AI/scientific-agent-skills, 48k stars), Bio Spatial Transcriptomics Spatial Multiomics (FreedomIntelligence/OpenClaw-Medical-Skills, 3.1k stars), Bio Clip Seq M6a Clip (GPTomics/bioSkills, 1.2k stars) and External Model Validation (aipoch/medical-research-skills, 2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pathml?

davila7 (a GitHub user) maintains it in davila7/claude-code-templates, which has 32,432 GitHub stars. The repository holds 477 skills in this directory. The repository was last updated on October 7, 2026.

Source: davila7/claude-code-templates on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.