spatial-annotate

spatial-annotate is a skill for Claude Code, Codex from TianGzlab/OmicsClaw. It costs 71 tokens per session (1,923 once invoked), scanned A, original, Apache-2.0.

A workflow for assigning a cell-type label to each spatial transcriptomics spot. It uses marker genes or maps the spots to a labelled single-cell reference, where marker genes are genes known to identify a cell type.

In plain words
What is it for?
Use it to label spots as cell types in Xenium, MERFISH, Slide-seq, or Visium data when you need discrete labels rather than cell-type proportions.
Why use it?
It turns an unlabelled spatial dataset into one that can be examined by cell type. It supports both direct marker-based labelling and reference-based methods.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/tiangzlab/omicsclaw/spatial-annotate
Any agent
npx skills add TianGzlab/OmicsClaw --skill spatial-annotate
Clone the repo
git clone --depth 1 https://github.com/TianGzlab/OmicsClaw

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for spatial-annotate

README.md
[![agentmods](https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/spatial-annotate.svg)](https://agentmods.dev/skills/tiangzlab/omicsclaw/spatial-annotate)
Your own site
<a href="https://agentmods.dev/skills/tiangzlab/omicsclaw/spatial-annotate"><img src="https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/spatial-annotate.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,923 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00071 $0.01923
Opus 5 $0.00036 $0.00962
Sonnet 5 $0.00014 $0.00385
Haiku 4.5 $0.00007 $0.00192

Measured yesterday against content hash bea087e528c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spatial-annotate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 2 executable files (spatial_annotate.py, tests/test_spatial_annotate.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/spatial/spatial-annotate/SKILL.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

spatial-annotate

When to use

The user has a single-cell-per-spot spatial AnnData (Xenium / MERFISH / Slide-seq) OR wants a discrete per-spot label even for Visium and has either marker genes or a labelled scRNA reference. Four methods:

  • marker_based (default) — built-in marker dictionaries (--species, --marker-n-genes, --marker-padj-cutoff); optional custom marker model via --model. No reference needed.
  • tangram — gradient mapping from a labelled scRNA reference (--tangram-num-epochs, --tangram-train-genes, --tangram-device). Requires tangram + torch.
  • scanvi — scvi-tools scANVI semi-supervised classifier (--scanvi-n-hidden / --scanvi-n-latent / --scanvi-n-layers, --scanvi-max-epochs). Requires scvi-tools + torch.
  • cellassign — Bayesian probabilistic assignment with marker matrix (--cellassign-max-epochs).

For proportion deconvolution on Visium-style multi-cell spots use spatial-deconv. For tissue domains use spatial-domains.

Inputs & Outputs

Inputs

  • File types: .h5ad
  • Requires a preprocessed AnnData (X normalised, PCA/neighbours present)
  • Expects obsm: spatial

Outputs

  • tables/annotation_cell_type_counts.csv
  • tables/annotation_probabilities.csv
  • tables/annotation_spatial_points.csv
  • tables/annotation_summary.csv
  • tables/annotation_umap_points.csv
  • tables/cell_type_assignments.csv
  • tables/cluster_annotations.csv
  • tables/marker_overlap_scores.csv
  • figures/annotation_confidence_histogram.png
  • figures/annotation_confidence_spatial.png
  • figures/annotation_probability_heatmap.png
  • figures/cell_type_barplot.png
  • figures/cell_type_spatial.png
  • figures/cell_type_umap.png
  • figures/marker_overlap_heatmap.png
  • processed.h5ad
  • report.md
  • result.json
  • Processed AnnData (saves_h5ad) — adds obs: cell_type; obsm: tangram_ct_pred, scanvi_probabilities, cellassign_probabilities

Read the full file on GitHub · 146 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 146 lines · 71 tokens per session scan A bea087e528c6

Subscribe to this mod's changes

spatial-annotate is a skill published in the GitHub repository TianGzlab/OmicsClaw (160 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 71 tokens to every session and 1,923 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.