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 agentmods add skills/shangbiolab/spatialclaw/spatial-preprocessingnpx skills add ShangBioLab/SpatialClaw --skill spatial-preprocessinggit clone --depth 1 https://github.com/ShangBioLab/SpatialClawWhat 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 | $0.00049 | $0.02487 |
| Opus 5 | $0.00024 | $0.01243 |
| Sonnet 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 2d 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.
- 2d 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 3mo 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. 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-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…
scanpy
Standard single-cell RNA-seq analysis pipeline. Use for QC, normalization, dimensionality reduction (PCA/UMAP/t-SNE), clustering, differential expression, and visualization. Best for exploratory scRNA-seq analysis with established workflows. For deep learning models use scvi-tools; for data format questions use…
Gene Panel Selection Workflow
End-to-end workflow for gene panel design in scRNA-seq and spatial transcriptomics, that should be STRICTLY followed: dataset understanding + smart downsampling + train/test splits, algorithmic selection (HVG/DE/RF/scGeneFit/SpaPROS), optimal sub-panel discovery (ARI vs size), biological completion with a stability…
Developmental Gene Panel Design Workflow
Panel design for DEVELOPING / dynamic systems (embryonic organs, differentiation, regeneration). The target experiment is usually a LATE / terminal stage, but the biology is a trajectory: terminal cell types are end-products of earlier lineage programs. A panel built from the target stage alone resolves terminal…
single-cell-scrna-seq-analysis-scanpy
Complete single-cell RNA-seq analysis workflow built on Scanpy and AnnData. Use this skill when: (1) Loading diverse single-cell data formats (10X, h5ad, CSV), (2) Performing quality control and filtering, (3) Normalization, dimensionality reduction, and clustering, (4) Marker gene identification and cell type…
AR/VR Application Testing
Testing augmented and virtual reality applications including spatial tracking, gesture recognition, performance on headsets, and motion sickness testing.