Segments cells in fluorescence microscopy images using Cellpose/cpsam (v4.0). Outputs segmentation masks, per-cell metrics (area, diameter, centroid, eccentricity), overlay figures, and report.md.
From clawbionpx claudepluginhub clawbio/clawbio --plugin clawbioThis skill uses the workspace's default tool permissions.
cell_detection.pyrequirements.txttests/test_cell_detection.pyProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Builds 3-5 year financial models for startups with cohort revenue projections, cost structures, cash flow, headcount plans, burn rate, runway, and scenario analysis.
You are the cell-detection agent, a specialised ClawBio skill for cell
segmentation in fluorescence microscopy images. The default backend is cpsam
(Cellpose 4.0); additional backends (e.g. StarDist) are planned.
Manual cell counting and segmentation are slow, inconsistent, and hard to reproduce.
report.md.cpsam on any TIFF, PNG, or JPG fluorescence imagereport.md, {stem}_measurements.csv, and histogram figures| Format | Extension | Notes |
|---|---|---|
| Greyscale TIFF | .tif, .tiff | HĆW ā passed directly |
| 2-channel TIFF | .tif, .tiff | HĆWĆ2 ā cytoplasm + nuclear, any order |
| 3-channel TIFF | .tif, .tiff | HĆWĆ3 ā H&E or fluorescence, any order |
| >3-channel TIFF | .tif, .tiff | First 3 channels used; remainder truncated with warning |
| PNG / JPEG | .png, .jpg, .jpeg | Greyscale or RGB |
Channel handling: cpsam is channel-order invariant ā cytoplasm and nuclear channels can be in any order. You do not need to specify which channel is which. If you have more than 3 channels, consider omitting the extra channel or combining it with another before running.
CellposeModel() ā no channels argument neededskimage.measure.regionpropsreport.md + {stem}_measurements.csv + commands.sh# Standard usage ā greyscale or multi-channel (cpsam handles channels automatically)
python skills/cell-detection/cell_detection.py \
--input <image.tif> --output <report_dir>
# Override diameter estimate (pixels)
python skills/cell-detection/cell_detection.py \
--input <image.tif> --diameter 30 --output <report_dir>
# Demo (synthetic image, no user file needed)
python skills/cell-detection/cell_detection.py --demo --output /tmp/cell_detection_demo
python skills/cell-detection/cell_detection.py --demo --output /tmp/cell_detection_demo
Expected output: report.md with ~67 cells detected from a synthetic 512Ć512 blob image (67 blobs generated).
tifffile (TIFF) or PIL (PNG/JPG); detect ndimCellposeModel(gpu=<flag>)model.eval(img, diameter=<arg_or_None>) ā no channels arg (cpsam is channel-order invariant)masks via skimage.measure.regionprops{stem}_measurements.csv, figures, report.mdKey parameters:
cpsam (Cellpose 4.0 unified model ā channel-order invariant)None triggers Cellpose auto-estimationoutput_dir/
āāā report.md
āāā {stem}_measurements.csv
āāā figures/
ā āāā {stem}_histogram.png
āāā reproducibility/
āāā commands.sh
cellpose>=4.0 ā cpsam modeltifffile ā TIFF I/OPillow ā PNG/JPG loadingnumpy ā array opsmatplotlib ā figuresscikit-image ā regionprops metricscommands.sh records the exact invocation for reproducibilityTrigger conditions:
Chaining partners: