Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

histolab

Skill by K-Dense-AI

Extracts and preprocesses whole-slide histology image tiles with Histolab. It suits researchers and developers who prepare pathology image datasets in Python, covering tissue masks, tile selection and H&E stain normalization.

  • Score 94
  • 59k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install histolab

Built from the published package, never by AI.

git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/histolab ~/.claude/skills/histolab

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install histolab in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

Histolab is an agent skill for inspecting whole-slide histology images (WSI), identifying tissue, and extracting image tiles. It covers WSI metadata inspection, tissue masks, random, grid and score-based tile extraction, H&E stain normalization and tile dataset preparation. The skill is built around the Histolab 0.7.0 Python package and requires native OpenSlide.

The workflow covers choosing a mask, previewing tiles with the same mask used for extraction, and saving tiles into distinct per-slide directories. It also advises splitting datasets by patient before training, validation and test assignment. The source states that masks and scores are image-processing heuristics, not diagnostic tools. For multiplexed imaging or deep learning inference pipelines, it points users to pathml.

Written from the project's SKILL.md and checked against it.

What it can do

  • WSI inspectionReads slide dimensions, pyramid levels and microns-per-pixel metadata from whole-slide images.
  • Tissue masksCreates tissue masks with TissueMask or BiggestTissueBoxMask to locate tissue regions.
  • Random tilingSamples seeded random tiles from a slide, up to a set number of tiles.
  • Grid tilingExtracts tiles on a grid within the extraction mask, with configurable pixel overlap.
  • Score-based tilingScores eligible grid candidates and saves the top-ranked tiles.
  • H&E stain normalizationStandardizes H&E staining, with fitting targets drawn from training data.
  • Tile previewsProduces preview images of located tiles and masks before a full extraction run.
  • Tile dataset preparationSaves tiles into per-slide directories and records parameters, source IDs and QC flags.

What you need

  • Python 3.8 to 3.11 (Python 3.10 was tested)
  • histolab 0.7.0
  • Native OpenSlide library
  • Linux or macOS (Windows is not supported by this Histolab release)

Try asking

  • Use histolab to show the metadata and levels of my SVS slide.
  • Create a tissue mask for this slide and save a preview image.
  • Extract 100 random 512x512 tiles from this slide at level 0 with seed 42.

Good to know

  • Masks and scores are image-processing heuristics and do not diagnose cancer, count cells or assess image quality.
  • Windows is not supported by Histolab 0.7.0.
  • Large WSI cohorts, remote sample downloads and exact MPP extraction are not end-to-end validated.
  • Equal raw scores can make scaled_score undefined in 0.7.0.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/histolab/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md9 KB
  • references/core_capabilities.md2 KB
  • references/filters_preprocessing.md7 KB
  • references/slide_management.md6 KB
  • references/tile_extraction.md8 KB
Show all 8 files
  • references/tissue_masks.md6 KB
  • references/typical_workflows.md5 KB
  • references/visualization.md6 KB

Alternatives to histolab

All alternatives →

Compare with literature-search-arxiv, alphafold-database-fetch-and-analyze or quickgo-database

histolab: common questions

Does Histolab diagnose cancer from slides?

No. The source says its masks and scores are image-processing heuristics that do not diagnose cancer, count individual cells or establish image quality.

Which tile extraction strategies does it support?

It supports RandomTiler, GridTiler and ScoreTiler. RandomTiler samples seeded tiles, GridTiler tiles a grid within the mask, and ScoreTiler ranks candidates and saves the top n_tiles.

When should I use pathml instead of Histolab?

The source says to use pathml for multiplexed imaging or deep learning inference pipelines.

How do I install histolab?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is histolab free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is histolab safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to histolab?

Similar skills: literature-search-arxiv, alphafold-database-fetch-and-analyze, quickgo-database, peloton.

histolab Install

Add to stack

Loading.