Agent skill

Sc Velocity Prep

by TianGzlab in TianGzlab/OmicsClaw

Load when generating spliced / unspliced layers from Cell Ranger BAM, FASTQ, STARsolo output, or velocyto loom — the prerequisite for sc-velocity.

Apache-2.0Auto-check passedResearch & Science

Install Sc Velocity Prep

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

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

GitHub CLI
$ gh skill install TianGzlab/OmicsClaw sc-velocity-prep --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/singlecell/scrna/sc-velocity-prep .claude/skills/sc-velocity-prep && 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
sc-velocity-prep
GitHub stars
161
Token cost
~2.1k tokens
SKILL.md length
715 words
Files
7 (incl. references)
Skills in repo
88
Repo updated
First seen
Licence
Apache-2.0

At a glance

Load when generating spliced / unspliced layers from Cell Ranger BAM, FASTQ, STARsolo output, or velocyto loom — the prerequisite for sc-velocity.

  • Works in 6 steps: Resolve --input (Cell Ranger dir /… → For velocyto: locate BAM + barcodes,… → For starsolo: detect existing STARsolo… → …
  • Tasks that involve Bioinformatics
  • SKILL.md covers Use from a step, When to use, Inputs & Outputs and Flow, plus 4 more sections
  • Runs Python scripts from its folder; calls python

What it does

Sc Velocity Prep is an agent skill from TianGzlab/OmicsClaw. Load when generating spliced / unspliced layers from Cell Ranger BAM, FASTQ, STARsolo output, or velocyto loom — the prerequisite for sc-velocity. Skip when AnnData already has spliced+unspliced layers (use sc-velocity); any non-velocity preprocessing (use sc-preprocessing).

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `references/methodology.md`, `references/output_contract.md` and `references/parameters.md`).

It sits in Research & Science, covering Bioinformatics. It works with AnnData. 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

  • “/sc-velocity-prep”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Resolve --input (Cell Ranger dir / STARsolo dir / FASTQ / .loom).
  2. For velocyto: locate BAM + barcodes, validate --gtf (or auto-pick from resources/singlecell/references/gtf/), run velocyto run, load .loom.
  3. For starsolo: detect existing STARsolo Velocyto output and load directly, OR re-run STARsolo Velocyto with --reference + --chemistry +…
  4. Optionally merge layers into --base-h5ad.
  5. Compute layer totals (tables/velocity_layer_summary.csv) and top-gene balance.
  6. Save processed.h5ad, tables, figures, report.md, result.json.

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), 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

Sc Velocity Prep loads about 2.1k tokens when it runs, and up to ~5.3k if it reads all its reference files. Until then it costs about 73 tokens; SKILL.md has 715 words of instructions outside code blocks.

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

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). 715 words, ~2,072 tokens.

Download SKILL.mdSave it as .claude/skills/sc-velocity-prep/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
sc-velocity-prep
description
Load when generating spliced / unspliced layers from Cell Ranger BAM, FASTQ, STARsolo output, or velocyto loom — the prerequisite for sc-velocity. Skip when AnnData already has spliced+unspliced layers (use sc-velocity); any non-velocity preprocessing (use sc-preprocessing).
trigger
RNA velocity prep, prepare spliced unspliced layers, velocyto, starsolo velocyto, velocity-ready AnnData
tags
singlecell, scrna, velocity-prep, velocyto, starsolo, spliced-unspliced

sc-velocity-prep

Use from a step

This is CLI_ONLY: it runs external preparation tools or imports their files.

python
from skills._sdk.notebook import run_cli

run_cli("sc-velocity-prep", "--input", "data/velocity.loom",
        "--base-h5ad", "data/clustered.h5ad",
        inputs=["data/velocity.loom", "data/clustered.h5ad"])

The demo splits PBMC3k counts into fixed 82% spliced, 14% unspliced and 4% ambiguous layers. It checks packaging, not velocity biology or external tool installation. There is no _api.py for this skill.

When to use

