scvi-tools

scvi-tools is a skill for Claude Code, Codex from aipoch/open-science. It costs 100 tokens per session (2,626 once invoked), scanned A, original, Apache-2.0.

A guide to scvi-tools, a Python package for analysing single-cell RNA sequencing data. It covers scVI for combining batches and scANVI for assigning cell-type labels using partly labelled reference data.

In plain words
What is it for?
Use it to combine single-cell datasets, create cell embeddings for clustering, transfer cell labels, and perform Bayesian differential-expression analysis.
Why use it?
It explains how to prepare count data and use these models without confusing batch differences with real biological differences.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

About the project

Open Science is a local-first, model-agnostic workbench for reproducible scientific research. Scientists use its AI agents, Python and R execution, data connectors, and traceable outputs for tasks such as literature review, analysis, simulation, and visualization across macOS, Windows, and Linux.

aipoch/open-science · 3,528 stars · on GitHub · aipoch.com

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/aipoch/open-science/scvi-tools
Any agent
npx skills add aipoch/open-science --skill scvi-tools
Clone the repo
git clone --depth 1 https://github.com/aipoch/open-science

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 scvi-tools

README.md
[![agentmods](https://agentmods.dev/badge/skills/aipoch/open-science/scvi-tools.svg)](https://agentmods.dev/skills/aipoch/open-science/scvi-tools)
Your own site
<a href="https://agentmods.dev/skills/aipoch/open-science/scvi-tools"><img src="https://agentmods.dev/badge/skills/aipoch/open-science/scvi-tools.svg" alt="Measured on agentmods" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,626 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.1 $0.00100 $0.02626
Opus 5 $0.00050 $0.01313
Sonnet 5 $0.00020 $0.00525
Haiku 4.5 $0.00010 $0.00263

Measured 6d ago against content hash 6cb6c7b206c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

scvi-tools 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 6d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (kernel.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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

resources/skills/scvi-tools/SKILL.md · 188 lines

How it starts

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

scvi-tools — scVI / scANVI

scvi-tools (Gayoso et al. 2022, github.com/scverse/scvi-tools, BSD-3-Clause) wraps a family of deep generative models for single-cell omics. The scRNA-seq core is scVI (unsupervised batch-corrected latent embedding) and scANVI (scVI + a classifier head for semi-supervised cell-type label transfer). Both expect raw integer UMI counts and emit a low-dimensional X_scVI / X_scANVI that drops into the scanpy neighbors → leiden → umap pipeline.

Setup (any agent, no API key)

This is a pure skillkernel.py is deterministic Python and you (the base model) do all the reasoning. There is no host runtime and no LLM API. The only helper here is h5ad_safe_obs, which coerces an obs/var frame so anndata.write_h5ad() succeeds. Load it once per session in a Python cell:

exec(open("scvi-tools/kernel.py").read())   # path to this skill's kernel.py

Nothing auto-loads it outside Claude Science. Then call h5ad_safe_obs(...) directly. If it raises NameError, you haven't exec'd kernel.py.

Dependencies: pip install scvi-tools scanpy anndata. Training needs a CUDA-capable GPU — see Remote compute to fall out to a rented GPU when you don't have one locally.

How to run

scVI — batch-corrected latent space

import scanpy as sc
import scvi

adata = sc.read_h5ad("dataset.h5ad")
adata.layers["counts"] = adata.X.copy()          # preserve raw BEFORE any normalize/log1p
sc.pp.normalize_total(adata); sc.pp.log1p(adata) # optional, for HVG / plotting only
sc.pp.highly_variable_genes(adata, n_top_genes=2000, batch_key="batch", subset=True)

scvi.model.SCVI.setup_anndata(adata, layer="counts", batch_key="batch")
model = scvi.model.SCVI(adata, n_latent=30)
model.train(max_epochs=200, early_stopping=True, accelerator="gpu", devices=1)

adata.obsm["X_scVI"] = model.get_latent_representation()
adata.layers["scvi_normalized"] = model.get_normalized_expression(library_size=1e4)

Read the full file on GitHub · 188 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. 6d ago First seen · 188 lines · 100 tokens per session scan A 6cb6c7b206c6

Subscribe to this mod's changes

scvi-tools is a skill published in the GitHub repository aipoch/open-science (3,528 stars, last pushed today), licensed Apache-2.0. It adds 100 tokens to every session and 2,626 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-08-30.

Related

Other skills, from other repositories

build-paper-pipeline

Build the pipeline stages a manuscript's TODO comments ask for.

calkit/calkit · 0 tokens

check-questions

Review a Calkit project's questions and answers against their evidence. Use when the user invokes /calkit:check-questions, asks whether the project's answers are still true, or after a pipeline run changes results that answers cite.

calkit/calkit · 51 tokens

clinical-case-report

Structured medical case presentation for clinical rounds, conferences, and documentation. Generates SOAP-format or narrative case reports with physiologically accurate vitals, labs, and evidence-based plans. Use when the brief mentions "case report", "case presentation", "SOAP note", "clinical case", "ward rounds"…

nexu-io/open-design · 73 tokens

proof-checker

Rigorous mathematical proof verification and fixing workflow. Reads a LaTeX proof, identifies gaps via cross-model review (external reviewer backend, ultra reasoning), fixes each gap with full derivations, re-reviews, and generates an audit report. Use when user says "检查证明", "verify proof", "proof check", "审证明"…

wanshuiyin/Auto-claude-code-research-in-sleep · 87 tokens

paper-illustration

Generate publication-quality AI illustrations for academic papers using Gemini image generation. Creates architecture diagrams, method illustrations with Claude-supervised iterative refinement loop. Use when user says "生成图表", "画架构图", "AI绘图", "paper illustration", "generate diagram", or needs visual figures for papers.

wanshuiyin/Auto-claude-code-research-in-sleep · 67 tokens

paper-illustration-image2

Generate publication-quality academic illustrations through a local Codex app-server bridge that uses Codex native image generation. This is a separate experimental alternative to paper-illustration, intended for Claude Code users who want a GPT-image-style renderer without modifying the original skill.

wanshuiyin/Auto-claude-code-research-in-sleep · 59 tokens