spatial-integrate

spatial-integrate is a skill for Claude Code, Codex from TianGzlab/OmicsClaw. It costs 50 tokens per session (1,198 once invoked), scanned A, original, Apache-2.0.

A tool for reducing batch effects between spatial transcriptomics samples. Batch effects are unwanted differences caused by separate experiments, samples, or processing runs rather than biology.

In plain words
What is it for?
Use it on multi-sample AnnData data with Harmony, BBKNN, or Scanorama to create a corrected expression space or neighbour graph.
Why use it?
It makes expression-based comparisons across samples more reliable before clustering, domain detection, or differential-expression analysis.

Skill for Claude CodeCodex

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

Good fit Use it on multi-sample AnnData data with Harmony, BBKNN, or Scanorama to create a corrected expression space or neighbour graph.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tiangzlab/omicsclaw/spatial-integrate
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 TianGzlab/OmicsClaw --skill spatial-integrate
Clone the repo
git clone --depth 1 https://github.com/TianGzlab/OmicsClaw

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tiangzlab/omicsclaw/spatial-integrate"><img src="https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/spatial-integrate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,198 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 3
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
How audits are shown
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.00050 $0.01198
Opus 5.5 $0.00020 $0.00479
Sonnet 5.5 $0.00010 $0.00240
Haiku 4.5 $0.00005 $0.00120

Measured 14d ago against content hash 27c6dc4b425c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

spatial-integrate 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 14d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (_api.py, examples/example_step.py, spatial_integrate.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-integrate/SKILL.md · 119 lines

How it starts

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

spatial-integrate

Use from a step

from skills._sdk.notebook import load_skill, read_input, write_output
library = load_skill("spatial-integrate")
adata = read_input("data/multi_sample.h5ad")
adata = library.integrate(adata, batch_key="sample")
write_output(adata, "intermediate/integrated.h5ad")

When to use

Correct expression-space batch effects after spatial-preprocess. Harmony and Scanorama add corrected PCA-based embeddings; BBKNN replaces the neighbor graph. None aligns tissue coordinates or changes the expression matrix.

Inputs & Outputs

Input: preprocessed AnnData with obsm["X_pca"] and at least two labels in obs["batch"] (or the chosen batch_key). Functions return AnnData, tables and figures without writing files; see API below.

CLI writes processed.h5ad, report.md, result.json, batch-size and integration tables, and the comparison gallery. The complete file inventory and generation conditions are in references/output_contract.md. Harmony adds X_pca_harmony; Scanorama adds X_scanorama; BBKNN changes obsp["distances"] and obsp["connectivities"].

Key CLI

python skills/spatial/spatial-integrate/spatial_integrate.py \
  --input multi_sample.h5ad --output results/integration --method harmony --batch-key sample
python skills/spatial/spatial-integrate/spatial_integrate.py --demo --output /tmp/spatial_integrate

Use examples/example_step.py for load_skill, saved objects and replay. references/parameters.md lists the CLI method flags.

Gotchas

  • X_pca must exist before integration; no normalization is performed here.
  • X_scanorama is a corrected PCA-based embedding, not corrected gene expression.
  • batch_entropy_after measures local mixing, not biological preservation; inspect condition and cell-type structure before choosing a correction.
  • The function's seed controls Harmony, neighbors, UMAP and Leiden. BBKNN's default Annoy matching and Scanorama's wrapper expose no seed here; cross-version matching can vary. The installed versions passed repeat CLI checks.
  • run_info(adata, keep=False) removes only library diagnostics. The CLI keeps its existing uns["spatial_integration"] summary.
  • X_umap_before_integration and X_umap_after_integration preserve both views.

Read the full file on GitHub · 119 lines

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. 14d ago Changed · -19 lines · -12 tokens per session 27c6dc4b425c
  2. 1mo ago First seen · 138 lines · 62 tokens per session scan A 178c01bb5412

Subscribe to this mod's changes

spatial-integrate is a skill published in the GitHub repository TianGzlab/OmicsClaw (161 stars, last pushed 14d ago), licensed Apache-2.0. It adds 50 tokens to every session and 1,198 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-09-03.

Related

Other skills, from other repositories

spatial-omics-integrate

Integrate two aligned spatial omics modalities on the same cells using SpatialGlue or SpaDDM. Standard input contract: --input --omics2 . Supports demo mode and validated modality pairs such as RNA+Protein and RNA+ATAC.

ShangBioLab/SpatialClaw · 70 tokens

spatial-integration

Multi-sample integration and batch correction for spatial transcriptomics data.

ShangBioLab/SpatialClaw · 18 tokens

spatial-multi-sample-integration

Multi-sample spatial transcriptomics integration and batch correction with automatic method selection (STAligner, Harmony, BBKNN, Scanorama) and robust fallback.

ShangBioLab/SpatialClaw · 41 tokens

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…

synthetic-sciences/openscience · 68 tokens

cellxgene-census-query

Query CZ CELLxGENE Census (61M+ cells). Filter by cell type/tissue/disease, retrieve expression data, and integrate with scanpy/PyTorch for population-scale single-cell analysis. Use this skill when: (1) Querying single-cell expression data by cell type, tissue, or disease, (2) Exploring available single-cell datasets…

PharMolix/OpenBioMed · 105 tokens

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…

PharMolix/OpenBioMed · 85 tokens