/cell-type-annotation:cell-type-annotationfrom cell-type-annotation
Annotates cell types and states from pre-clustered single-cell/spatial transcriptomics data (AnnData). Gathers marker evidence, runs cross-checks, builds a label hierarchy, and flags low-quality or doublet clusters. Use when users ask to label or identify clusters from scRNA-seq, snRNA-seq, MERSCOPE, Xenium, Visium, or CosMx data.
Ships in cell-type-annotation. 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.
Turn existing clusters into a legible, contestable label hierarchy. You are the annotator: tools produce
evidence, you weigh it, and every label rests on numbers a reader can check. Task scripts call scanpy, decoupler and
the cross-check tools directly; the cell_type_annotation package holds only what they lack: routing, checks, the
label hierarchy, the report and the hierarchy figure.
Paths starting with references/ are in this skill's folder; all others are relative to the task directory.
Elsewhere.
commit_adata;references/methodology.md §2):
Unknown is a result, not a failure.normal, low-quality, cycling, doublet, ...). A cycling
cluster keeps its type.references/methodology.md §2).| File | Covers |
|---|---|
references/methodology.md | gates, termination, cards, sub-clustering, state axis, critics, panel rules |
references/method_selection.md | the routing table (generated from code), why, and a recipe per cross-check |
references/marker_tools.md | between-cluster DE, sibling margins, the curated panel, scores, QC, figures |
references/knowledge_sources.md | the MCPs, Cell Ontology, atlases, the order to consult |
| file | written in | holds |
|---|---|---|
reports/plan.md | stages 1-2 | the data, keys, assay and biology as confirmed; covariates; panel capability; hierarchy and vocabulary; routing result |
results/markers.csv | 2, 3 | signed, sourced curated markers (read_markers) |
reports/assumptions.md | 3 | the Gate A ledger, one block per level, with its sign-off |
results/<table>_<level>.csv | 3 | evidence: markers, sibling margins, panel detection, negative flags, panel gate, cross-check, QC deviation, confidence |
results/labels_<level>.csv | 3 | the call and its reasoning (LABEL_COLUMNS): the single source of truth |
reports/<level>.md | 3 | render_level: overview, open problems, one card per cluster |
figures/ | 3-4 | quick scanpy plots; the final hierarchy PDF |
Resuming: read the task README, plan.md, assumptions.md, the latest labels table and report; continue from there.
At the start, give the user the map: scene-setting, plan, then level by level with a sign-off and a report each, and nothing written to their object until the end.
knowledgebase MCP is required: stop and ask for it if missing. zotero is preferred.
Check both respond (references/knowledge_sources.md).obs, var, obsm keys, layer stats).normalization_fingerprint(X_lognorm). If it is not ok, stop: markers on
mis-normalized data track depth, not identity. Show the verdict; the user fixes the layer or confirms a
non-standard normalization.var_names, switch them in memory to a symbol column
(feature_name, ...; var_names_make_unique()) before QC and markers. Without one, map the marker genes via the
knowledgebase MCP (bc_get_ensembl_id_from_gene_symbol).references/marker_tools.md).reports/plan.md. For a targeted panel, add which expected identities it cannot resolve, because their
canonical markers are off-panel.references/knowledge_sources.md, and write them to results/markers.csv with
sources.routing.evaluate(...) (references/method_selection.md). Record the ranked result.Orient the user each time: "L2 within Neuron: 9 clusters, ~120k cells; scores, one cross-check, the ledger, then a report."
results/markers.csv, including negatives. Run panel_gate;
an uncallable candidate contributes to Unknown.results/ (references/marker_tools.md):
rank_genes_groups and filter_rank_genes_groups;hierarchy_markers sibling margins;negative_marker_flags;qc_deviation.prediction_summary. Its caveat goes into the cards.reports/assumptions.md and get the sign-off (references/methodology.md §2).results/labels_<level>.csv:
Unknown;confidence_proxy.references/methodology.md §7).render_level(...) to reports/<level>.md; check_level(labels, clusters) must return nothing.
Make quick scanpy plots of the level. Plots beyond the skill's (a trajectory, an old-vs-new comparison) go in a
report of their own, never into reports/<level>.md. Present the flagged clusters and pause: the user approves descending, and
into which groups. If more than half the clusters are Unknown, consult the user first.bc_get_term_details on every cl_id: it exists, is current, and fits the label. Reconcile with
the user.obs column per level, keyed <stem>_L<n>_<version>, plus _state and _cl_id companions,
and any sub-cluster key;uns["<key>_colors"];build_hierarchy over the level keys is the nesting check;commit_adata dry run, the user's sign-off on that diff, then yes=True.display_markers picks the canonical markers per
node, and pl.annotation_hierarchy draws them (references/marker_tools.md).What SKILL.md sets; muted values are Claude Code's defaults
cell-type-annotation@quadbio is listed by quadbio/claude-plugins — review the source before installing
npx claudepluginhub quadbio/claude-plugins --plugin cell-type-annotation