Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Foundation model-powered spatial transcriptomics analysis leveraging 53M+ spatially resolved cells for cellular architecture modeling and tissue niche discovery.
.claude/skills/nicheformer-spatial-agent/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | -28% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 69% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 1% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 11% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -24% | 0% |
<!--
#
#
-->
The Nicheformer Spatial Agent leverages the Nicheformer foundation model, trained on over 53 million spatially resolved cells, to model cellular architecture and tissue microenvironments with unprecedented accuracy. It enables spatial context-aware cell type annotation, niche discovery, and tissue organization analysis.
| Component | Description | Parameters | |-----------|-------------|------------| | Expression Encoder | Gene expression transformer | ~100M | | Spatial Encoder | Neighborhood graph attention | ~50M | | Fusion Layer | Cross-attention expression + spatial | ~30M | | Pretraining Data | 53M+ spatially resolved cells | Multi-tissue |
| Platform | Coverage | Resolution | |----------|----------|------------| | 10x Xenium | Full support | Subcellular | | MERFISH | Full support | Subcellular | | CosMx | Full support | Subcellular | | Visium | Supported | 55 μm spot | | Slide-seq | Supported | 10 μm bead | | seqFISH+ | Supported | Subcellular | | STARmap | Supported | Subcellular |
User: "Use Nicheformer to identify cellular niches in this tumor spatial transcriptomics dataset."
Agent Action:
bashpython3 Skills/Genomics/Nicheformer_Spatial_Agent/nicheformer_analysis.py \ --spatial_data xenium_tumor.h5ad \ --model_weights nicheformer_pretrained.pt \ --k_neighbors 15 \ --niche_resolution 0.5 \ --reference_atlas tabula_sapiens.h5ad \ --output tumor_niches_analysis/
| Output | Description | Format | |--------|-------------|--------| | Cell Embeddings | Spatial-aware embeddings | .h5ad obsm | | Niche Labels | Cluster assignments | .csv | | Niche Signatures | Defining gene programs | .csv | | Spatial Maps | Visualizations | .png, .pdf | | Interaction Network | Cell-cell edges | .graphml | | Architecture Metrics | Tissue organization scores | .json |
| Niche Category | Examples | Markers | |----------------|----------|---------| | Immune Aggregates | TLS, germinal centers | CD20, CD3, PD1 | | Tumor Core | Hypoxic, proliferative | HIF1A, MKI67 | | Invasion Front | EMT, matrix remodeling | VIM, MMP9 | | Stromal | Fibroblast niches | COL1A1, ACTA2 | | Vascular | Perivascular zones | PECAM1, VWF | | Neural | Nerve-associated | NCAM1, NGF |
Foundation Model:
Spatial Graph Construction:
Transfer Learning:
| Task | Metric | Performance | |------|--------|-------------| | Cell Type Annotation | Accuracy | 92-96% | | Niche Recovery | ARI | 0.85-0.92 | | Cross-Tissue Transfer | F1 | 0.88-0.94 | | Batch Integration | kBET | 0.90+ |
| Metric | Description | Interpretation | |--------|-------------|----------------| | Moran's I | Spatial autocorrelation | Clustering degree | | Ripley's K | Point pattern analysis | Aggregation vs dispersion | | Neighborhood Enrichment | Cell type co-occurrence | Preferential associations | | Connectivity | Graph topology | Tissue organization |
| Domain | Application | |--------|-------------| | Oncology | Tumor microenvironment niches | | Immunology | Tertiary lymphoid structures | | Development | Organ patterning and morphogenesis | | Neuroscience | Brain region architecture | | Pathology | Disease-specific spatial signatures |
AI Group - Biomedical AI Platform
<!-- AUTHOR_SIGNATURE: 9a7f3c2e-MD-BABU-MIA-2026-MSSM-SECURE -->
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 18,656 | 28,175 | +51% | 1 | 1 | 0% | 4,036 | 5,889 | +46% | 0 | 0 | — |
case-02 | fail→fail | 20,483 | 17,023 | -17% | 1 | 1 | 0% | 4,181 | 5,211 | +25% | 0 | 0 | — |
case-03 | fail→fail | 17,862 | 29,239 | +64% | 1 | 1 | 0% | 3,621 | 7,497 | +107% | 0 | 0 | — |
case-04 | fail→pass | 16,878 | 2,850 | -83% | 1 | 1 | 0% | 2,898 | 2,099 | -28% | 0 | 0 | — |
case-10 | pass→pass | 3,606 | 2,106 | -42% | 1 | 1 | 0% | 615 | 1,900 | +209% | 0 | 0 | — |
case-05 | fail→pass | 7,501 | 3,172 | -58% | 1 | 1 | 0% | 1,288 | 2,183 | +69% | 0 | 0 | — |
case-06 | fail→pass | 9,544 | 1,678 | -82% | 1 | 1 | 0% | 1,766 | 1,788 | +1% | 0 | 0 | — |
case-07 | fail→pass | 9,893 | 2,195 | -78% | 1 | 1 | 0% | 1,713 | 1,908 | +11% | 0 | 0 | — |
case-08 | fail→pass | 13,613 | 1,807 | -87% | 1 | 1 | 0% | 2,357 | 1,800 | -24% | 0 | 0 | — |
case-09 | pass→pass | 4,192 | 1,570 | -63% | 1 | 1 | 0% | 752 | 1,817 | +142% | 0 | 0 | — |
case-11 | pass→pass | 7,801 | 1,963 | -75% | 1 | 1 | 0% | 1,286 | 1,920 | +49% | 0 | 0 | — |
case-12 | pass→pass | 10,901 | 2,734 | -75% | 1 | 1 | 0% | 1,841 | 1,872 | +2% | 0 | 0 | — |
case-13 | pass→pass | 15,172 | 5,627 | -63% | 1 | 1 | 0% | 2,807 | 2,533 | -10% | 0 | 0 | — |
case-14 | fail→pass | 9,889 | 1,551 | -84% | 1 | 1 | 0% | 1,847 | 1,757 | -5% | 0 | 0 | — |
case-15 | pass→pass | 15,257 | 9,029 | -41% | 1 | 1 | 0% | 2,644 | 3,166 | +20% | 0 | 0 | — |
case-16 | fail→pass | 15,848 | 4,120 | -74% | 1 | 1 | 0% | 2,891 | 2,216 | -23% | 0 | 0 | — |
case-17 | pass→pass | 11,525 | 3,167 | -73% | 1 | 1 | 0% | 1,723 | 2,077 | +21% | 0 | 0 | — |
case-18 | pass→pass | 8,286 | 3,967 | -52% | 1 | 1 | 0% | 1,421 | 2,180 | +53% | 0 | 0 | — |
case-19 | fail→pass | 9,499 | 1,977 | -79% | 1 | 1 | 0% | 1,575 | 1,799 | +14% | 0 | 0 | — |
case-20 | fail→pass | 12,091 | 1,679 | -86% | 1 | 1 | 0% | 2,109 | 1,821 | -14% | 0 | 0 | — |
case-21 | pass→pass | 16,872 | 11,370 | -33% | 1 | 1 | 0% | 2,587 | 3,929 | +52% | 0 | 0 | — |
case-22 | pass→pass | 18,716 | 15,165 | -19% | 1 | 1 | 0% | 2,605 | 4,122 | +58% | 0 | 0 | — |
case-23 | pass→pass | 16,986 | 12,261 | -28% | 1 | 1 | 0% | 2,981 | 3,775 | +27% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +39 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 7/27/2026 | +30% |
Other measured skills in the registry, with their headline benchmark lift.