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.
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/histolabRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/scientific-agent-skills/skills/histolab ~/.gemini/antigravity-cli/skills/histolabAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
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
ANo 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 →Searches arXiv for scientific papers and preprints, extracts their metadata and abstracts, and downloads PDF or HTML full text. Suited to users who need research papers, literature or specific arXiv IDs.
Downloads AlphaFold predicted structures and PAE matrices for a UniProt ID, then reports pLDDT confidence, domain boundaries and disorder. Built for users who already have a UniProt accession.
Queries the QuickGO and Evidence & Conclusion Ontology REST API to map genes to Gene Ontology terms. Built for researchers doing functional annotation and GO hierarchy exploration.
Connects an AI assistant to Peloton to browse fitness classes, check live and archived schedules, and manage workouts. Built for Peloton users who want to plan rides from their assistant.
Queries NCBI Gene through the E-utilities and Datasets API. It helps researchers search genes by symbol or ID, retrieve gene details, and run batch lookups for annotation and functional analysis.
Prepares and launches nf-core/pacsomatic runs for matched tumor-normal PacBio HiFi data starting from unaligned BAM files. It generates samplesheets and pinned launch artifacts, then runs locally or submits to a scheduler.
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.
