Agent skill

Spatial Velocity

by TianGzlab in TianGzlab/OmicsClaw

Load when estimating RNA velocity on a spatial AnnData with layers["spliced"] + layers["unspliced"] via scVelo (stochastic / deterministic / dynamical) or veloVI (deep generative).

Apache-2.0Auto-check passedResearch & Science

Install Spatial Velocity

skills CLI
$ npx skills add TianGzlab/OmicsClaw --skill spatial-velocity -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install TianGzlab/OmicsClaw spatial-velocity --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/spatial/spatial-velocity .claude/skills/spatial-velocity && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
spatial-velocity
GitHub stars
161
Token cost
~1.3k tokens
SKILL.md length
515 words
Files
11 (incl. references)
Skills in repo
88
Repo updated
First seen
Licence
Apache-2.0

At a glance

Load when estimating RNA velocity on a spatial AnnData with layers["spliced"] + layers["unspliced"] via scVelo (stochastic / deterministic / dynamical) or veloVI (deep generative).

  • Tasks that involve Bioinformatics
  • SKILL.md covers When to use, Use from a step, API and Methods and parameters, plus 5 more sections
  • Runs Python and R scripts from its folder; calls python

What it does

Spatial Velocity is an agent skill from TianGzlab/OmicsClaw. Load when estimating RNA velocity on a spatial AnnData with layers["spliced"] + layers["unspliced"] via scVelo (stochastic / deterministic / dynamical) or veloVI (deep generative). Skip when input lacks the spliced/unspliced layers (must be quantified upstream by velocyto / kb-python / STARsolo); non-spatial scRNA velocity (use sc-velocity).

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including reference files (for example `_api.py`, `examples/example_step.py` and `r_visualization/README.md`).

It sits in Research & Science, covering Bioinformatics. It works with AnnData and Python. The repository describes itself as: Conversational & memory-enabled AI research partner for multi-omics analysis. CLI + Desktop App (installers in Releases). From biological idea to full research paper. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Bioinformatics

Example prompts

  • “spliced”
  • “unspliced”
  • “/spatial-velocity”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 90a3bec. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python and R), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Spatial Velocity loads about 1.3k tokens when it runs, and up to ~4.8k if it reads all its reference files. Until then it costs about 91 tokens; SKILL.md has 515 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~91
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from TianGzlab/OmicsClaw at commit 90a3bec, republished under its Apache-2.0 licence (© TianGzlab). 515 words, ~1,313 tokens.

Download SKILL.mdSave it as .claude/skills/spatial-velocity/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
spatial-velocity
description
Load when estimating RNA velocity on a spatial AnnData with `layers["spliced"]` + `layers["unspliced"]` via scVelo (stochastic / deterministic / dynamical) or veloVI (deep generative). Skip when input lacks the spliced/unspliced layers (must be quantified upstream by velocyto / kb-python / STARsolo); non-spatial scRNA velocity (use sc-velocity).
trigger
RNA velocity, cellular dynamics, scVelo, VELOVI, latent time, spliced unspliced
tags
spatial, velocity, rna-velocity, scvelo, velovi, dynamics

spatial-velocity

When to use

Estimate velocity from measured spliced/unspliced count layers. Use spatial-trajectory when these layers are absent, or sc-velocity for non-spatial data.

Use from a step

python
from skills._sdk.notebook import load_skill
library = load_skill("spatial-velocity")
library.velocity(adata, method='stochastic')

Run examples/example_step.py with the step runner for a synthetic, executable example.

API

<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
velocity(adata, *, method: str='stochastic', cluster_key: str='leiden', method_params: dict | None=None, random_state: int=0)

Estimate velocity in place from spliced/unspliced count layers.

Preprocessing filters genes, normalizes X and count layers, and builds PCA/neighbors/moments. Optional confidence, pseudotime and latent-time failures are reported in run_info warnings. VELOVI GPU results can vary between runs even with a fixed seed. scVelo velocity pseudotime uses an eigensolver without a seed argument; its results vary between runs.

:param adata: AnnData containing measured spliced and unspliced layers. :param method: stochastic (CLI default), deterministic, dynamical or velovi. :param cluster_key: Annotation used in output summaries; default leiden. :param method_params: CLI options with underscores; None keeps defaults, including velocity_min_shared_counts=30 and velocity_n_pcs=30. See references/parameters.md for method-specific controls. :param random_state: PCA/neighbor and VELOVI training seed, default 0. :returns: The same AnnData with velocity layers, graph and JSON diagnostics. :raises ValueError: Missing layers or invalid method. :raises ImportError: A backend is unavailable; use install_skill_deps.

run_info(adata, *, keep: bool=True) -> dict

Read the last velocity method's diagnostics and metric tables.

:param adata: AnnData returned by velocity. :param keep: True retains diagnostics; False removes them for CLI serialization. :returns: A dictionary with effective method controls and warnings, or empty dict.

