/clawbio:cell-detectionfrom clawbio
Segments cells in fluorescence microscopy images using Cellpose/cpsam (Cellpose 4.0). Produces segmentation masks, per-cell morphology metrics (area, diameter, centroid, eccentricity), overlay figures, and a report.md.
Ships in clawbio. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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 TIFF, CZI, ND2, PNG, or JPG fluorescence imagesreport.md, {stem}_measurements.csv, and histogram figures--use_gpu / --use_cpu override flags| 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 |
| Zeiss microscopy | .czi | Reads CZI via czifile and uses CZI axis metadata (CziFile.axes) to map C/Z/Y/X deterministically |
| Nikon microscopy | .nd2 | Reads ND2 via nd2 and uses ND2 named dimensions (ND2File.sizes) for deterministic C/Z/Y/X mapping |
| PNG / JPEG | .png, .jpg, .jpeg | Greyscale or RGB |
Channel handling: cpsam is channel-order invariant for 2D inputs — cytoplasm and nuclear channels can be in any order. For 2D segmentation, if you have more than 3 channels, the first 3 are used and the rest are truncated with a warning. For 3D segmentation (--do_3D) with --z_projection none, 4D stacks are preserved as Z×C×Y×X (no channel truncation at load time).
--do_3D + --z_projection none): keep 4D volume as Z×C×Y×XCellposeModel()
z_axis=0, channel_axis=1--use_cpu forces CPUskimage.measure.regionpropsreport.md + {stem}_measurements.csv + reproducibility bundle (commands.sh, environment.yml, checksums.sha256)# 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
# Override 4D stack Z handling (default is max projection)
python skills/cell-detection/cell_detection.py \
--input <image.nd2> --z_projection none --do_3D --output <report_dir>
# Force CPU mode
python skills/cell-detection/cell_detection.py \
--input <image.tif> --use_cpu --output <report_dir>
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), czifile (CZI), nd2 (ND2), or PIL (PNG/JPG); use CZI/ND2 metadata axes to assign C/Z/Y/X--z_projection none: preserve 4D volume as Z×C×Y×XCellposeModel(gpu=<flag>)model.eval(img, diameter=<arg_or_None>)
channels/channel_axis needed (cpsam is channel-order invariant)Z×C×Y×X: pass z_axis=0, channel_axis=1masks via skimage.measure.regionprops{stem}_measurements.csv, figures, report.mdKey parameters:
cpsam (Cellpose 4.0 unified model — channel-order invariant)--z_projection none: multichannel 4D stacks are kept as Z×C×Y×XNone triggers Cellpose auto-estimation--z_projection max (default): max-project over Z while preserving channels for 2D segmentation (H×W×C)--z_projection none: preserve Z; 4D stacks remain volumetric (Z×C×Y×X) for 3D segmentation--do_3D requires volumetric input (Z×Y×X or Z×C×Y×X)--do_3D falls back to 2D mode when safe, otherwise errors{stem}_cp_outlines_unavailable.txt) because Cellpose does not emit 3D outlines PNGs.output_dir/
├── report.md
├── {stem}_measurements.csv
├── {stem}_cp_masks.tif
├── {stem}_seg.npy
├── figures/
│ ├── {stem}_cp_outlines.png
│ └── {stem}_histogram.png
└── reproducibility/
├── checksums.sha256
├── commands.sh
└── environment.yml
cellpose>=4.0 — cpsam modeltifffile — TIFF I/Oczifile>=2019.7.2.2 — Zeiss CZI I/O (manually verified with 2019.7.2.2)nd2>=0.11.1 — Nikon ND2 I/O (manually verified with 0.11.1)Pillow — PNG/JPG loadingnumpy — array opsmatplotlib — figuresscikit-image — regionprops metricscommands.sh, environment.yml, checksums.sha256) records the exact invocation, dependencies, and output integrityTrigger conditions:
Chaining partners:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
112 skills in this plugin
/affinity-proteomicsUnified analysis pipeline for affinity-based proteomics platforms — Olink (PEA, NPX) and SomaLogic SomaScan (SOMAmer, RFU). Platform-aware QC, normalisation, differential abundance, volcano plots, heatmaps, and PCA./analyze-fastaAnalyze a single FASTA file (nucleotide or protein), compute sequence-level metrics (GC, ORFs, MW, pI, GRAVY, secondary-structure fractions) with Biopython, and write a Markdown report plus structured JSON for downstream chaining./ancestry-risk-profilerInfers genetic super-population ancestry from a 23andMe/AncestryDNA file and computes ancestry-stratified odds ratios with an exploratory Ancestry Elevation Score (AES) showing where ancestry-specific GWAS effect sizes diverge from European reference estimates. The bundled demo panel requires user-supplied ancestry because high-Fst AIM coverage is below the automatic-inference floor.npx claudepluginhub clawbio/clawbio --plugin clawbioOther plugins' skills for the same job