cell-curator
This package annotates pre-clustered AnnData and MuData from signed marker
programs, bottom-up markers, ontology checks, reference mappings, and multimodal
evidence. It records uncertainty and preserves Unknown when evidence is
insufficient.
Runs are local and review-gated, and the source object remains unchanged. Writing an
annotated output requires a person to confirm the exact reviewed state. Running cell-curator
requires Python 3.11 or newer and an existing clustering.
Documentation: https://mdmanurung.github.io/cell-curator/
Install
Clone the repository, then install the workflow dependencies:
git clone https://github.com/mdmanurung/cell-curator.git
cd cell-curator
uv sync --frozen --extra workflow
uv run cell-curator --version
Alternatively, install the current wheel from
GitHub Releases:
uv pip install https://github.com/mdmanurung/cell-curator/releases/download/v0.3.0/cell_curator-0.3.0-py3-none-any.whl
The wheel installs the workflow, schemas, templates, and agent skill under
<prefix>/share/cell-curator/. Available extras are workflow, celltypist,
reference-models, census, and scimilarity.
Agent harnesses
The skill and the CLI work the same in Claude Code, Codex, and OpenCode. Install
the CLI once, so every harness can run it:
uv tool install "cell-curator[workflow] @ git+https://github.com/mdmanurung/cell-curator"
Inside this repository nothing else is needed. Codex and OpenCode find the skill
at .agents/skills/cell-curator and read AGENTS.md, and Claude Code reads
CLAUDE.md. To use the skill from any project:
| Harness | Skill | Ask before approvals |
|---|
| Claude Code | /plugin marketplace add https://github.com/mdmanurung/cell-curator, then /plugin install cell-curator@cell-curator | the plugin's hooks/hooks.json |
| Codex | mkdir -p ~/.agents/skills && ln -s "$PWD/skills/cell-curator" ~/.agents/skills/ | copy .codex/rules/cell-curator.rules to ~/.codex/rules/ |
| OpenCode | the same ~/.agents/skills link | merge opencode.json's permission.bash into your config |
The approval rules make the harness ask a person before cell-curator assumptions approve (Gate A) and cell-curator write-back apply, the two commands
that stand in for a human decision.
Agent-guided run
Provide the input path, cluster key, assay representations, biological context,
and available marker programs. For example:
Annotate data/pbmc_clustered.h5ad. The samples are healthy adult human
peripheral blood measured with 10x 3'. Clusters are in obs["leiden"],
log-normalized values in layers["logcounts"], and counts in layers["counts"].
Use the shipped assets/markers/human-pbmc.json. Begin in evidence-only mode and
report marker coherence, uncertainty, and unresolved clusters before proposing labels.
For a complete run on public data, see the
PBMC 3k tutorial.
The agent then follows SKILL.md and the linked analytical
contracts. Interactive and pre-authorized runs produce the same decision ledger.
Python run
For programmatic use, CellCurator exposes the implementation shared by the CLI
and Snakemake workflow:
from cell_curator import CellCurator
cur = CellCurator(
adata=adata, # or path="data/pancreas_clustered.h5ad"
organism="human",
tissue="pancreas",
cluster_key="leiden_1",
markers="markers/pancreas.json",
run_id="pancreas-v1",
output_root="/abs/path/results",
mode="annotation", # or "evidence-only"
developmental_stage="adult",
condition="healthy",
experimental_context="pancreas atlas v1",
)
cur.inspect()
cur.prepare()
cur.plan()
cur.approve_assumptions(reviewer="your-name") # Gate A: you approve the plan's assumptions
The package chooses no label. After the plan, run an annotation-consensus run
(skills/annotation-consensus) with plan/vocabulary.tsv, set
annotation.consensus_directory to its output, and continue with
collect_annotation_level, import_consensus_annotation_level and
finalize_corpus_annotation, or the CLI commands annotation collect-level,
annotation import-consensus and annotation finalize. Write-back requires a person
to confirm it. A worked example on public data is in
skills/annotation-consensus/examples/pbmc3k.
Configure the input