sciagent-skill-creator
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md…
scRNA-seq with Scanpy: QC, normalization, HVG selection, PCA, neighborhood graph, UMAP/t-SNE, Leiden clustering, markers, cell annotation, trajectory inference. Standard scRNA-seq exploration.
Claude Code
$ npx -y skills add jaechang-hits/SciAgent-Skills --skill scanpy-scrna-seq --agent claude-code
Codex
$ npx skills add jaechang-hits/SciAgent-Skills --skill scanpy-scrna-seq -a codex -y
Cursor
$ npx skills add jaechang-hits/SciAgent-Skills --skill scanpy-scrna-seq -a cursor -y
Gemini CLI
$ npx skills add jaechang-hits/SciAgent-Skills --skill scanpy-scrna-seq -a gemini-cli -y
GitHub Copilot
$ npx skills add jaechang-hits/SciAgent-Skills --skill scanpy-scrna-seq -a github-copilot -y
OpenCode
$ npx skills add jaechang-hits/SciAgent-Skills --skill scanpy-scrna-seq -a opencode -y
Windsurf
$ npx skills add jaechang-hits/SciAgent-Skills --skill scanpy-scrna-seq -a windsurf -y
name: "scanpy-scrna-seq" description: "scRNA-seq with Scanpy: QC, normalization, HVG selection, PCA, neighborhood graph, UMAP/t-SNE, Leiden clustering, markers, cell annotation, trajectory inference. Standard scRNA-seq exploration." license: "CC-BY-4.0"
Scanpy is a scalable Python toolkit for analyzing single-cell RNA-seq data built on the AnnData format. This skill covers the end-to-end standard workflow: quality control, normalization, highly variable gene selection, dimensionality reduction, clustering, marker gene identification, and cell type annotation. It produces annotated datasets and publication-quality visualizations.
pip install "scanpy[leiden]" anndata
Settle these with the user before writing any analysis code.
decisions:
- id: D1
param: pct_counts_mt
kind: required
source: data
ask: "Dying cells leak cytoplasmic RNA and read as high-mitochondrial - where should the cut sit for this tissue?"
default: "20% (PBMC ~5%, solid tumour ~20%; propose from the observed distribution)"
- id: D2
param: batch_key
kind: required
source: data
ask: "Which variable separates samples that were processed apart (donor, run, 10X lane), so its effect is not read as biology?"
default: null
skip_if: "all cells come from one sample and one processing run"
- id: D3
param: resolution
kind: optional
source: user
ask: "How finely should cells be split - broad lineages, or subtypes within them?"
default: "0.8 (0.1-0.3 broad lineages, 1.0-2.0 fine subtypes)"
- id: D4
param: n_top_genes
kind: optional
source: user
ask: "How many variable genes should drive the embedding? More captures subtle states but adds noise."
default: 2000
- id: D5
param: n_pcs
kind: optional_conditional
source: data
depends_on: [D4]
ask: "How many principal components carry real structure, by the variance-ratio elbow?"
default: 40
- id: D6
param: min_genes, min_cells
kind: optional_conditional
source: data
ask: "Where should empty droplets and undetected genes be cut off?"
default: "cells with <200 genes, genes in <3 cells"
- id: D6b
param: annotationStrategy
kind: required
source: user
ask: "Markers (A), a CellTypist model (B), an ensemble on your labelled reference (C), or markers and transfer compared (D)?"
default: null
- id: D6c
param: markerPanel
kind: optional
source: literature
ask: "Which canonical markers define the expected populations?"
default: "agent-drafted panel for the tissue and state, listed in the plan"
skip_if: "label transfer only"
- id: D7
param: method (rank_genes_groups)
kind: optional
source: user
ask: "Which test should rank marker genes per cluster?"
default: "wilcoxon"
- id: D8
param: target_sum, flavor
kind: optional
source: user
ask: "Should the standard library-size normalization and Seurat v3 highly-variable-gene selection be used?"
default: "target_sum 1e4, flavor seurat_v3"
- id: D9
param: random_state
kind: never_ask
source: data
reason: "Fixes the draw for reproducibility; does not change what the data supports"
default: 0D5 hangs on D4 because the elbow is read off a PCA computed over the selected variable genes — a different gene count moves where it sits. D2 shapes the pipeline rather than a single call: naming a batch adds a correction stage (`harmony-batch-correction` or ComBat) before the neighbor graph. D6b and D6c are the same questions as `cell-type-annotation` D2 and D4; ask each once.
Configure scanpy settings and read the count matrix into an AnnData object. Ensure gene names are unique.
import scanpy as sc
import numpy as np
import pandas as pd
# Configure settings
sc.settings.verbosity = 3 # errors=0, warnings=1, info=2, hints=3
sc.settings.set_figure_params(dpi=80, facecolor="white")
# Load data — pick the reader matching your format
adata = sc.read_10x_mtx(
"path/to/filtered_feature_bc_matrix/",
var_names="gene_symbols",
cache=True,
)
# Alternatives:
# adata = sc.read_h5ad("data.h5ad")
# adata = sc.read_10x_h5("data.h5")
adata.var_names_make_unique()
print(f"Loaded: {adata.n_obs} cells x {adata.n_vars} genes")
print(f"Sparsity: {1 - adata.X.nnz / (adata.n_obs * adata.n_vars):.1%}")Annotate mitochondrial/ribosomal genes, compute QC metrics, visualize distributions, and filter low-quality cells.
# An
Turn your AI coding agent into a life sciences expert — 199 bioinformatics skills for Claude Code covering RNA-seq, single-cell analysis, genomics, proteomics, drug discovery, and more. Boosted BixBench from 65% to 92%. Open source.
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md…
Bayesian modeling with PyMC 5: priors, likelihood, NUTS/ADVI sampling, diagnostics (R-hat, ESS), LOO/WAIC comparison, prediction.…
Time-to-event modeling with scikit-survival: Cox PH (elastic net), Random Survival Forests, Boosting, SVMs for censored data.…
Guided statistical analysis: test choice, assumption checks, effect sizes, power, APA reporting. Pick tests, verify assumptions,…
Python statistical modeling: regression (OLS, WLS, GLM), discrete (Logit, Poisson, NegBin), time series (ARIMA, SARIMAX, VAR),…
DL cell/nucleus segmentation for fluorescence and brightfield microscopy. Pre-trained models (cyto3, nuclei, tissuenet) and a…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.