PathML Computational Pathology Workflow
A PathML 3.0.5 playbook for loading and tiling whole-slide images, building preprocessing/QC pipelines, validating spatial graphs, and planning bounded local inference.
Data & AnalyticsAdvanced★ 33,030⑂ 3,248AI score 8/10Last updated: Aug 9, 2026
What it does
Guides local, research-only computational pathology work with PathML 3.0.5:
- Slide loading (OpenSlide / Bio-Formats backends), tiling, pyramid levels, and
(i, j)coordinate bookkeeping - Preprocessing and QC pipelines via
Pipeline+SlideData.run()(tissue detection, blur, empty-mask handling) .h5pathdata management, manifest validation, and patient-level splits to prevent leakage- Multiplex (CODEX/Vectra) quantification and KNN/RAG/HACT spatial graph schema validation
- Bounded inference planning: tile counts, RAM, output size, batching
- Bundled offline CLIs in
scripts/for manifest validation, pipeline planning, image QC, schema checks, and inference planning
It also sets firm guardrails: de-identify pixels and metadata, keep re-identification keys out of the workspace, never load untrusted pickle/.pt checkpoints, verify ONNX SHA-256, and gate any remote model download behind explicit consent.
Who it's for
- Digital/computational pathology researchers, grad students, and data scientists
- Teams that need reproducible, auditable WSI tiling pipelines
- Labs handling slides that may embed patient identifiers
Not a medical device: outputs must not be used to diagnose, grade, stage, or treat patients.
Example uses
- First pipeline: "Detect tissue on an H&E
.svsslide and write 512px tiles to.h5path" → you get correctHESlide+TissueDetectionHEcode plus an 8-tile smoke test before a full run. - Capacity planning: "How many tiles and how much RAM for a 100000×80000 slide at 512px?" → run
python scripts/plan_pipeline.py --width 100000 --height 80000 --tile-size 512 --stride 512. - Spatial graph QA: "Check channel order and node-feature alignment in my graph JSON" →
python scripts/validate_spatial_schema.py graph --input graph.json --root .
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/pathml folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/pathml/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git && mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/pathml ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repository:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git - Create the skills directory:
mkdir -p ~/.claude/skills - Copy just this skill:
cp -r scientific-agent-skills/skills/pathml ~/.claude/skills/ - Install native prerequisites first:
- Ubuntu/Debian:
sudo apt-get install openslide-tools gcc g++ libblas-dev liblapack-dev openjdk-17-jdk - macOS:
brew install openslide openjdk@17
- Ubuntu/Debian:
- Create a Python 3.11 environment and install PathML:
uv venv --python 3.11 && source .venv/bin/activate && uv pip install "pathml==3.0.5" - Verify:
python -c "import importlib.metadata as m; print(m.version('pathml'))" - Restart Claude Code, then ask something like "Build a PathML preprocessing pipeline for my H&E slides" to trigger the skill.
View source on GitHub ↗License: MIT