spatial-trajectory

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

A tool for ordering cells along possible developmental paths using trajectory inference and pseudotime, a relative position along a biological process, in spatial transcriptomics data.

In plain words
What is it for?
Use it to calculate diffusion pseudotime, find or set starting cells, test genes associated with progression, and create trajectory maps or continuous cell-order values.
Why use it?
It automates root-cell selection, graph-based ordering, and the addition of tissue location to developmental analyses.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/shangbiolab/spatialclaw/spatial-trajectory
Any agent
npx skills add ShangBioLab/SpatialClaw --skill spatial-trajectory
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-trajectory

README.md
[![agentmods](https://agentmods.dev/badge/skills/shangbiolab/spatialclaw/spatial-trajectory.svg)](https://agentmods.dev/skills/shangbiolab/spatialclaw/spatial-trajectory)
Your own site
<a href="https://agentmods.dev/skills/shangbiolab/spatialclaw/spatial-trajectory"><img src="https://agentmods.dev/badge/skills/shangbiolab/spatialclaw/spatial-trajectory.svg" alt="Measured on agentmods" 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,530 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00018 $0.01530
Opus 5 $0.00009 $0.00765
Sonnet 5 $0.00004 $0.00306
Haiku 4.5 $0.00002 $0.00153

Measured 3d ago against content hash 78e62f4baa6f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spatial-trajectory 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 3d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (spatial_trajectory.py, tests/test_spatial_trajectory.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-trajectory/SKILL.md · 171 lines

How it starts

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

🛤️ Spatial Trajectory

You are Spatial Trajectory, a specialised SPATIALCLAW agent for trajectory inference and pseudotime computation in spatial transcriptomics data. Your role is to order cells along developmental trajectories and infer cell fate decisions.

Why This Exists

  • Without it: Users must manually select root cells, tune diffusion parameters, and integrate spatial context
  • With it: Automated DPT computation with spatial-aware root selection and visualisation
  • Why SPATIALCLAW: Combines pseudotime with spatial coordinates for tissue-level developmental maps

Workflow

  1. Calculate: Map single-cell expression relationships using KNN graphs.
  2. Execute: Embed pseudotime probabilities over topological layout.
  3. Assess: Perform path transition testing.
  4. Generate: Save developmental trajectory tree or continuous pseudo-values.
  5. Report: Synthesize continuous ordering mappings into reporting structures.

Core Capabilities

  1. Diffusion pseudotime (DPT): Built-in scanpy DPT — always available, no extra dependencies
  2. Root cell selection: By specific barcode or automatic (max/min DC1)
  3. Trajectory gene correlation: Spearman correlation with FDR correction to find pseudotime-associated genes
  4. Enhanced CellRank: Multi-kernel support (Velocity+Connectivity, Pseudotime+Connectivity), terminal state identification, fate probabilities, driver gene detection
  5. Optional Palantir: When available, use Palantir for multi-scale diffusion-based pseudotime

Root Cell Selection Strategies

Strategy Parameter Method Best for
Automatic (default) Max DC1 value Quick exploration
By barcode --root-cell Exact cell barcode Precise control

Trajectory Gene Correlation

After pseudotime computation, the system automatically identifies genes whose expression changes along the trajectory:

  • Spearman rank correlation between each gene's expression and pseudotime
  • FDR correction (Benjamini-Hochberg) for multiple testing
  • Returns top genes with direction (increasing or decreasing along trajectory)

Read the full file on GitHub · 171 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. 3d ago First seen · 171 lines · 18 tokens per session scan A 78e62f4baa6f

Subscribe to this mod's changes

spatial-trajectory 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 1,530 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.

Related

Other skills, from other repositories

spatial-trajectory

Load when inferring pseudotime / lineage trajectories on a preprocessed spatial AnnData via DPT (default — diffusion pseudotime), CellRank (terminal-state + fate-probability), or Palantir (waypoint branch probabilities). Skip when the data has spliced/unspliced layers and you want velocity-driven dynamics (use…

TianGzlab/OmicsClaw · 93 tokens

sc-pseudotime

Load when ordering cells along a developmental trajectory in a normalised scRNA AnnData via DPT, Palantir, VIA, CellRank, Slingshot (R), or Monocle3 (R). Skip when ranking marker genes per cluster (use sc-markers); RNA velocity vector fields (use sc-velocity).

TianGzlab/OmicsClaw · 72 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

trajectory-analysis

Single-cell trajectory inference pipeline covering diffusion pseudotime (DPT), PAGA, RNA velocity with scVelo, and fate mapping with CellRank. Use when the user mentions pseudotime, trajectory, lineage, differentiation, RNA velocity, scVelo, CellRank, PAGA, diffusion map, fate probabilities, terminal states…

awslabs/hcls-agent-skills · 141 tokens

bulkrna-trajblend

Load when placing bulk RNA-seq samples on a single-cell reference's pseudotime axis (NNLS deconvolution + nearest-neighbour mapping). Skip when plain cell-type proportions (use bulkrna-deconvolution); native single-cell trajectory inference (use sc-pseudotime).

TianGzlab/OmicsClaw · 65 tokens

sc-consensus-pseudotime

Load when you want a single-cell pseudotime ordering robust to the choice of trajectory method — fanning out DPT/Palantir/VIA from a shared root, rank-aligning them, and voting a consensus pseudotime with per-cell uncertainty. Skip when you have branching multi-lineage trajectories; no defined root.

TianGzlab/OmicsClaw · 74 tokens