### Scvi Tools
Works with
name: "scvi-tools"
description: "Deep generative models for single-cell omics. Use when you need probabilistic batch correction (scVI), transfer learning, differential expression with uncertainty, or multi-modal integration (TOTALVI,..."
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionscvi-toolsExecute the skills CLI command in your project's root directory to begin installation:
Fetches scvi-tools from K-Dense-AI/scientific-agent-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate scvi-tools. Access via /scvi-tools in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
0
upvotes
Run in your terminal
0
installs
0
this week
—
stars
| name | scvi-tools |
| description | Deep generative models for single-cell omics. Use when you need probabilistic batch correction (scVI), transfer learning, differential expression with uncertainty, or multi-modal integration (TOTALVI, MultiVI). Best for advanced modeling, batch effects, multimodal data. For standard analysis pipelines use scanpy. |
| license | BSD-3-Clause license |
| metadata | version: "1.1" skill-author: K-Dense Inc. |
scvi-tools is a comprehensive Python framework for probabilistic models in single-cell genomics. Built on PyTorch and PyTorch Lightning, it provides deep generative models using variational inference for analyzing diverse single-cell data modalities. Current stable release: scvi-tools 1.4.3 (May 2026).
Model namespaces matter: core models (scVI, scANVI, totalVI, MultiVI, PeakVI, AUTOZI, CondSCVI, DestVI, LinearSCVI, AmortizedLDA, JaxSCVI) live under scvi.model. Most other models (VeloVI, contrastiveVI, CellAssign, PoissonVI, scBasset, MrVI, MethylVI/MethylANVI, CytoVI, SysVI, Decipher, gimVI, scVIVA, ResolVI, Stereoscope, Solo, totalANVI, DIAGVI) live under scvi.external. The reference files specify the correct namespace per model.
Use this skill when:
scvi-tools provides models organized by data modality:
Core models for expression analysis, batch correction, and integration. See references/models-scrna-seq.md for:
Models for analyzing single-cell chromatin data. See references/models-atac-seq.md for:
Joint analysis of multiple data types. See references/models-multimodal.md for:
Spatially-resolved transcriptomics analysis. See references/models-spatial.md for:
Additional specialized analysis tools. See references/models-specialized.md for:
All scvi-tools models follow a consistent API pattern:
# 1. Load and preprocess data (AnnData format)
import scvi
import scanpy as sc
adata = scvi.data.heart_cell_atlas_subsampled()
sc.pp.filter_genes(adata, min_counts=3)
sc.pp.highly_variable_genes(adata, n_top_genes=1200)
# 2. Register data with model (specify layers, covariates)
scvi.model.SCVI.setup_anndata(
adata,
layer="counts", # Use raw counts, not log-normalized
batch_key="batch",
categorical_covariate_keys=["donor"],
continuous_covariate_keys=["percent_mito"]
)
# 3. Create and train model
model = scvi.model.SCVI(adata)
model.train()
# 4. Extract latent representations and normalized values
latent = model.get_latent_representation()
normalized = model.get_normalized_expression(library_size=1e4)
# 5. Store in AnnData for downstream analysis
adata.obsm["X_scVI"] = latent
adata.layers["scvi_normalized"] = normalized
# 6. Downstream analysis with scanpy
sc.pp.neighbors(adata, use_rep="X_scVI")
sc.tl.umap(adata)
sc.tl.leiden(adata)
Key Design Principles:
Probabilistic DE analysis using the learned generative models:
de_results = model.differential_expression(
groupby="cell_type",
group1="TypeA",
group2="TypeB",
mode="change", # Use composite hypothesis testing
delta=0.25 # Minimum effect size threshold
)
See references/differential-expression.md for detailed methodology and interpretation.
Save and load trained models:
# Save model
model.save("./model_directory", overwrite=True)
# Load model
model = scvi.model.SCVI.load("./model_directory", adata=adata)
Integrate datasets across batches or studies:
# Register batch information
scvi.model.SCVI.setup_anndata(adata, batch_key="study")
# Model automatically learns batch-corrected representations
model = scvi.model.SCVI(adata)
model.train()
latent = model.get_latent_representation() # Batch-corrected
scvi-tools is built on:
See references/theoretical-foundations.md for detailed background on the mathematical framework.
references/workflows.md contains common workflows, best practices, hyperparameter tuning, and GPU optimizationreferences/ directoryRequires Python 3.12+ (scvi-tools 1.4 dropped older versions).
uv pip install scvi-tools
# For GPU support
uv pip install "scvi-tools[cuda]"
For reproducible environments, pin a version: uv pip install scvi-tools==1.4.3.
Compute backends: training defaults to PyTorch (CPU/GPU/TPU). A JAX backend
(scvi.model.JaxSCVI) and an experimental MLX backend for Apple silicon
(scvi.model.mlxSCVI) are available for select models.
min_counts=3)setup_anndataaccelerator="gpu")Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
K-Dense-AI/scientific-agent-skills
K-Dense-AI/scientific-agent-skills
K-Dense-AI/scientific-agent-skills
K-Dense-AI/scientific-agent-skills
google-deepmind/science-skills
google-deepmind/science-skills
scvi-tools reduced setup friction for our internal harness; good balance of opinion and flexibility.
Keeps context tight: scvi-tools is the kind of skill you can hand to a new teammate without a long onboarding doc.
Registry listing for scvi-tools matched our evaluation — installs cleanly and behaves as described in the markdown.
scvi-tools has been reliable in day-to-day use. Documentation quality is above average for community skills.
Registry listing for scvi-tools matched our evaluation — installs cleanly and behaves as described in the markdown.
I recommend scvi-tools for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Registry listing for scvi-tools matched our evaluation — installs cleanly and behaves as described in the markdown.
scvi-tools fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
We added scvi-tools from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
scvi-tools reduced setup friction for our internal harness; good balance of opinion and flexibility.
showing 1-10 of 49