scanpy

scanpy is a skill for Claude Code from tondevrel/scientific-agent-skills. It costs 31 tokens per session (739 once invoked), scanned A, original, MIT.

A Python toolkit for studying single-cell gene-expression data, where measurements are recorded for individual cells. It stores the measurements and related cell and gene information together, then helps group and visualise similar cells.

In plain words
What is it for?
Use it to analyse single-cell RNA sequencing data, identify cell types in mixed tissues or microbiomes, compare conditions, find rare cell populations, and estimate how cells change along developmental paths.
Why use it?
Single-cell data can contain measurements for thousands of genes across many cells, making patterns hard to see directly. It reduces the data to simpler visual forms and groups similar cells so cell types, states, and unusual populations are easier to compare.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the scientific-agent-skills plugin — 55 skills, 2 commands, 1 MCP server shipped together

Good fit Use it to analyse single-cell RNA sequencing data, identify cell types in mixed tissues or microbiomes, compare conditions, find rare cell populations, and estimate how cells change along developmental paths.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tondevrel/scientific-agent-skills/scanpy
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.

Any agent
npx skills add tondevrel/scientific-agent-skills --skill scanpy
Clone the repo
git clone --depth 1 https://github.com/tondevrel/scientific-agent-skills

Made for: Claude Code.

Or install scientific-agent-skills, the plugin that ships this one along with the rest of its 55 skills, 2 commands, 1 MCP server.

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 scanpy

README.md
[![agentmods](https://agentmods.dev/badge/skills/tondevrel/scientific-agent-skills/scanpy/github.svg)](https://agentmods.dev/skills/tondevrel/scientific-agent-skills/scanpy)
Your own site
<a href="https://agentmods.dev/skills/tondevrel/scientific-agent-skills/scanpy"><img src="https://agentmods.dev/badge/skills/tondevrel/scientific-agent-skills/scanpy/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for scanpy

Your own site · 80×15
<a href="https://agentmods.dev/skills/tondevrel/scientific-agent-skills/scanpy"><img src="https://agentmods.dev/badge/skills/tondevrel/scientific-agent-skills/scanpy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 739 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00031 $0.00739
Opus 5 $0.00015 $0.00369
Sonnet 5 $0.00006 $0.00148
Haiku 4.5 $0.00003 $0.00074

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

Security

Grade A, and why

scanpy 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 9d ago.

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.

skills/scanpy/SKILL.md · 106 lines

How it starts

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

Scanpy - Single-Cell Analysis

Scanpy processes high-dimensional biological data, reducing it via PCA/UMAP to identify rare cell populations in tissues or microbiomes.

When to Use

  • Analyzing single-cell RNA sequencing (scRNA-seq) data.
  • Identifying cell types and states in heterogeneous tissues.
  • Reconstructing developmental trajectories.
  • Comparing cell populations between conditions.
  • Discovering rare cell types.

Core Principles

AnnData Format

Scanpy uses AnnData objects that store expression matrix, cell metadata, and gene annotations together.

Dimensionality Reduction

High-dimensional gene expression (20,000+ genes) is reduced to 2D/3D for visualization (PCA → UMAP/t-SNE).

Clustering

Cells are grouped by similarity in gene expression space to identify cell types.

Quick Reference

Standard Imports

import scanpy as sc
import pandas as pd
import numpy as np

Basic Patterns

# 1. Load dataset (AnnData object)
adata = sc.read_h5ad("cells.h5ad")
# Or: adata = sc.read_10x_mtx("path/to/mtx")

# 2. QC and Normalization
sc.pp.filter_cells(adata, min_genes=200)
sc.pp.filter_genes(adata, min_cells=3)
sc.pp.normalize_total(adata, target_sum=1e4)
sc.pp.log1p(adata)

# 3. Dimensionality Reduction & Visualization
sc.pp.highly_variable_genes(adata)
sc.tl.pca(adata)
sc.tl.umap(adata)
sc.pl.umap(adata, color=['cell_type', 'gene_A'])

# 4. Clustering
sc.tl.leiden(adata, resolution=0.5)
sc.pl.umap(adata, color='leiden')

Critical Rules

✅ DO

  • Set scanpy settings - Use sc.settings.verbosity = 3 for progress info.
  • Filter low-quality cells - Remove cells with too few genes or high mitochondrial content.
  • Normalize before analysis - Account for sequencing depth differences.
  • Use highly variable genes - Focus analysis on informative genes.

❌ DON'T

  • Don't skip QC - Low-quality cells can dominate clustering.
  • Don't use raw counts for PCA - Always normalize and log-transform first.
  • Don't ignore batch effects - Use batch correction (e.g., sc.pp.harmony_integrate) when combining datasets.

Read the full file on GitHub · 106 lines

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. 9d ago First seen · 106 lines · 31 tokens per session scan A 2290674cee4d

Subscribe to this mod's changes

scanpy is a skill published in the GitHub repository tondevrel/scientific-agent-skills (21 stars, last pushed 7mo ago), licensed MIT. It adds 31 tokens to every session and 739 once invoked, about $0.0002 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

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for…

K-Dense-AI/scientific-agent-skills · 66 tokens

torchdrug

Build and troubleshoot TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and knowledge graph reasoning. Use when code imports torchdrug or needs its datasets, models, tasks, or Engine.

K-Dense-AI/scientific-agent-skills · 61 tokens

deepspot-m

Generate transcriptome-wide virtual spatial transcriptomics from H&E histology with DeepSpot-M. Use when you need spatial gene expression in log1p-CPM for 224x224 tiles at about 20x, want to query protein-coding genes by symbol instead of a fixed panel, or want to run prediction across a whole slide after tiling with…

K-Dense-AI/scientific-agent-skills · 80 tokens

pyhealth

Build clinical/healthcare deep-learning pipelines with PyHealth — loading EHR/signal/imaging datasets (MIMIC-III/IV, eICU, OMOP, SleepEDF, ChestXray14, EHRShot), defining tasks (mortality, readmission, length-of-stay, drug recommendation, sleep staging, ICD coding, EEG events), instantiating models (Transformer…

K-Dense-AI/scientific-agent-skills · 216 tokens

pick-a-pii-model

Select an on-device OpenMed PII model from the committed registry by language, runtime format, and size budget, then require recall validation before deployment. Use when an agent must choose a local PII detector for CPU, Apple Silicon, or a mobile export without relying on live model discovery.

maziyarpanahi/openmed · 64 tokens

evo2

Score, embed, and generate DNA sequences with Evo 2, a long-context genomic foundation model. Use this skill when: (1) Computing per-nucleotide or per-sequence likelihoods for variant effect scoring, (2) Embedding genomic windows for downstream classification, (3) Generating DNA conditioned on a prefix, (4) Scoring…

aipoch/open-science · 83 tokens