The user has raw Cell Ranger output (BAM + barcodes), STARsolo output, or paired FASTQs and needs an AnnData with layers["spliced"] / layers["unspliced"] (and optional layers["ambiguous"]) before running sc-velocity. Two backends:

  • velocyto (default) — runs velocyto run against a Cell Ranger BAM using a GTF. Produces a .loom and reads it back into AnnData.
  • starsolo — re-runs alignment from FASTQ via STARsolo with the Velocyto solo subworkflow, or loads existing STARsolo Velocyto output directly when detected.

--base-h5ad lets you merge the velocity layers into an already-processed AnnData (preserves obs / obsm / clustering).

For velocity estimation itself use sc-velocity. For non-velocity scRNA preprocessing use sc-preprocessing.

Inputs & Outputs

Inputs

  • Input kinds: file, directory
  • Modalities: scrna
  • File types: .loom, .fastq, .fq
  • FASTQ structure: valid first record; paired layout
  • Directory layouts (any): paired-fastq, cellranger-output, starsolo-velocity

Outputs

  • tables/top_velocity_genes.csv
  • tables/velocity_layer_summary.csv
  • figures/velocity_gene_balance.png
  • figures/velocity_layer_fraction.png
  • figures/velocity_layer_summary.png
  • figures/velocity_top_genes_stacked.png
  • processed.h5ad
  • velocity_input.h5ad
  • figures/manifest.json, figure_data/manifest.json, plot-data CSV files
  • reproducibility/commands.sh, reproducibility/requirements.txt
  • Conditional backend artifacts under artifacts/; imported loom/STARsolo inputs do not create new BAM files.
  • report.md
  • result.json
  • Processed AnnData — spliced, unspliced layers; ambiguous only when supplied by the source

Flow

  1. Resolve --input (Cell Ranger dir / STARsolo dir / FASTQ / .loom).
  2. For velocyto: locate BAM + barcodes, validate --gtf (or auto-pick from resources/singlecell/references/gtf/), run velocyto run, load .loom.
  3. For starsolo: detect existing STARsolo Velocyto output and load directly, OR re-run STARsolo Velocyto with --reference + --chemistry + auto-detected --whitelist.
  4. Optionally merge layers into --base-h5ad.
  5. Compute layer totals (tables/velocity_layer_summary.csv) and top-gene balance.
  6. Save processed.h5ad, tables, figures, report.md, result.json.

Gotchas

  • BAM-backed velocyto needs a GTF. sc_velocity_prep.py raises ValueError("BAM-backed velocyto preparation requires a GTF file. Pass --gtf /abs/path/to/genes.gtf, or keep one under resources/singlecell/references/gtf/. ..."). Auto-detection only fires if a project-local GTF lives at the recommended path.
  • FASTQ-backed STARsolo needs a STAR index AND explicit chemistry. sc_velocity_prep.py raises ValueError("FASTQ-backed STARsolo velocity preparation requires a STAR genome directory. ...") if --reference is missing and nothing's at resources/singlecell/references/starsolo/. sc_velocity_prep.py raises ValueError("FASTQ-backed STARsolo velocity preparation requires an explicit --chemistry.") when --chemistry auto is left as the default — STARsolo cannot infer 10x v2 vs v3 vs v4 from FASTQ alone.
  • STARsolo whitelist is auto-guessed; missing → hard fail. sc_velocity_prep.py raises ValueError("Could not infer a compatible STARsolo whitelist. Pass --whitelist /abs/path/to/3M-february-2018.txt, or keep the whitelist under resources/singlecell/references/whitelists/. ..."). The guesser uses the reference path + chemistry; a non-standard reference layout breaks it.
  • STARsolo Velocyto matrix loader has a fallback for index-name quirks. sc_velocity_prep.py is documented as "with a local fallback for index-name quirks"; _load_starsolo_velocyto_dir_safe raises FileNotFoundError(f"Could not locate STARsolo Velocyto matrices under: {path}") when nothing matches even with the fallback. Common when STARsolo finished partial / was killed mid-run.
  • --input mandatory unless --demo (parser.error, exit code 2). sc_velocity_prep.py calls parser.error("--input required when not using --demo"). Once provided, main raises FileNotFoundError(f"Input path not found: {input_path}") for a missing path.
  • --method choices are exactly velocyto / starsolo. sc_velocity_prep.py declares the choices via argparse; kb-python is mentioned in upstream-prep docstrings but is not a valid --method value here. Use the dedicated kb-python tooling outside OmicsClaw if you need that path.
  • sc_velocity_prep.py:main defaults to eight threads. Reference directories named in error messages are suggestions, not shipped assets. Verify the velocyto command can import before a long BAM run; migration preflight found undefined symbol: __log10_finite in the installed copy despite its presence on PATH.
  • sc_velocity_prep.py:main writes a new .raw snapshot and records .X as raw counts even when --base-h5ad contains normalized .X. _lib/upstream.py:merge_velocity_layers also replaces layers["counts"] with the velocity input's counts (the sum of its available splicing layers for imported data). Inspect this existing contract mismatch before treating the merged object's .X or .raw as counts; the spliced/unspliced layers remain separate.
