Agent skill

Cell Detection

by ClawBio in ClawBio/ClawBio

Cell segmentation in fluorescence microscopy images. An agent skill from ClawBio/ClawBio.

MITAuto-check passedAI & LLM Engineering

Install Cell Detection

skills CLI
$ npx skills add ClawBio/ClawBio --skill cell-detection -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ClawBio/ClawBio cell-detection --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ClawBio/ClawBio.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cell-detection .claude/skills/cell-detection && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cell-detection
GitHub stars
1.2k
Used in
1 other repo
Token cost
~2.1k tokens
SKILL.md length
738 words
Files
4
Skills in repo
104
Repo updated
First seen
Licence
MIT

At a glance

Cell segmentation in fluorescence microscopy images. An agent skill from ClawBio/ClawBio.

  • Works in 4 steps: Segment: Run cpsam on TIFF, CZI, ND2,… → Measure: Extract area, equivalent… → Report: Produce report.md,… → …
  • AI & LLM Engineering work in your project
  • SKILL.md covers Why This Exists, Core Capabilities, Input Formats and Workflow, plus 10 more sections
  • Runs Python scripts from its folder; calls python

What it does

Cell Detection is an agent skill from ClawBio/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.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files (for example `cell_detection.py` and `tests/test_cell_detection.py`).

It sits in AI & LLM Engineering. The repository describes itself as: 🦖 ClawBio - The first bioinformatics-native AI agent skill library. Local-first. Reproducible. Open. Free. The licence is MIT.

When your agent uses it

  • AI & LLM Engineering work in your project

Example prompts

  • “/cell-detection”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  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

What it can do on your machine

Read from SKILL.md and the folder at commit 5e045e3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • doi.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cell Detection loads about 2.1k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 738 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ClawBio/ClawBio at commit 5e045e3, republished under its MIT licence (© ClawBio). 738 words, ~2,079 tokens.

Download SKILL.mdSave it as .claude/skills/cell-detection/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
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.version
0.1.0
metadata.author
ClawBio
metadata.tags
microscopy, segmentation, cellpose, fluorescence, imaging, cell-biology

🔬 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

FormatExtensionNotes
Greyscale TIFF.tif, .tiffH×W — passed directly
2-channel TIFF.tif, .tiffH×W×2 — cytoplasm + nuclear, any order
3-channel TIFF.tif, .tiffH×W×3 — H&E or fluorescence, any order
>3-channel TIFF.tif, .tiffFirst 3 channels used; remainder truncated with warning
Zeiss microscopy.cziReads CZI via czifile and uses CZI axis metadata (CziFile.axes) to map C/Z/Y/X deterministically
Nikon microscopy.nd2Reads ND2 via nd2 and uses ND2 named dimensions (ND2File.sizes) for deterministic C/Z/Y/X mapping
PNG / JPEG.png, .jpg, .jpegGreyscale 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).

Show full SKILL.md (356 more words)Show less

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 Structure

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

Dependencies

  • cellpose>=4.0 — cpsam model
  • tifffile — TIFF I/O
  • czifile>=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 loading
  • numpy — array ops
  • matplotlib — figures
  • scikit-image — regionprops metrics

Safety

  • Local-first: no image data leaves the machine
  • Every report includes the ClawBio medical disclaimer
  • Reproducibility bundle (commands.sh, environment.yml, checksums.sha256) records the exact invocation, dependencies, and output integrity

Integration with Bio Orchestrator

Trigger conditions:

  • Input is a TIFF/PNG/JPG microscopy image
  • User mentions "cellpose", "segment", "cell counting", "microscopy"

Chaining partners:

  • Future: export ROI centroids to spatial transcriptomics workflows

Citations

© ClawBio, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files in skills/cell-detection of ClawBio/ClawBio.

  • SKILL.md
  • cell_detection.py
  • requirements.txt
  • tests/test_cell_detection.py

Open the folder on GitHubat commit 5e045e3

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in ClawBio/ClawBio, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Cell Detection next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cell Detection compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cell Detection this skillClawBio/ClawBio1.2k1 repos~2.1kAutomated safety check: PassMIT
Agent BuildershareAI-lab/learn-claude-code78k6 repos~1.2kAutomated safety check: PassMIT
Add Uint Supportpytorch/pytorch104k2 repos~2.3kAutomated safety check: PassCustom licence
Peft Fine TuningOrchestra-Research/AI-Research-SKILLs13k9 repos~3.1kAutomated safety check: PassMIT
Segment Anything Model GuideOrchestra-Research/AI-Research-SKILLs13k9 repos~3.3kAutomated safety check: PassMIT
1passwordtrpc-group/trpc-agent-go1.8k15 repos~656Automated safety check: PassApache-2.0

