Skip to content

Histolab Tile Extraction

Teaches the agent to inspect whole-slide pathology images, find tissue, and cut out image tiles for datasets.

Stars
55,780
Licence
MIT
Files
8 files

What it does

Once installed, the agent knows how to work with very large digital pathology slide images (whole-slide images). It can read slide metadata, build tissue masks that separate tissue from background, choose tile strategies (random, grid, or score-ranked), save image tiles to folders, and apply H&E stain normalization. It also reminds the agent of scientific caveats, such as not treating masks or scores as diagnoses and splitting data by patient before training.

Great for

  • Computational pathology researchers preparing tile datasets from WSI files
  • Developers building image preprocessing pipelines on Python with OpenSlide
  • Data scientists who need reproducible, documented tile extraction parameters

Skip it if

  • Clinical diagnosis or tumor detection, because the masks and scores are image-processing heuristics and not validated diagnostic outputs
  • Multiplexed imaging or deep learning inference pipelines, which the skill itself says should use pathml instead
  • Users on Windows, since this Histolab release does not support Windows, or who cannot install native OpenSlide

Try asking

  • “Inspect this whole-slide image and show me its dimensions and tissue mask”
  • “Extract 100 random 512x512 tiles from my slide with at least 80% tissue and save a preview”
  • “Create a grid of tiles with 64 pixel overlap from the tissue region and count the saved files”
  • “Prepare a tile dataset split by patient for training and validation”
Step-by-step guide: how to use Histolab Tile ExtractionInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 8 original files, the MIT licence and an attribution note.

    histolab.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip histolab.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip histolab.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Set up an isolated Python 3.10 environment as the skill describes, because the pinned scientific libraries can conflict with modern environments.
  • Start with the small bundled cmu_small_region sample or a local slide before running large extractions, since some sample downloads are hundreds of megabytes.
  • Always preview the mask and tiles with the same mask passed to extraction, and inspect the saved tiles yourself before trusting the dataset.

What's inside

  • references/core_capabilities.md
  • references/filters_preprocessing.md
  • references/slide_management.md
  • references/tile_extraction.md
  • references/tissue_masks.md
  • references/typical_workflows.md
  • references/visualization.md
  • SKILL.md

Redistributed unmodified from K-Dense-AI/scientific-agent-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.