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-microenvironment-subsetnpx skills add TianGzlab/OmicsClaw --skill spatial-microenvironment-subsetgit 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-microenvironment-subset)<a href="https://agentmods.dev/skills/tiangzlab/omicsclaw/spatial-microenvironment-subset"><img src="https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/spatial-microenvironment-subset.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.00066 | $0.01690 |
| Opus 5 | $0.00033 | $0.00845 |
| Sonnet 5 | $0.00013 | $0.00338 |
| Haiku 4.5 | $0.00007 | $0.00169 |
Grade A, and why
spatial-microenvironment-subset 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 — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.
spatial-microenvironment-subset
When to use
The user has a labelled spatial AnnData (cell-type or domain labels in
obs[--center-key]) and wants to extract a niche around a chosen cell
population — i.e., the center cells PLUS every spot / cell within a
spatial radius of any center. Output is a downstream-ready AnnData
restricted to that microenvironment.
Single backend (radius-based KD-tree neighbourhood). Two radius modes:
--radius-microns (with --microns-per-coordinate-unit if your
coords aren't in microns) OR --radius-native (in the AnnData's
native coordinate units). Exactly one is required.
For global tissue-domain detection use spatial-domains. For
cross-condition niche comparison use spatial-condition.
Inputs & Outputs
Inputs
- Input kinds:
file,directory - Modalities: visium, xenium
- File types:
.h5ad,.h5,.hdf5,.zarr - Expects
obsm:spatial
Outputs
tables/center_observations.csvtables/label_composition.csvtables/selected_observations.csvtables/selection_summary.csvfigures/microenvironment_selection.pngspatial_microenvironment_subset.h5adreport.mdresult.json- Processed AnnData (
saves_h5ad) — addsobs:microenv_is_center,microenv_role,microenv_within_radius,microenv_nearest_center,microenv_distance_native,microenv_distance_microns
Flow
- Load AnnData (
--input) or build a demo. - Validate radius flags (
parser.erroron≤ 0); resolve--microns-per-coordinate-unitif needed. - Resolve center mask: rows where
obs[--center-key] ∈ --center-values(comma-split). - Build a KD-tree on
obsm["spatial"]; query each center for neighbours within radius. - Optionally restrict neighbour pool to
obs[--target-key] ∈ --target-values. - Build the subset (centers + qualified neighbours; optionally drop centers via
--exclude-centers). - Save subset AnnData with role + distance columns; emit composition / summary tables; render selection figure.
What ships with it
6 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.
- yesterday First seen · 121 lines · 66 tokens per session scan A a64c7dcff26d
spatial-microenvironment-subset is a skill published in the GitHub repository TianGzlab/OmicsClaw (160 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 66 tokens to every session and 1,690 once invoked, about $0.0003 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-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-preprocessing
Load spatial transcriptomics data (Visium, Xenium, MERFISH, Slide-seq, generic h5ad), perform QC filtering, normalization, HVG selection, PCA, UMAP, and Leiden clustering.
spatial-domain-identification
Identify tissue regions and spatial niches from preprocessed spatial transcriptomics data using Leiden, Louvain, SpaGCN, STAGATE, GraphST, or BANKSY.
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.
spatial-niches
Python API skill for spatial niche and tissue microenvironment discovery, characterization, and cross-condition comparison.
pkpd-modeling
Pharmacokinetic and pharmacodynamic modelling and simulation - non-compartmental analysis, compartmental and population PK, PK/PD and exposure-response, TMDD, PBPK orientation, bioequivalence, allometric scaling and first-in-human dose, drug interaction prediction, and Bayesian therapeutic drug monitoring. Use when…