Show full SKILL.md (81 more words)Show less

Key CLI

bash
# Demo (proportional PBMC3k layers; no velocyto / STARsolo)
python skills/singlecell/scrna/sc-velocity-prep/sc_velocity_prep.py --demo --output /tmp/sc_velo_prep_demo

# velocyto from a Cell Ranger run (BAM-backed)
python skills/singlecell/scrna/sc-velocity-prep/sc_velocity_prep.py \
  --input /data/cellranger_run/ --output results/ \
  --method velocyto --gtf /refs/Homo_sapiens.GRCh38.gtf

# Load existing STARsolo Velocyto output directly
python skills/singlecell/scrna/sc-velocity-prep/sc_velocity_prep.py \
  --input /data/starsolo_run/ --output results/ \
  --method starsolo

# Re-run STARsolo from FASTQ (chemistry must be explicit)
python skills/singlecell/scrna/sc-velocity-prep/sc_velocity_prep.py \
  --input /data/fastqs/ --output results/ \
  --method starsolo --reference /refs/star_index --chemistry 10xv3

# Merge velocity layers into an existing processed AnnData
python skills/singlecell/scrna/sc-velocity-prep/sc_velocity_prep.py \
  --input /data/cellranger_run/ --output results/ \
  --method velocyto --gtf /refs/Homo_sapiens.GRCh38.gtf \
  --base-h5ad /path/to/clustered.h5ad

See also

  • references/parameters.md — every CLI flag, per-backend tunables
  • references/methodology.md — when velocyto vs STARsolo wins; whitelist conventions
  • references/output_contract.md — layers["spliced"] / layers["unspliced"] / layers["ambiguous"] schema
  • Adjacent skills: sc-count / sc-multi-count (upstream — produce the Cell Ranger / STARsolo output this skill consumes), sc-velocity (downstream — consumes layers["spliced"] + layers["unspliced"]), sc-clustering (parallel — pass clustered output as --base-h5ad to keep clusters when adding velocity layers)

Dependencies

Python packages this skill's script needs. They are not installed for you — check before a long run.

anndata, matplotlib, numpy, pandas, scanpy, scipy, seaborn

© 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 6 other files (references) in skills/singlecell/scrna/sc-velocity-prep of TianGzlab/OmicsClaw.

  • SKILL.md
  • references/methodology.md
  • references/output_contract.md
  • references/parameters.md
  • references/r_visualization.md
  • sc_velocity_prep.py
  • tests/test_sc_velocity_prep.py

Open the folder on GitHubat commit 90a3bec

Compare with similar skills

Sc Velocity Prep 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.

Sc Velocity Prep compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sc Velocity Prep this skillTianGzlab/OmicsClaw161—~2.1kAutomated safety check: PassApache-2.0
Scanpy Single-Cell Analysisdavila7/claude-code-templates32k15 repos~2.8kAutomated safety check: PassMIT
ScgptJimLiu/science-skills2274 repos~1.3kAutomated safety check: PassApache-2.0
PyDESeq2 Differential Expressiondavila7/claude-code-templates32k11 repos~4kAutomated safety check: PassMIT
Anndatadavila7/claude-code-templates32k11 repos~2.5kAutomated safety check: PassMIT
Single-Cell Initial AnalysisLigphiDonk/Oh-my--paper7381 repos~1.4kAutomated safety check: PassMIT

