scanpy

scanpy is a skill for Claude Code, Codex from K-Dense-AI/scientific-agent-skills. It costs 85 tokens per session (5,054 once invoked), scanned A, original, MIT.

A Python toolkit for analysing single-cell RNA sequencing data, which measures gene activity in individual cells. It works with AnnData, a format for storing cell-by-gene data and related information.

In plain words
What is it for?
Use it to filter and normalise data, reduce its dimensions with methods such as PCA or UMAP, group similar cells, find marker genes, study differences between groups, and analyse cell trajectories.
Why use it?
Single-cell experiments produce large, noisy datasets that need several preparation and analysis steps. This brings quality checks, grouping, gene comparisons, and visualisation into one workflow.

Skill for Claude CodeCodex

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

Good fit Use it to filter and normalise data, reduce its dimensions with methods such as PCA or UMAP, group similar cells, find marker genes, study differences between groups, and analyse cell trajectories.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/k-dense-ai/scientific-agent-skills/scanpy
About the project

Scientific Agent Skills is a collection of reusable procedures that give AI agents capabilities for scientific research across areas such as biology, chemistry, medicine, and drug discovery. It is used by researchers and by people building AI scientist workflows with compatible coding agents. The catalogue contains many of the project's skills and supporting instructions.

K-Dense-AI/scientific-agent-skills · 58,946 stars · on GitHub · arxiv.org

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 K-Dense-AI/scientific-agent-skills --skill scanpy
Clone the repo
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills

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 scanpy

README.md
[![agentmods](https://agentmods.dev/badge/skills/k-dense-ai/scientific-agent-skills/scanpy/github.svg)](https://agentmods.dev/skills/k-dense-ai/scientific-agent-skills/scanpy)
Your own site
<a href="https://agentmods.dev/skills/k-dense-ai/scientific-agent-skills/scanpy"><img src="https://agentmods.dev/badge/skills/k-dense-ai/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/k-dense-ai/scientific-agent-skills/scanpy"><img src="https://agentmods.dev/badge/skills/k-dense-ai/scientific-agent-skills/scanpy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,054 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. Third-party audits
  • Socket pass 2 Oct 2026
  • Snyk warn 2 Oct 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00085 $0.05054
Opus 5.5 $0.00034 $0.02022
Sonnet 5.5 $0.00017 $0.01011
Haiku 4.5 $0.00009 $0.00505

Measured 1mo ago against content hash 4a59f87933a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

The scan reads SKILL.md. This mod also ships 16 executable files (assets/analysis_template.py, scripts/_common.py, scripts/annotate.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

4 near-identical copies found in the catalogue:

  • scanpy — 100% identical, 66 lines differ
  • scanpy — 86% identical, 323 lines differ
  • scanpy — 86% identical, 323 lines differ
  • scanpy — 75% identical, 403 lines differ
skills/scanpy/SKILL.md · 361 lines

How it starts

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

Scanpy: Single-Cell Analysis

Overview

Scanpy is a scalable Python toolkit for analyzing single-cell RNA-seq data, built on AnnData. Apply this skill for complete single-cell workflows including quality control, normalization, dimensionality reduction, clustering, marker gene identification, visualization, and trajectory analysis. Targets Scanpy 1.12.4 (released 2026-08-27), reviewed 2026-10-01. Native synthetic tests establish data/API contracts, not biological validity.

Installation

Requires Python 3.12+ (scanpy 1.12 dropped Python ≤3.11) and anndata ≥0.10.

uv pip install "scanpy[leiden]"

The [leiden] extra installs igraph and leidenalg; the scripts explicitly select flavor="igraph". For reproducible environments, pin a version: uv pip install "scanpy[leiden]==1.12.4".

For large or out-of-core datasets, many functions support Dask arrays (experimental):

uv pip install "scanpy[leiden]" dask

See the Using dask with Scanpy tutorial. For GPU-accelerated scanpy-like operations, use rapids-singlecell as a separate package.

If the input is an R-native single-cell object (.rds, .RData, Seurat, or SingleCellExperiment), first convert it to .h5ad with R tooling, then load it with Scanpy. Read references/r_interop.md for agent-run installation and conversion instructions across macOS, Linux, and Windows.

For AnnData structure and I/O details, use the anndata skill. For probabilistic models and batch correction, use scvi-tools.

Representation and inference contracts

  • Input to QC/preprocessing must be identified raw counts. The scripts reject negative, fractional, nonfinite or zero-total cells. Use --counts-layer counts when X is already normalized; never infer provenance from integer-looking values alone.
  • layers["counts"] remains unnormalized; .raw is an independent full-gene log-normalized snapshot. Gene subsetting also subsets every layer, but does not subset .raw genes. Retain a full-gene object for pseudobulk; the full pipeline does so.
  • seurat/cell_ranger HVGs use log-normalized values; seurat_v3 and seurat_v3_paper use counts and require scanpy[skmisc]. Scaling/regression are optional, may densify sparse data, and can remove biology along with covariates.
  • Marker ranking defaults to .raw when present; --no-use-raw selects X and --layer selects an explicit log-normalized layer. --groups/--reference control contrasts. Wilcoxon/t-test adjusted p-values use BH within each comparison; logreg returns ranking scores without p-values. Clusters chosen from the same data yield exploratory markers.
  • Condition DE requires raw-count sums per sample and cell type, independent biological replicates, aligned condition/donor metadata and a full-rank design. Analyze each cell type separately; repeated donor samples require a suitable paired design. Aggregation cannot fix confounding, missing replication, doublets or incorrect annotations.
  • Harmony (harmonypy) changes PCA coordinates; BBKNN (bbknn) changes the graph; ComBat changes X. Keep original expression/counts for DE, and assess biological conservation and batch mixing together. Requested integration/doublet failures stop.
  • The toolkit loads files into memory. For backed data, explicitly call .to_memory() on a chosen subset and close the file; backed mode is not a general out-of-core pipeline. Copy views before mutation. Dask support varies by function/array layout.
  • .rds needs an explicit R conversion stage. Cluster IDs do not determine cell types: all mappings/signature assets are illustrative human marker examples, requiring review.

Read the full file on GitHub · 361 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. 1mo ago Changed · +40 lines · -8 tokens per session 4a59f87933a1
  2. 2mo ago Changed 5625c382fa0d
  3. 2mo ago First seen · 321 lines · 93 tokens per session scan A aad13ea7d74d

Subscribe to this mod's changes

scanpy is a skill published in the GitHub repository K-Dense-AI/scientific-agent-skills (58,946 stars, last pushed 7d ago), licensed MIT. It adds 85 tokens to every session and 5,054 once invoked, about $0.0003 per session on Opus 5.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-09-03.

Related

scanpy compared with skills from other repositories

scanpy next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
scanpyK-Dense-AI/scientific-agent-skillsSkill59k7d agoMITA85Claude Code, Codex
discovery-toolboxdekan-aleksandr/biodiscovery-skillsSkill113mo agoMITA122Claude Code
discovery-directordekan-aleksandr/biodiscovery-skillsSkill113mo agoMITA114Claude Code
notebooksfmschulz/omics-skillsSkill11yesterdayMITA29Claude Code
bio-annotationfmschulz/omics-skillsSkill11yesterdayMITA38Claude Code, Codex
bio-viromicsfmschulz/omics-skillsSkill11yesterdayMITA79Claude Code, Codex
polars-dovmedfmschulz/omics-skillsSkill11yesterdayMITA57Claude Code, Codex