Similar skills

  • Agent Builder

    shareAI-lab/learn-claude-code

    Design and build AI agents for any domain. An agent skill from shareAI-lab/learn-claude-code.

    78k GitHub starsUsed in 6 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Add Uint Support

    pytorch/pytorch

    Add unsigned integer (uint) type support to PyTorch operators by updating ATDISPATCH macros.

    104k GitHub starsUsed in 2 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Peft Fine Tuning

    Orchestra-Research/AI-Research-SKILLs

    Parameter-efficient fine-tuning for LLMs using LoRA, QLoRA, and 25+ methods.

    13k GitHub starsUsed in 9 repos~3.1k tokens
    AI & LLM EngineeringAuto-check passed
  • Segment Anything Model Guide

    Orchestra-Research/AI-Research-SKILLs

    Guide to using Meta's Segment Anything Model for zero-shot image segmentation with point, box or mask prompts, or automatic mask generation.

    13k GitHub starsUsed in 9 repos~3.3k tokens
    AI & LLM EngineeringAuto-check passed
  • 1password

    trpc-group/trpc-agent-go

    Set up and use 1Password CLI (op). An agent skill from trpc-group/trpc-agent-go.

    1.8k GitHub starsUsed in 15 repos~656 tokens
    AI & LLM EngineeringAuto-check passed
  • Chroma Vector Database

    Orchestra-Research/AI-Research-SKILLs

    Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.

    13k GitHub starsUsed in 8 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed

More from ClawBio/ClawBio

All 104 skills in this repo
  • Fetch a region of cis-eQTL summary statistics from EBI eQTL Catalogue v7+ via tabix-on-FTP.

    1.2k GitHub starsUsed in 1 repo~4.3k tokens
    Auto-check passed
  • Xena Tcga Gene Query

    ClawBio/ClawBio

    Query TCGA tumor biology through the ucscxenatoolspy API. An agent skill from ClawBio/ClawBio.

    1.2k GitHub stars~4.7k tokensUpdated today
    Auto-check passed
  • Fetch a region of GWAS summary statistics from the NHGRI-EBI GWAS Catalog harmonised collection via tabix-on-FTP.

    1.2k GitHub starsUsed in 1 repo~3.5k tokens
    Auto-check passed
  • Dnasp

    ClawBio/ClawBio

    Population genetics of pre-aligned DNA sequences or multi-sample VCFs using selected DnaSP 6 methods.

    1.2k GitHub stars~5.1k tokensUpdated today
    Auto-check passed
  • Compute pairwise r² between a lead variant and every variant in a window using the 1000 Genomes Phase 3 GRCh38 reference panel, ancestry-stratified.

    1.2k GitHub stars~3.9k tokensUpdated today
    Auto-check passed
  • Ncbi Datasets

    ClawBio/ClawBio

    Download genomes, genes, virus sequences, and taxonomy data from NCBI using the datasets and dataformat CLI tools.

    1.2k GitHub starsUsed in 1 repo~2.8k tokens
    Auto-check passed

Questions about Cell Detection

What does Cell Detection do?

Cell segmentation in fluorescence microscopy images. An agent skill from ClawBio/ClawBio. Cell Detection is an agent skill from ClawBio/ClawBio. Cell segmentation in fluorescence microscopy images.

When should I use Cell Detection?

Cell Detection fits situations like: AI & LLM Engineering work in your project.

How do I install Cell Detection in Claude Code?

Run `npx skills add ClawBio/ClawBio --skill cell-detection -a claude-code`. Or copy the skill folder (skills/cell-detection in ClawBio/ClawBio) into .claude/skills/cell-detection in your project. Claude Code loads it when a task matches its description.

How do I install Cell Detection in Codex?

Run `npx skills add ClawBio/ClawBio --skill cell-detection -a codex`. Or copy the skill folder (skills/cell-detection in ClawBio/ClawBio) into .agents/skills/cell-detection in your project. Codex loads it when a task matches its description.

Can I use Cell Detection in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ClawBio/ClawBio --skill cell-detection -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cell-detection, .gemini/skills/cell-detection, .github/skills/cell-detection and .opencode/skills/cell-detection in your project.

What does Cell Detection need to run?

Going by SKILL.md and its folder, Cell Detection needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Cell Detection access the network?

SKILL.md names 1 domain. As links in the text: doi.org. This is read from the text; nothing was executed.

Is Cell Detection safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cell Detection use?

Cell Detection is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cell Detection use?

About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cell Detection?

Skills that share tags, products or a category with Cell Detection: Agent Builder (shareAI-lab/learn-claude-code, 78k stars), Add Uint Support (pytorch/pytorch, 104k stars), Peft Fine Tuning (Orchestra-Research/AI-Research-SKILLs, 13k stars) and Segment Anything Model Guide (Orchestra-Research/AI-Research-SKILLs, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cell Detection?

ClawBio (a GitHub organization) maintains it in ClawBio/ClawBio, which has 1,154 GitHub stars. The repository holds 104 skills in this directory. The repository was last updated on October 7, 2026.

Source: ClawBio/ClawBio on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.