spatial-trajectory

spatial-trajectory is a skill for Claude Code, Codex from TianGzlab/OmicsClaw. It costs 93 tokens per session (2,004 once invoked), scanned A, original, Apache-2.0.

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…

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/tiangzlab/omicsclaw/spatial-trajectory
Any agent
npx skills add TianGzlab/OmicsClaw --skill spatial-trajectory
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-trajectory

README.md
[![agentmods](https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/spatial-trajectory.svg)](https://agentmods.dev/skills/tiangzlab/omicsclaw/spatial-trajectory)
Your own site
<a href="https://agentmods.dev/skills/tiangzlab/omicsclaw/spatial-trajectory"><img src="https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/spatial-trajectory.svg" alt="Measured on agentmods" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,004 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00093 $0.02004
Opus 5 $0.00046 $0.01002
Sonnet 5 $0.00019 $0.00401
Haiku 4.5 $0.00009 $0.00200

Measured today against content hash 1b5a38add927, 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 today.

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 · 148 lines

How it starts

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

spatial-trajectory

When to use

The user has a preprocessed spatial AnnData (obsm["X_pca"] or neighbour graph populated) and wants pseudotime / branching trajectories. Three backends:

  • dpt (default) — diffusion pseudotime via sc.tl.dpt. Cheap. Tunable --dpt-n-dcs.
  • cellrank — GPCCA macrostates, terminal-state probabilities, fate maps, driver-gene ranking. Tunables --cellrank-n-states, --cellrank-frac-to-keep, --cellrank-schur-components.
  • palantir — waypoint sampling + multi-scale Markov for branch probabilities. Tunables --palantir-num-waypoints, --palantir-knn, --palantir-n-components, --palantir-max-iterations.

Cluster column (--cluster-key) auto-detected from leiden / cell_type / celltype / annotation / cluster / clusters. For RNA-velocity-driven trajectories use spatial-velocity.

Inputs & Outputs

Inputs

  • File types: .h5ad
  • Requires a preprocessed AnnData (X normalised, PCA/neighbours present)
  • Expects obsm: X_pca

Outputs

  • tables/cellrank_driver_genes.csv
  • tables/palantir_branch_probs.csv
  • tables/trajectory_cluster_summary.csv
  • tables/trajectory_diffmap_points.csv
  • tables/trajectory_driver_genes.csv
  • tables/trajectory_fate_probabilities.csv
  • tables/trajectory_fate_probabilities_wide.csv
  • tables/trajectory_genes.csv
  • tables/trajectory_run_summary.csv
  • tables/trajectory_spatial_points.csv
  • tables/trajectory_summary.csv
  • tables/trajectory_terminal_states.csv
  • tables/trajectory_umap_points.csv
  • figures/cellrank_fate_circular.png
  • figures/cellrank_fate_heatmap.png
  • figures/cellrank_fate_map.png
  • figures/cellrank_gene_trends.png
  • figures/trajectory_cluster_summary.png
  • figures/trajectory_diffmap.png
  • figures/trajectory_entropy_distribution.png
  • figures/trajectory_fate_probability_distribution.png
  • figures/trajectory_genes_barplot.png
  • figures/trajectory_pseudotime_distribution.png
  • figures/trajectory_pseudotime_embedding.png
  • figures/trajectory_pseudotime_spatial.png
  • processed.h5ad
  • report.md
  • result.json
  • Processed AnnData (saves_h5ad) — adds obs: dpt_pseudotime, traj_terminal_state, traj_fate_max_prob, traj_fate_entropy, palantir_pseudotime, palantir_entropy; obsm: palantir_branch_probs; uns: iroot, palantir_waypoints, palantir_branch_prob_columns

Read the full file on GitHub · 148 lines

Files

What ships with it

8 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. today First seen · 148 lines · 93 tokens per session scan A 1b5a38add927

Subscribe to this mod's changes

spatial-trajectory is a skill published in the GitHub repository TianGzlab/OmicsClaw (160 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 93 tokens to every session and 2,004 once invoked, about $0.0005 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.