Guide · Agent skill
How to use the scvi-tools agent skill: install and prompt guide
Updated · written with AI from the project's own documentation and checked against our catalogue data
This page explains how to install and use the scvi-tools skill, a set of instructions and reference files that teaches an AI agent how to build probabilistic models of single-cell data with the scvi-tools Python library. It is written for bioinformaticians and researchers who may never have used an agent skill before. By the end you will know what the skill changes about the agent's behaviour, how to install it, how to phrase requests, and what the skill needs to run safely.
Quick start
- 1Download the ZIP. Download the ZIP for skills/scvi-tools from this page.
- 2Unzip into a skills folder. Place the scvi-tools folder in ~/.claude/skills/ or in your project's .claude/skills/ folder.
- 3Or upload in the Claude apps. Go to Settings → Capabilities → Skills and upload the skill there.
- 4Prepare the environment. Install Python 3.12 or newer, scvi-tools 1.5.1 and the dependencies for your model.
- 5Prepare raw counts. Confirm your data holds unnormalized counts in the expected layer with batch metadata.
- 6Ask in plain language. Describe your data type and goal, then review the commands the agent proposes before running them.
What the scvi-tools skill makes the agent do
Without the skill, an agent may write generic scvi-tools code. With it, the agent first chooses the right model for your data type: SCVI for RNA integration, SCANVI for annotation from partial labels, TOTALVI for CITE-seq, MULTIVI for RNA plus ATAC, and PEAKVI, METHYLVI, CYTOVI and others for specialised data. It also checks the input contract, such as raw unnormalized counts for most RNA models.
The skill then guides the workflow: QC and feature selection before model registration, training, checks of validation history and batch mixing, and saving the model with its software versions and seed. It also points to reference files for specialised models and posterior differential expression.
Install the skill from the ZIP
Download the ZIP for skills/scvi-tools from this page and unzip it. For a personal install, place the unzipped scvi-tools folder inside ~/.claude/skills/. For a single project, place it inside that project's .claude/skills/ folder. In the Claude apps you can instead upload the skill under Settings → Capabilities → Skills.
The folder should contain SKILL.md and the references/ directory with the model, differential expression and workflow guides.
- Personal: ~/.claude/skills/scvi-tools/
- Project: .claude/skills/scvi-tools/ inside your project
- Claude apps: Settings → Capabilities → Skills, then upload
Set up the Python environment
The skill needs Python 3.12 or newer; the tested stack used Python 3.13. Install scvi-tools 1.5.1 with the dependencies for the model you plan to use. The workflow also uses Scanpy and AnnData, and the sample workflow needs scikit-misc and igraph. PyTorch with Lightning is required for training.
Installation and optional dataset or genome downloads need network access. Local model fitting does not.
- Python 3.12 or newer (tested with 3.13)
- scvi-tools 1.5.1 plus model-specific dependencies
- Scanpy, AnnData, PyTorch with Lightning
- scikit-misc and igraph for the sample workflow
Trigger the skill with natural requests
You do not need special syntax. Describe the data and the goal in plain language and mention single-cell modeling. The skill's description covers batch integration, annotation, CITE-seq, RNA plus ATAC, posterior differential expression, reference mapping and model-based uncertainty.
Good requests state the modality, the count type and the question. Standard preprocessing or simple clustering is better handled by Scanpy alone, and the skill says so.
- Integrate these three RNA batches with scVI and check that batch mixing keeps known cell types separate.
- Annotate my cells using partial labels in obs['cell_type'] with scANVI.
- Model my CITE-seq RNA and antibody counts with totalVI and get normalized protein values.
- Run posterior differential expression between two cell types, noting that cells from the same donor are not independent replicates.
Example: a minimal RNA integration workflow
The skill includes an illustrative RNA workflow. It asserts that the cell and gene IDs are unique, that obs['batch'] has no missing values, and that X holds non-negative integer counts. It keeps a counts layer, selects highly variable genes with count-aware settings, registers the data with SCVI.setup_anndata, trains the model and computes a latent representation for neighbours, UMAP and Leiden clustering.
Treat this as a template. QC thresholds must be chosen for your experiment, and the training settings shown are illustrative rather than validated for your dataset.
import scvi
scvi.model.SCVI.setup_anndata(adata, layer="counts", batch_key="batch")
model = scvi.model.SCVI(adata, n_latent=20, gene_likelihood="nb")
model.train(max_epochs=400, early_stopping=True)
adata.obsm["X_scVI"] = model.get_latent_representation()Safety notes: scripts and network access
This skill runs scripts and uses the network. The agent may install packages and download optional datasets or genomes. Review commands before they run, especially installation steps and any download.
The skill is not a clinical tool. Its own checks do not establish convergence or biological validity, so results need independent biological review. Do not feed log-normalized or ratio data into models that require raw counts; the skill warns that this gives misleading results.
- Check what the agent installs and downloads.
- Keep raw counts in a layer and record provenance.
- Do not use outputs for clinical or diagnostic decisions.
Tips for better results
Tell the agent the count type of your input and where it came from. Ask for held-out fit, seed stability and retention of known biology, not only a well-mixed UMAP. Save the model together with the data, selected feature order, software versions, seed and training parameters so the analysis can be reproduced.
Differential expression from a cell-level model is not pseudobulk replicate analysis. Ask the agent to aggregate measured counts by donor and cell type when you need condition-level inference.
- State the modality and whether counts are raw.
- Ask for batch-mixing and biology-retention checks.
- Save the model with its metadata.
What people use it for
- Integrating several single-cell RNA-seq batches or samples with scVI and checking batch mixing.
- Annotating cells from partial labels with scANVI or mapping them onto a reference.
- Analysing CITE-seq data with totalVI to get normalized RNA and protein values.
- Modelling RNA plus ATAC multimodal data with MULTIVI when model-based uncertainty matters.
Frequently asked questions
Is the scvi-tools skill free to use?
The skill is published under the MIT licence on the K-Dense-AI scientific-agent-skills repository. The scvi-tools library itself is a separate Python package, and you install it yourself.
What do I need to run the scvi-tools skill?
You need Python 3.12 or newer, scvi-tools 1.5.1 with model-specific dependencies, Scanpy, AnnData and PyTorch with Lightning. The sample workflow also needs scikit-misc and igraph. Network access is needed for installation and optional downloads.
Where do I put the skill folder?
Place it in ~/.claude/skills/ for personal use or in a project's .claude/skills/ folder. You can also upload it in the Claude apps under Settings → Capabilities → Skills.
Do I need raw counts for scVI?
Yes, for most RNA models the input should be unnormalized counts. The skill warns that feeding log-normalized or ratio data into these models produces misleading results.
Should I use this skill instead of Scanpy?
Not for simple exploration or standard preprocessing. Scanpy alone is enough there and is simpler. Use the scvi-tools skill for probabilistic modelling such as batch integration, annotation, multimodal analysis or uncertainty.
Why are my differential expression results not replicate-based?
The skill notes that cells from the same donor are not independent replicates and that model.differential_expression does not aggregate pseudobulk samples. For condition-level inference, aggregate measured counts by donor and cell type first.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits bioinformaticians who integrate multiple single-cell RNA-seq batches, annotate cells from partial labels, or analyse CITE-seq or RNA plus ATAC data and need model-based uncertainty. If you only need routine preprocessing or simple clustering, or you need clinical decisions, use Scanpy alone or another validated pipeline.
Download the skill