cell_metrics(adata) -> pd.DataFrame

Return velocity speed, confidence and pseudotime for each spot.

:param adata: AnnData returned by velocity. :returns: The last run's barcode-indexed cell table, or an empty table.

gene_metrics(adata) -> pd.DataFrame

Return fitted velocity gene parameters and fit quality.

:param adata: AnnData returned by velocity. :returns: The last run's gene-indexed table, or an empty table.

Show full SKILL.md (234 more words)Show less
velocity_figure(adata, *, color: str='velocity_speed', basis: str='spatial')

Plot a numeric velocity metric at spot coordinates without saving.

:param adata: AnnData after velocity inference. :param color: Numeric observation metric; velocity_speed by default. :param basis: Coordinate key, spatial by default; X_umap is also supported. :returns: A matplotlib Figure owned by the caller. :raises KeyError: Missing coordinates or metric.

<!-- api:end -->

Methods and parameters

scVelo supports stochastic (default), deterministic and dynamical fits. VELOVI uses scvi-tools. Pass CLI option names with underscores in method_params; defaults include 30 shared counts, 2000 HVGs, 30 PCs and 30 neighbors. See parameters and methodology.

Gotchas

  • velocity rejects missing layers; it never constructs spliced/unspliced observations from expression.
  • run_info()['warnings'] records optional confidence/pseudotime/latent-time failures.
  • gene_metrics reports fitted parameters; VELOVI marks every retained gene as a velocity gene.
  • scVelo pseudotime uses an unseeded eigensolver; results vary between runs. GPU VELOVI can also vary despite its seed.

Inputs and outputs

velocity modifies X, count layers and the gene subset in place, then adds velocity and moment layers. cell_metrics and gene_metrics return DataFrames; velocity_figure returns a Figure. CLI reports, tables and plots are conditional on fitted metrics and available coordinates. The full file inventory and conditions are in output contract.

CLI

bash
python skills/spatial/spatial-velocity/spatial_velocity.py --input input.h5ad --output results/

The CLI retains reports and the figure gallery. Function calls do not save files.

See also

  • spatial-preprocess supplies expression preprocessing.
  • Output contract lists method-specific files and AnnData fields.

Dependencies

anndata, matplotlib, numpy, pandas, scanpy, scipy, scvelo, scvi-tools, seaborn, torch, velovi

© TianGzlab, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (references) in skills/spatial/spatial-velocity of TianGzlab/OmicsClaw.

  • SKILL.md
  • _api.py
  • examples/example_step.py
  • r_visualization/README.md
  • r_visualization/velocity_publication_template.R
  • references/methodology.md
  • references/output_contract.md
  • references/parameters.md
  • spatial_velocity.py
  • tests/test_api.py
  • tests/test_spatial_velocity.py

Open the folder on GitHubat commit 90a3bec

Compare with similar skills

Spatial Velocity next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Spatial Velocity compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Spatial Velocity this skillTianGzlab/OmicsClaw161—~1.3kAutomated safety check: PassApache-2.0
PyDESeq2 Differential Expressiondavila7/claude-code-templates32k12 repos~4kAutomated safety check: PassMIT
Anndatadavila7/claude-code-templates32k12 repos~2.5kAutomated safety check: PassMIT
GenimlK-Dense-AI/scientific-agent-skills48k2 repos~4kAutomated safety check: NotesMIT
ScanpyK-Dense-AI/scientific-agent-skills48k1 repos~5.1kAutomated safety check: PassBSD-3-Clause
AnndataK-Dense-AI/scientific-agent-skills48k1 repos~3.9kAutomated safety check: NotesBSD-3-Clause

Similar skills

  • PyDESeq2 Differential Expression

    davila7/claude-code-templates

    Runs differential gene expression analysis on bulk RNA-seq counts with PyDESeq2: design formulas, Wald tests, FDR correction and volcano or MA plots.

    32k GitHub starsUsed in 12 repos~4k tokens
    Research & ScienceAuto-check passed
  • Anndata

    davila7/claude-code-templates

    This skill should be used when working with annotated data matrices in Python, particularly for single-cell genomics analysis, managing experimental measurements with metadata, or handling…

    32k GitHub starsUsed in 12 repos~2.5k tokens
    Research & ScienceAuto-check passed
  • Geniml

    K-Dense-AI/scientific-agent-skills

    Supports audited local Geniml genomic-interval workflows: validate BED and universe contracts, plan Region2Vec or scEmbed runs, inspect model/tokenizer compatibility, and assess consensus universes.

    48k GitHub starsUsed in 2 repos~4k tokens
    Research & ScienceAuto-check: notes
  • Scanpy

    K-Dense-AI/scientific-agent-skills

    Performs Scanpy single-cell RNA-seq QC, normalization, HVG selection, PCA/UMAP/t-SNE, clustering, exploratory marker ranking, pseudobulk preparation, visualization, and Seurat or…

    48k GitHub starsUsed in 1 repo~5.1k tokens
    Research & ScienceAuto-check passed
  • Anndata

    K-Dense-AI/scientific-agent-skills

    Handles annotated matrices in single-cell analysis, .h5ad and Zarr files, and integration with the scverse ecosystem.

    48k GitHub starsUsed in 1 repo~3.9k tokens
    Research & ScienceAuto-check: notes
  • Bio Single Cell Data Io

    FreedomIntelligence/OpenClaw-Medical-Skills

    Read, write, and create single-cell data objects using Seurat (R) and Scanpy (Python).

    3.1k GitHub starsUsed in 1 repo~2k tokens
    Research & ScienceAuto-check passed

