spatial-integration

spatial-integration is a skill for Claude Code, Codex from ShangBioLab/SpatialClaw. It costs 18 tokens per session (1,166 once invoked), scanned A, original, Apache-2.0.

A skill for combining multiple spatial transcriptomics samples into one shared representation while correcting batch effects, which are technical differences between experiments. It offers several correction methods and produces a merged UMAP and mixing measurements.

In plain words
What is it for?
Use it to align several h5ad samples, apply Harmony, BBKNN, or Scanorama correction, and assess the resulting shared embedding.
Why use it?
It helps separate real biological variation from differences introduced by processing samples in different batches.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to align several h5ad samples, apply Harmony, BBKNN, or Scanorama correction, and assess the resulting shared embedding.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shangbiolab/spatialclaw/spatial-integration
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.

Any agent
npx skills add ShangBioLab/SpatialClaw --skill spatial-integration
Clone the repo
git clone --depth 1 https://github.com/ShangBioLab/SpatialClaw

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-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/shangbiolab/spatialclaw/spatial-integration/github.svg)](https://agentmods.dev/skills/shangbiolab/spatialclaw/spatial-integration)
Your own site
<a href="https://agentmods.dev/skills/shangbiolab/spatialclaw/spatial-integration"><img src="https://agentmods.dev/badge/skills/shangbiolab/spatialclaw/spatial-integration/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.

agentmods 80×15 button for spatial-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/shangbiolab/spatialclaw/spatial-integration"><img src="https://agentmods.dev/badge/skills/shangbiolab/spatialclaw/spatial-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,166 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00018 $0.01166
Opus 5.5 $0.00007 $0.00466
Sonnet 5.5 $0.00004 $0.00233
Haiku 4.5 $0.00002 $0.00117

Measured 1mo ago against content hash 978555ec9fd7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

spatial-integration 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.

The scan reads SKILL.md. This mod also ships 2 executable files (spatial_integration.py, tests/test_spatial_integration.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-integration/SKILL.md · 144 lines

How it starts

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

🔗 Spatial Integrate

You are Spatial Integrate, a specialised SPATIALCLAW agent for multi-sample integration and batch effect correction. Your role is to align multiple spatial transcriptomics samples into a shared embedding while preserving biological variation.

Why This Exists

  • Without it: Batch effects dominate PCA/UMAP when combining samples, obscuring true biology
  • With it: Automated batch correction with multiple method options producing a corrected joint embedding
  • Why SPATIALCLAW: Handles the full integration pipeline from multi-sample h5ad to corrected UMAP

Workflow

  1. Calculate: Prepare modalities and sequence representations.
  2. Execute: Run chosen integration mechanism across sample blocks.
  3. Assess: Quantify batch mixing versus bio-preservation.
  4. Generate: Save corrected spatial matrices and compute merged UMAP.
  5. Report: Synthesize report with mixing scoring metadata.

Core Capabilities

  1. Harmony integration: PCA-based iterative correction — fast, robust, always available via harmonypy
  2. BBKNN: Batch-balanced k-nearest neighbours — lightweight, modifies the neighbour graph
  3. Scanorama: Panoramic stitching via mutual nearest neighbours — optional
  4. PCA fallback: When no integration library is available, re-compute PCA and flag batch in metadata

Input Formats

Format Extension Required Fields Example
AnnData (multi-sample) .h5ad X, obs[batch_key] merged_samples.h5ad

CLI Reference

python skills/spatial/spatial-integration/spatial_integration.py \
  --input <merged.h5ad> --output <dir> --batch-key sample_id

python skills/spatial/spatial-integration/spatial_integration.py \
  --input <data.h5ad> --output <dir> --method harmony --batch-key batch

python skills/spatial/spatial-integration/spatial_integration.py --demo --output /tmp/integrate_demo

Example Queries

  • "Run Harmony to integrate my spatial slices"
  • "Correct batch effects across my tissue samples"

Read the full file on GitHub · 144 lines

Files

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.

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. 1mo ago First seen · 144 lines · 18 tokens per session scan A 978555ec9fd7

Subscribe to this mod's changes

spatial-integration is a skill published in the GitHub repository ShangBioLab/SpatialClaw (11 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 18 tokens to every session and 1,166 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

sc-batch-integration

Load when integrating multi-sample scRNA-seq with Harmony, scVI, scANVI, BBKNN, Scanorama, SIMBA, or supported R-backed methods to remove batch effects. Skip when the data is one sample (no batch effect to integrate); upstream merging only (use sc-multi-count).

TianGzlab/OmicsClaw · 70 tokens

spatial-integrate

Load when removing batch effects from multi-batch spatial AnnData with PCA using Harmony, BBKNN, or Scanorama. Skip physical coordinate alignment (use spatial-register) and single-batch data (use spatial-domains).

TianGzlab/OmicsClaw · 50 tokens

batch_integration_advisor

Recommend a batch-integration strategy and explain the tradeoffs for preserving biology versus removing technical effects.

Azealoo/miniAgent · 25 tokens

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…

aristoteleo/PantheonOS · 129 tokens

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…

aristoteleo/PantheonOS · 110 tokens

Spatial Omics Skills Index

Skills for spatial transcriptomics analysis including single-cell to spatial mapping (MOSCOT), 3D visualization (PyVista), and related spatial workflows.

aristoteleo/PantheonOS · 37 tokens