Similar skills

  • Scanpy Single-Cell Analysis

    davila7/claude-code-templates

    Walks through single-cell RNA-seq analysis with Scanpy: loading .h5ad and 10X data, QC, normalization, PCA and UMAP, Leiden clustering, marker genes and cell type annotation.

    32k GitHub starsUsed in 15 repos~2.8k tokens
    Research & ScienceAuto-check passed
  • Scgpt

    JimLiu/science-skills

    Embed and annotate single-cell expression data with scGPT, a foundation model for single-cell biology.

    227 GitHub starsUsed in 4 repos~1.3k tokens
    Research & ScienceAuto-check passed
  • 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 11 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 11 repos~2.5k tokens
    Research & ScienceAuto-check passed
  • Single-Cell Initial Analysis

    LigphiDonk/Oh-my--paper

    Runs a seven-step quality-control and exploration pipeline on scRNA-seq, CyTOF or flow cytometry data and writes a plain-language report of what it found.

    738 GitHub starsUsed in 1 repo~1.4k tokens
    Research & ScienceAuto-check passed
  • Single Cell Data Prep Qc

    harrisongzhang/TheVirtualBiotech

    Single-cell RNA-seq data preparation and quality control pipeline.

    121 GitHub stars~2.9k tokensUpdated 22 days ago
    Research & ScienceAuto-check passed

More from TianGzlab/OmicsClaw

All 88 skills in this repo
  • 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 2 days ago
    Auto-check passed
  • Bulkrna Batch Correction

    TianGzlab/OmicsClaw

    Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation.

    161 GitHub stars~1.2k tokensUpdated 2 days ago
    Auto-check passed
  • Bulkrna Coexpression

    TianGzlab/OmicsClaw

    Load when discovering bulk gene co-expression modules and hub genes with R WGCNA.

    161 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed
  • Bulkrna De

    TianGzlab/OmicsClaw

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

    161 GitHub stars~867 tokensUpdated 2 days ago
    Auto-check passed
  • Bulkrna Deconvolution

    TianGzlab/OmicsClaw

    Load when estimating cell-type proportions in bulk RNA-seq samples from a single-cell or signature-matrix reference.

    161 GitHub stars~757 tokensUpdated 2 days ago
    Auto-check passed
  • Bulkrna Enrichment

    TianGzlab/OmicsClaw

    Load when running pathway / GO term enrichment on a bulk RNA-seq DE result list.

    161 GitHub stars~860 tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Sc Velocity Prep

What does Sc Velocity Prep do?

Load when generating spliced / unspliced layers from Cell Ranger BAM, FASTQ, STARsolo output, or velocyto loom — the prerequisite for sc-velocity. Sc Velocity Prep is an agent skill from TianGzlab/OmicsClaw. Load when generating spliced / unspliced layers from Cell Ranger BAM, FASTQ, STARsolo output, or velocyto loom — the prerequisite for sc-velocity.

When should I use Sc Velocity Prep?

Sc Velocity Prep fits situations like: tasks that involve Bioinformatics.

How do I install Sc Velocity Prep in Claude Code?

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

How do I install Sc Velocity Prep in Codex?

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

Can I use Sc Velocity Prep 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 sc-velocity-prep -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sc-velocity-prep, .gemini/skills/sc-velocity-prep, .github/skills/sc-velocity-prep and .opencode/skills/sc-velocity-prep in your project.

What does Sc Velocity Prep need to run?

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

Does Sc Velocity Prep 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 Sc Velocity Prep 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 Sc Velocity Prep use?

Sc Velocity Prep 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 Sc Velocity Prep use?

About 2.1k tokens (SKILL.md is roughly 8.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.3k tokens, read only when the agent opens those files.

What are the alternatives to Sc Velocity Prep?

Skills that share tags, products or a category with Sc Velocity Prep: Scanpy Single-Cell Analysis (davila7/claude-code-templates, 32k stars), Scgpt (JimLiu/science-skills, 227 stars), PyDESeq2 Differential Expression (davila7/claude-code-templates, 32k stars) and Anndata (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sc Velocity Prep?

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.