Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/clawbio-cell-detection
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, data-analysis
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/cell-detection
What's inside
- Skill name
cell-detection- Description
- 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.
- License
- MIT
- Metadata
- author: ClawBio · version: 0.1.0
- Instructions
- 166 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (4)
- SKILL.md
- cell_detection.py
- requirements.txt
- test_cell_detection.py · tests/
SKILL.md (first lines)
# 🔬 Cell Segmentation
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.
## Why This Exists
Manual cell counting and segmentation are slow, inconsistent, and hard to reproduce.
- **Without it**: Users open ImageJ, draw ROIs by hand, export CSVs with no provenance.
- **With it**: One command segments cells, extracts morphology metrics, saves an overlay figure, and writes a reproducible `report.md`.
- **Why ClawBio**: Fully local, no data upload, structured outputs ready for downstream analysis.
## Core Capabilities
1. **Segment**: Run `cpsam` on TIFF, CZI, ND2, PNG, or JPG fluorescence images
2. **Measure**: Extract area, equivalent diameter, centroid, and eccentricity per cell
3. **Report**: Produce `report.md`, `{stem}_measurements.csv`, and histogram figures
4. **Execution control**: GPU auto by default, with explicit `--use_gpu` / `--use_cpu` override flags
## Input Formats
| 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).
## Workflow
1. **Load** image; detect greyscale vs multi-channel
2. **Prepare**
- 2D mode: pass 1–3 channels through unchanged; truncate >3 to first 3 with a warning
- 3D mode (`--do_3D` + `--z_projection none`): keep 4D volume as `Z×C×Y×X`
3. **Segment** with `CellposeModel()`
- 2D mode: no explicit channel mapping needed
- 3D multichannel mode: call with `z_axis=0`, `channel_axis=1`
- Device mode: defaults to GPU-auto; `--use_cpu` forces CPU
4. **Metrics** via `skimage.measure.regionprops`
5. **Figures** — overlay + size distribution histogram
6. **Report** — `report.md` + `{stem}_measurements.csv` + reproducibility bundle (`commands.sh`, `environment.yml`, `checksums.sha256`)
## CLI Reference
```bash
# 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>
```
## Demo
```bash
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).
## Algorithm / Methodology
1. Load image with `tifffile` (TIFF), `czifile` (CZI), `nd2` (ND2), or `PIL` (PNG/JPG); use CZI/ND2 metadata axes to assign C/Z/Y/X
2. Channel preparation:
- 2D mode: if >3 channels, truncate to first 3 with a warning
- 3D mode with `--z_projection none`: preserve 4D volume as `Z×C×Y×X`
3. Instantiate `CellposeModel(gpu=<flag>)`
4. Call `model.eval(img, diameter=<arg_or_None>)`
- 2D: no `channels`/`channel_axis` needed (cpsam is channel-order invariant)
- 3D `Z×C×Y×X`: pass `z_axis=0`, `channel_axis=1`
5. Extract per-cell stats from `masks` via `skimage.measure.regionprops`
6. Save `{stem}_measurements.csv`, figures, `report.md`
**Key parameters**:
- Model: `cpsam` (Cellpose 4.0 unified model — channel-order invariant)
- Channels:
- 2D: channel-order invariant; first 3 channels are used when input has >3 channels
- 3D with `--z_projection none`: multichannel 4D stacks are kept as `Z×C×Y×X`
- Diameter: `None` triggers Cellpose auto-estimation
- 4D stack policy:
- `--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
- 3D guardrails:
- `--do_3D` requires volumetric input (`Z×Y×X` or `Z×C×Y×X`)
- non-volumetric input with `--do_3D` falls back to 2D mode when safe, otherwise errors
## Notes
- Measurements are reported in pixel units (px, px²). Physical calibration metadata (um/pixel) is not currently propagated into per-cell metrics.
- For volumetric segmentation outputs, outlines PNG is replaced with a note file (`{stem}_cp_outlines_unavailable.txt`) because Cellpose does not emit 3D outlines PNGs.
## Example Queries
- "Segment the cells in my DAPI image"
- "How many cells are in this microscopy image?"
- "Run cellpose on my TIFF and give me a cell count"
- "Segment my fluorescence image and export morphology metrics"
## Output StructureFrom ClawBio/ClawBio, MIT.
More from ClawBio/ClawBio
- 0.825score
polars-bio
ClawBio (adapted from K-Dense scientific-agent-skills/polars-bio)
Fast genomic interval operations (overlap, nearest, merge, coverage, cluster, complement, subtract, count-overlaps), multi-format bioinformatics I/O…
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
ena-fetch
Nikolai Hecker, UK Dementia Research Institute
Query metadata and download sequencing data from the European Nucleotide Archive (ENA) via the Portal and Browser APIs.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
gi-expression
ClawBio + Genomic Intelligence
Predict tissue / cell-type expression (log TPM + TPM) from 9,198–500,000 bp of DNA around a TSS, at least 4,599 bp each side (anything but exactly 9,198 bp…
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
geo-fetch
Nikolai Hecker, UK Dementia Research Institute
Query metadata and download data from the NCBI Gene Expression Omnibus (GEO).
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
ukb-ppp-region-fetch
ClawBio
Fetch a regional slice of plasma pQTL summary statistics from the UK Biobank Pharma Proteomics Project (UKB-PPP; Sun 2023 Nature) for a specific (protein…
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
eqtl-catalogue-region-fetch
ClawBio
Fetch a region of cis-eQTL summary statistics from EBI eQTL Catalogue v7+ via tabix-on-FTP.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
protocols-io
ClawBio Contributors
Search, browse, and retrieve scientific protocols from protocols.io via REST API.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
gwas-sumstats-harmonize
AlsammanAlsamman
Harmonize GWAS summary statistics from any common format (GWAS-Catalog SSF, PLINK 1.9/2, REGENIE, METAL, BOLT, SAIGE) to one canonical table (SNP CHR BP EA…
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
prs-applicability-gate
Rinat Rizvanov
Deterministic gate for ONE already-computed polygenic score result and ONE person: returns SUPPORTED (raw score, standardised score and reference percentile…
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
pride-fetch
Nikolai Hecker, UK Dementia Research Institute
Query metadata and download data from the PRIDE Archive, EMBL-EBI's proteomics identifications database, via the PRIDE Archive REST API v3.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
wgs-prs
David de Lorenzo
End-to-end WGS to polygenic risk score pipeline.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
biostudies-fetch
Nikolai Hecker, UK Dementia Research Institute
Query metadata and download data from EMBL-EBI BioStudies, the database that describes biological studies and links their data across collections…
SkillAFreshness: A★ 1.2KClaude Code +9
Signals
- Stars
- 1,166
- Forks
- 288
- Open issues
- 27
- Last commit (this folder)
- Oct 10, 2026 (18 days ago)
- Last release
- Sep 11, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 0.1.0
- License
- MIT
- Repository
- github.com/ClawBio/ClawBio
- Website
- clawbio.github.io/ClawBio/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from ClawBio
- 0.822score
ukb-ppp-region-fetch
ClawBio
Fetch a regional slice of plasma pQTL summary statistics from the UK Biobank Pharma Proteomics Project (UKB-PPP; Sun 2023 Nature) for a specific (protein…
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
ancestry-risk-profiler
ClawBio
Infers genetic super-population ancestry from a 23andMe/AncestryDNA file and computes ancestry-stratified odds ratios with an exploratory Ancestry Elevation…
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.822score
eqtl-catalogue-region-fetch
ClawBio
Fetch a region of cis-eQTL summary statistics from EBI eQTL Catalogue v7+ via tabix-on-FTP.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.819score
struct-predictor
ClawBio
Protein structure prediction with Boltz-2 (default) or OpenFold3.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.819score
gwas-lookup
ClawBio
Federated variant lookup across 8 genomic databases — GWAS Catalog, Open Targets, PheWeb (UKB, FinnGen, BBJ), GTEx, and more.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.819score
fine-mapping
ClawBio
Statistical fine-mapping of GWAS loci using SuSiE, SuSiE-inf, and Approximate Bayes Factors to identify credible sets and posterior inclusion probabilities…
SkillAFreshness: A★ 1.2KClaude Code +9
Cite this page
cell-detection skill. Agent Mart. https://agentmart.dev/skills/clawbio-cell-detection (last updated 2026-10-24)