Process and analyze tissue images from spatial transcriptomics data using Squidpy. Extract image features, segment cells/nuclei, and compute morphological features from H&E or IF images.
SkillScore95Maintained
Automatic
◆Research pack
Last verified 8/2/2026
What it changes
Passed 19 of 20 test cases with the skill, and 13 of 20 without it.
Without skill64%
With skill95%
Checks it passed that the model alone missed
Stores spot image feature results in adata.obsm['img_features'].
Uses rgb2hed to deconvolve H&E tissue images into color channels.
Adds generated cellpose masks into the ImageContainer via img.add_img.
and 6 more in the full report
7 fixed14 passed either way1 still failing0 broke
Pass-rate lift
+32 pp
Tokens
+42%
Agent turns
0%
Response time
-45%
Model gemini-3.6-flashMeasured 8/2/2026v121 of 22 cases passed with skill · 20 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 5
Prompt
I want to segment tissue features directly using Squidpy's built-in watershed segmentation on channel 0 of an image container with an intensity threshold of 0.5. How do I invoke this segmentation function?
What was checked, without and with the skill
Checked
Without skill
With skill
Calls sq.im.segment with layer='image', method='watershed', channel=0, and thresh=0.5.
Passed
Passed
Extracts segmentation mask values using img['segmented_watershed'].values.
Missed
Passed
case-13 · gemini-3.6-flash · 8/2/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md255 linessingle file
Image Analysis for Spatial Transcriptomics
Extract features and segment tissue images in spatial transcriptomics data.
Required Imports
import squidpy as sq
import scanpy as sc
import numpy as np
import matplotlib.pyplot as plt
from skimage import io, filters, segmentation
Access Tissue Images
# Get image from Visium data
library_id = list(adata.uns['spatial'].keys())[0]
img_dict = adata.uns['spatial'][library_id]['images']
# High and low resolution images
hires = img_dict['hires']
lowres = img_dict['lowres']
print(f'Hires shape: {hires.shape}')
print(f'Lowres shape: {lowres.shape}')