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.
npx skills add ShangBioLab/SpatialClaw --skill spatial-preprocessinggit clone --depth 1 https://github.com/ShangBioLab/SpatialClawWrote 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.
[](https://agentmods.dev/skills/shangbiolab/spatialclaw/spatial-preprocessing)<a href="https://agentmods.dev/skills/shangbiolab/spatialclaw/spatial-preprocessing"><img src="https://agentmods.dev/badge/skills/shangbiolab/spatialclaw/spatial-preprocessing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/shangbiolab/spatialclaw/spatial-preprocessing"><img src="https://agentmods.dev/badge/skills/shangbiolab/spatialclaw/spatial-preprocessing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.02487 |
| Opus 5.5 | $0.00020 | $0.00995 |
| Sonnet 5.5 | $0.00010 | $0.00497 |
| Haiku 4.5 | $0.00005 | $0.00249 |
Grade A, and why
spatial-preprocessing 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 1mo ago.
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.
How it starts
The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🔬 Spatial Preprocess
You are Spatial Preprocess, the foundation skill of SPATIALCLAW spatial analysis. Your role is to load multi-platform spatial transcriptomics data and produce a clean, normalised, clustered AnnData ready for all downstream analysis skills.
Why This Exists
- Without it: Users manually write 40+ lines of Scanpy preprocessing code with inconsistent defaults
- With it: One command loads any spatial platform, runs QC, normalises, clusters, and produces a ready-to-analyse h5ad
- Why SPATIALCLAW: Standardised preprocessing ensures reproducibility across all downstream skills
Workflow
- Calculate: Prepare raw counts and assess QC metrics.
- Execute: Run filtering, normalization, and feature selection.
- Assess: Perform PCA and variance evaluation.
- Generate: Save normalized matrices and compute default UMAP.
- Report: Synthesize report with processing metadata and summaries.
Core Capabilities
- Multi-platform loading: Visium (directory/H5/H5AD), Xenium (Zarr/H5), MERFISH, Slide-seq, seqFISH, generic H5AD
- QC filtering: Mitochondrial %, min/max genes thresholds, tissue-specific presets
- Normalization: Library-size normalization + log1p, raw counts preserved in
layers['counts'] - HVG selection: highly variable gene detection on raw counts
- Embedding: PCA with data-driven component suggestion, neighbor graph, UMAP
- Clustering: Leiden community detection with optional multi-resolution exploration
- Tissue presets: Pre-configured QC thresholds for 10 tissue types
Tissue-Specific QC Presets
When --tissue is specified, QC thresholds are automatically applied. Explicit parameters override preset values.
| Tissue | max_mt_pct | min_genes | max_genes | Notes |
|---|---|---|---|---|
| pbmc | 5% | 200 | 2500 | Low MT in blood cells |
| brain | 10% | 200 | 6000 | Neurons have many genes |
| heart | 50% | 200 | 5000 | Cardiomyocytes are MT-rich |
| tumor | 20% | 200 | 5000 | Heterogeneous tissue |
| liver | 15% | 200 | 4000 | Hepatocytes are large |
| kidney | 15% | 200 | 4000 | Tubular cells are MT-active |
| lung | 15% | 200 | 5000 | Mixed cell types |
| gut | 20% | 200 | 5000 | Epithelial turnover |
| skin | 10% | 200 | 4000 | Keratinocyte-rich |
| muscle | 30% | 200 | 5000 | High mitochondrial content |
What ships with it
3 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.
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.
- 1mo ago First seen · 226 lines · 49 tokens per session scan A 1fc652e18d86
spatial-preprocessing is a skill published in the GitHub repository ShangBioLab/SpatialClaw (11 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 49 tokens to every session and 2,487 once invoked, about $0.0002 per session on Opus 5.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-08-30.
Other skills, from other repositories
spatial-preprocess
Load when running the foundational spatial transcriptomics QC + filtering + normalisation + HVG + PCA + neighbour-graph + Leiden pipeline on a Visium / Xenium / generic spatial AnnData. Skip when raw FASTQs need converting first (use spatial-raw-processing); tissue-domain detection on already-preprocessed data (use…
spatial-microenvironment-subset
Load when extracting a niche / microenvironment subset around a center cell-type by spatial radius from a labelled spatial AnnData, producing a smaller AnnData of centers + their within-radius neighbours. Skip when running global tissue-domain detection (use spatial-domains); cross-condition comparison (use…
sc-preprocessing
Load when normalising QC'd scRNA into a PCA-ready AnnData via scanpy / Seurat / SCTransform / Pearson residuals. Skip when QC thresholds are still undecided (use sc-qc); batch correction across samples (use sc-batch-integration).
scatac-preprocessing
Load when preprocessing a single-cell ATAC peak × cell AnnData via Signac-style TF-IDF + LSI + Leiden, producing a clustered UMAP-ready object. Skip when input is fragments; BAM (peak calling not implemented here); scRNA preprocessing (use sc-preprocessing).
spatial-raw-processing
Load when converting spatial transcriptomics raw FASTQ pairs through ST-Pipeline into a rawcounts.h5ad ready for spatial-preprocess. Skip when input is already a count-matrix AnnData (use spatial-preprocess); non-spatial bulk / scRNA FASTQ (use bulkrna-read-qc).
spatial-transcriptomics-spatial-data-io
Load spatial transcriptomics data from Visium, Xenium, MERFISH, Slide-seq, and other platforms using Squidpy and SpatialData. Use this skill when: (1) Loading Visium spatial transcriptomics data from Space Ranger output, (2) Loading Xenium single-cell resolution spatial data, (3) Loading MERFISH, CosMx, or other…