Lightweight WSI tile extraction and preprocessing. Use for basic slide processing, tissue detection, tile extraction, and stain normalization for H&E images. Best for simple pipelines, dataset preparation, and quick tile-based analysis. For advanced spatial proteomics, multiplexed imaging, or deep learning pipelines use pathml.
19k tokens
context cost
the whole folder, loaded on every use
8
files
instructions only
0
copies elsewhere
how many repositories repackaged it
32514
stars on the repo
on the repository, not the skill itself
Install
one command, takes just this skill from the repository
Histolab is a Python library for processing whole slide images (WSI) in digital pathology. It automates tissue detection, extracts informative tiles from gigapixel images, and prepares datasets for deep learning pipelines. The library handles multiple WSI formats, implements sophisticated tissue segmentation, and provides flexible tile extraction strategies.
Installation
Install OpenSlide system libraries first (OpenSlide download), then install histolab:
uv pip install histolab
For built-in TCGA sample slides via histolab.data, also install pooch:
uv pip install pooch
Histolab 0.7.0 (latest stable) supports Python 3.8–3.11 on Linux and macOS. Windows is not supported as of 0.7.0.
Quick Start
Basic workflow for extracting tiles from a whole slide image:
Built-in stain normalization (Macenko, Reinhard) and filter-based alternatives
Common preprocessing pipelines
Applying filters to tiles
Custom mask filters
Quality control filters
Best practices and troubleshooting
references/visualization.md
Comprehensive visualization guide:
Slide thumbnail display and saving
Mask visualization techniques
Tile location preview
Displaying extracted tiles and creating mosaics
Quality assessment visualizations
Multi-slide comparison
Filter effect visualization
Exporting high-resolution figures and PDFs
Interactive visualization in Jupyter notebooks
Usage pattern: Reference files contain in-depth information to support workflows described in this main skill document. Load specific reference files as needed for detailed implementation guidance, troubleshooting, or advanced features.
How to use it
Copy the folder
Take k-dense-ai/histolab from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
Check the name does not clash
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
Install what it needs
The instructions reference pip, uv.
Without those the skill loads but fails at the first command.