More from TianGzlab/OmicsClaw

All 88 skills in this repo
  • Bulkrna De

    TianGzlab/OmicsClaw

    Load when comparing gene expression between two conditions in bulk RNA-seq count data.

    161 GitHub starsUsed in 1 repo~867 tokens
    Auto-check passed
  • Bulkrna Cosinor Rhythm

    TianGzlab/OmicsClaw

    Load when the user needs Deterministic fixed-period 24-hour single-component cosinor OLS rhythm analysis for a bulk RNA time-course CSV.

    161 GitHub stars~840 tokensUpdated yesterday
    Auto-check passed
  • Bulkrna Qc

    TianGzlab/OmicsClaw

    Load when checking a bulk RNA-seq count matrix for library-size outliers, gene detection rates, and sample-sample correlation before DE.

    161 GitHub starsUsed in 1 repo~789 tokens
    Auto-check passed
  • Sc Fastq Qc

    TianGzlab/OmicsClaw

    Load when checking raw single-cell FASTQ read quality (Phred / GC / adapter / length) before counting.

    161 GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Sc Filter

    TianGzlab/OmicsClaw

    Load when removing low-quality cells and lowly-detected genes from a single-cell AnnData using QC-derived thresholds or tissue presets.

    161 GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Sc Markers

    TianGzlab/OmicsClaw

    Load when ranking cluster-level marker genes from a clustered single-cell AnnData via Scanpy Wilcoxon / t-test / logreg or COSG specificity.

    161 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Works with

Questions about Spatial Velocity

What does Spatial Velocity do?

Load when estimating RNA velocity on a spatial AnnData with layers["spliced"] + layers["unspliced"] via scVelo (stochastic / deterministic / dynamical) or veloVI (deep generative). Spatial Velocity is an agent skill from TianGzlab/OmicsClaw. Load when estimating RNA velocity on a spatial AnnData with layers["spliced"] + layers["unspliced"] via scVelo (stochastic / deterministic / dynamical) or veloVI (deep generative).

When should I use Spatial Velocity?

Spatial Velocity fits situations like: tasks that involve Bioinformatics.

How do I install Spatial Velocity in Claude Code?

Run `npx skills add TianGzlab/OmicsClaw --skill spatial-velocity -a claude-code`. Or copy the skill folder (skills/spatial/spatial-velocity in TianGzlab/OmicsClaw) into .claude/skills/spatial-velocity in your project. Claude Code loads it when a task matches its description.

How do I install Spatial Velocity in Codex?

Run `npx skills add TianGzlab/OmicsClaw --skill spatial-velocity -a codex`. Or copy the skill folder (skills/spatial/spatial-velocity in TianGzlab/OmicsClaw) into .agents/skills/spatial-velocity in your project. Codex loads it when a task matches its description.

Can I use Spatial Velocity in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TianGzlab/OmicsClaw --skill spatial-velocity -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/spatial-velocity, .gemini/skills/spatial-velocity, .github/skills/spatial-velocity and .opencode/skills/spatial-velocity in your project.

What does Spatial Velocity need to run?

Going by SKILL.md and its folder, Spatial Velocity needs Python and R for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Spatial Velocity access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Spatial Velocity safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Spatial Velocity use?

Spatial Velocity is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Spatial Velocity use?

About 1.3k tokens (SKILL.md is roughly 5.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.4k tokens, read only when the agent opens those files.

What are the alternatives to Spatial Velocity?

Skills that share tags, products or a category with Spatial Velocity: PyDESeq2 Differential Expression (davila7/claude-code-templates, 32k stars), Anndata (davila7/claude-code-templates, 32k stars), Geniml (K-Dense-AI/scientific-agent-skills, 48k stars) and Scanpy (K-Dense-AI/scientific-agent-skills, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Spatial Velocity?

TianGzlab (a GitHub organization) maintains it in TianGzlab/OmicsClaw, which has 161 GitHub stars. The repository holds 88 skills in this directory. The repository was last updated on October 7, 2026.

Source: TianGzlab/OmicsClaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.