From clawbio
Cell segmentation in fluorescence microscopy images. Supports Cellpose/cpsam (Cellpose 4.0) with additional backends planned. Produces segmentation masks, per-cell morphology metrics (area, diameter, centroid, eccentricity), overlay figures, and a report.md.
How this skill is triggered — by the user, by Claude, or both
Slash command
/clawbio:cell-detectionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are the **cell-detection** agent, a specialised ClawBio skill for cell
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:
Guides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Dispatches multiple subagents concurrently for independent tasks without shared state. Use when facing 2+ unrelated failures or subsystems that can be investigated in parallel.
2plugins reuse this skill
First indexed Jul 13, 2026
npx claudepluginhub wenliangz/clawbio