mubashermohammed/opencode-bioinfo/cell-detection
Claude Code and agent skill by mubashermohammed/opencode-bioinfo
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install mubashermohammed/opencode-bioinfo/cell-detectionSKILL.md
The same SKILL.md was published earlier as mubashermohammed/opencode-bioinfo/cell-detection.
π¬ 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
- Segment: Run
cpsamon any TIFF, PNG, or JPG fluorescence image - Measure: Extract area, equivalent diameter, centroid, and eccentricity per cell
- Report: Produce
report.md,{stem}_measurements.csv, and histogram figures
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 | |
| 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.
Workflow
- Load image; detect greyscale vs multi-channel
- Prepare β pass 1β3 channels through unchanged; truncate >3 to first 3 with a warning
- Segment with
CellposeModel()β nochannelsargument needed - Metrics via
skimage.measure.regionprops - Figures β overlay + size distribution histogram
- Report β
report.md+{stem}_measurements.csv+ reproducibility bundle (commands.sh,environment.yml,checksums.sha256)
CLI Reference
Demo
Expected output: report.md with ~67 cells detected from a synthetic 512Γ512 blob image (67 blobs generated).
Algorithm / Methodology
- Load image with
tifffile(TIFF) orPIL(PNG/JPG); detect ndim - If >3 channels, truncate to first 3 with a warning
- Instantiate
CellposeModel(gpu=<flag>) - Call
model.eval(img, diameter=<arg_or_None>)β nochannelsarg (cpsam is channel-order invariant) - Extract per-cell stats from
masksviaskimage.measure.regionprops - Save
{stem}_measurements.csv, figures,report.md
Key parameters:
- Model:
cpsam(Cellpose 4.0 unified model β channel-order invariant) - Channels: not passed β cpsam uses the first 3 channels of the input in any order
- Diameter:
Nonetriggers Cellpose auto-estimation
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
Dependencies
cellpose>=4.0β cpsam modeltifffileβ TIFF I/OPillowβ PNG/JPG loadingnumpyβ array opsmatplotlibβ figuresscikit-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
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/clawbio/cell-detection/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mubashermohammed/opencode-bioinfo/cell-detection)