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/tiangzlab/omicsclaw/spatial-preprocessnpx skills add TianGzlab/OmicsClaw --skill spatial-preprocessgit clone --depth 1 https://github.com/TianGzlab/OmicsClawWrote 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/tiangzlab/omicsclaw/spatial-preprocess)<a href="https://agentmods.dev/skills/tiangzlab/omicsclaw/spatial-preprocess"><img src="https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/spatial-preprocess.svg" alt="Measured on agentmods" 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 | $0.00073 | $0.01843 |
| Opus 5 | $0.00036 | $0.00922 |
| Sonnet 5 | $0.00015 | $0.00369 |
| Haiku 4.5 | $0.00007 | $0.00184 |
Grade A, and why
spatial-preprocess 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.
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 — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.
spatial-preprocess
When to use
The user has a spatial AnnData (Visium / Xenium / SpaceRanger output /
generic) — either freshly loaded or coming out of
spatial-raw-processing — and wants the canonical
"QC → filter → normalise → HVG → PCA → neighbours → Leiden" path
producing a downstream-ready processed.h5ad. This is the foundation
skill — most other spatial analyses (spatial-domains,
spatial-de, spatial-genes, spatial-deconv,
spatial-communication, ...) consume its output. Single backend:
scanpy_standard.
For raw FASTQ → matrix conversion use spatial-raw-processing. For
explicit tissue-domain detection (SpaGCN / STAGATE) on top of this
output use spatial-domains.
Inputs & Outputs
Inputs
- Input kinds:
file,directory - Modalities: visium, xenium
- File types:
.h5ad,.h5,.hdf5,.zarr - Expects
obsm:spatial
Outputs
tables/cluster_summary.csvtables/multi_resolution_summary.csvtables/pca_variance_ratio.csvtables/preprocess_run_summary.csvtables/preprocess_spatial_points.csvtables/preprocess_umap_points.csvtables/qc_metric_distributions.csvtables/qc_summary.csvfigures/cluster_size_barplot.pngfigures/leiden_resolution_sweep.pngfigures/pca_variance_curve.pngfigures/qc_metric_distributions.pngfigures/qc_metrics_spatial.pngfigures/spatial_leiden.pngfigures/umap_leiden.pngprocessed.h5adreport.mdresult.json- Processed AnnData (
saves_h5ad) — addsobs:leiden;obsm:spatial,X_pca,X_umap;var:highly_variable;layers:counts - AnnData processing state after success:
preprocessed
Flow
- Load AnnData (
--input) or build a synthetic spatial demo. - Apply tissue preset if
--tissue <preset>is given (overrides default--min-genes/--min-cells/--max-mt-pct/--max-genes). - QC + filter spots / genes; mitochondrial-percentage filter uses
--speciesfor gene prefix (MT-for human,mt-for mouse). - Normalise (CP10k log) → HVG (
--n-top-hvg) → PCA (--n-pcs). - Build neighbour graph (
--n-neighbors) → Leiden at--leiden-resolution. - If
--resolutions a,b,c,...is set, sweep additional Leiden resolutions and write the multi-resolution table. - Save
processed.h5ad, tables, figures,report.md,result.json.
What ships with it
9 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.
- r_visualization/preprocess_publication_template.R 4.8 KB
- r_visualization/README.md 1.7 KB
- references/methodology.md 9.3 KB
- references/output_contract.md 3.1 KB
- references/parameters.md 1.6 KB
- skill.yaml 3.9 KB
- spatial_preprocess.py 41 KB runs code
- tests/__init__.py 0 B runs code
- tests/test_spatial_preprocess.py 9.4 KB runs code
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.
- yesterday First seen · 136 lines · 73 tokens per session scan A ef5f2e8a53a8
spatial-preprocess is a skill published in the GitHub repository TianGzlab/OmicsClaw (160 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 73 tokens to every session and 1,843 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.
Other skills, from other repositories
spatial-preprocessing
Load spatial transcriptomics data (Visium, Xenium, MERFISH, Slide-seq, generic h5ad), perform QC filtering, normalization, HVG selection, PCA, UMAP, and Leiden clustering.
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…
spatial-domain-identification
Identify tissue regions and spatial niches from preprocessed spatial transcriptomics data using Leiden, Louvain, SpaGCN, STAGATE, GraphST, or BANKSY.
protein-design-qc
Protein design quality control, filtering thresholds, and ranking guidance. Use this skill when: (1) Evaluating design quality for binding, expression, or structure, (2) Setting filtering thresholds for pLDDT, ipTM, PAE, (3) Checking sequence liabilities (cysteines, deamidation, polybasic clusters), (4) Creating…
protein-design-qc
Protein design quality control, filtering thresholds, and ranking guidance. Use this skill when: (1) Evaluating design quality for binding, expression, or structure, (2) Setting filtering thresholds for pLDDT, ipTM, PAE, (3) Checking sequence liabilities (cysteines, deamidation, polybasic clusters), (4) Creating…
protein-qc
Quality control metrics and filtering thresholds for protein design. Use this skill when: (1) Evaluating design quality for binding, expression, or structure, (2) Setting filtering thresholds for pLDDT, ipTM, PAE, (3) Checking sequence liabilities (cysteines, deamidation, polybasic clusters), (4) Creating multi-stage…