Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/ShangBioLab/SpatialClawnpx agentmods add skills/shangbiolab/spatialclaw/spatial-enrichmentWrote 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-enrichment)<a href="https://agentmods.dev/skills/shangbiolab/spatialclaw/spatial-enrichment"><img src="https://agentmods.dev/badge/skills/shangbiolab/spatialclaw/spatial-enrichment.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.1 | $0.00018 | $0.02075 |
| Opus 5 | $0.00009 | $0.01038 |
| Sonnet 5 | $0.00004 | $0.00415 |
| Haiku 4.5 | $0.00002 | $0.00208 |
Grade A, and why
spatial-enrichment 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 6d 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 — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🧬 Spatial Enrichment
You are Spatial Enrichment, a specialised SPATIALCLAW agent for pathway and gene set enrichment analysis. Your role is to identify over-represented biological pathways in spatially resolved gene expression data.
Why This Exists
- Without it: Users must extract marker genes, format gene lists, and run external enrichment tools manually
- With it: Automated per-cluster enrichment analysis with built-in gene sets and optional GSEA
- Why SPATIALCLAW: Integrates directly with spatial DE results and produces publication-ready enrichment figures
Workflow
- Calculate: Map marker genes against biological networks and knowledge bases.
- Execute: Run over-representation analysis (ORA) or GSEA dynamically.
- Assess: Perform multiple hypothesis testing corrections.
- Generate: Output structured pathway scores and dot plots.
- Report: Tabulate top significantly enriched functions.
Core Capabilities
- Over-representation analysis (ORA): Hypergeometric test on marker genes per cluster
- Built-in gene sets: Curated Hallmark, cell cycle, and immune signature sets — no downloads needed
- Optional gseapy: When available, run full GSEA/Enrichr against MSigDB, GO, KEGG, Reactome
- Per-cluster enrichment: Run enrichment on each cluster's marker genes
- Ranking metric selection: Choose from scores, logfoldchanges, or test statistic for GSEA
- Leading edge extraction: Identify core genes driving enrichment in top pathways
- Multiple databases: GO BP/MF/CC, KEGG, Reactome, MSigDB Hallmark/Oncogenic/Immunologic
GSEA Ranking Metrics
When running GSEA, the ranking metric determines how genes are ordered. Preference order:
| Metric | Column | When to use |
|---|---|---|
| Test statistic | stat |
Best: accounts for both effect size and significance |
| Wilcoxon scores | scores |
Good default: from scanpy's rank_genes_groups |
| Log fold change | logfoldchanges |
Avoid if possible: ignores significance |
What ships with it
2 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.
- 6d ago First seen · 201 lines · 18 tokens per session scan A d6b6e70ac952
spatial-enrichment is a skill published in the GitHub repository ShangBioLab/SpatialClaw (11 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 18 tokens to every session and 2,075 once invoked, about $0.0001 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
bulkrna-enrichment
Load when running pathway / GO term enrichment on a bulk RNA-seq DE result list. Skip when the input is single-cell (use sc-enrichment); the input is spatial (use spatial-enrichment); metabolite pathways (use metabolomics-pathway-enrichment).
spatial-enrichment
Load when running pathway / gene-set enrichment per cluster on a preprocessed spatial AnnData via Enrichr (over-representation), GSEA (preranked), or ssGSEA (per-cell scores). Skip when ranking spatially variable genes (use spatial-genes); comparing pathways across conditions (use spatial-condition).
sc-enrichment
Load when running bulk-style pathway enrichment (ORA / GSEA / GSEA-R / GSVA-R) on a per-group ranked DE / marker list against a gene-set library. Skip when computing per-cell pathway scores in-place (use sc-pathway-scoring); de-novo gene-program discovery (use sc-gene-programs).
metabolomics-pathway-enrichment
Load when running over-representation analysis (ORA) on a metabolite list via Fisher's exact test against a built-in 9-pathway DEMO dictionary, BH-FDR adjusted. Skip when needing real KEGG / Reactome (this skill is demo-only); mummichog / fella topology methods (CLI accepts them but only ORA runs).
proteomics-enrichment
Load when running over-representation analysis (ORA) on a list of proteins via Fisher's exact test against a built-in 8-pathway DEMO dictionary, with BH-FDR correction. Skip when needing a real pathway database (this skill is demo-only) (use bulkrna-enrichment); rank-based GSEA.
kegg-query
Query KEGG database for drug information, pathway analysis, and disease-drug-target discovery. Use this skill when: (1) Looking up drug information including efficacy, targets, metabolism, and interactions, (2) Analyzing metabolic or signaling pathways to retrieve genes, compounds, and modules, (3) Discovering…