Scanpy Single-Cell Analysis
davila7/claude-code-templates
Walks through single-cell RNA-seq analysis with Scanpy: loading .h5ad and 10X data, QC, normalization, PCA and UMAP, Leiden clustering, marker genes and cell type annotation.
Load when finding marker genes per cluster or comparing condition expression in single-cell RNA-seq.
$ npx skills add TianGzlab/OmicsClaw --skill sc-de -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install TianGzlab/OmicsClaw sc-de --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/singlecell/scrna/sc-de .claude/skills/sc-de && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "sc-de" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-de into .claude/skills/sc-de/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-de", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-deType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add TianGzlab/OmicsClaw --skill sc-de -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install TianGzlab/OmicsClaw sc-de --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/singlecell/scrna/sc-de .agents/skills/sc-de && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "sc-de" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-de into .agents/skills/sc-de/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-de", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add TianGzlab/OmicsClaw --skill sc-de -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install TianGzlab/OmicsClaw sc-de --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/singlecell/scrna/sc-de .cursor/skills/sc-de && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "sc-de" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-de into .cursor/skills/sc-de/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-de", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/TianGzlab/OmicsClaw.git --path skills/singlecell/scrna/sc-de--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add TianGzlab/OmicsClaw --skill sc-de -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install TianGzlab/OmicsClaw sc-de --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/singlecell/scrna/sc-de .gemini/skills/sc-de && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "sc-de" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-de into .gemini/skills/sc-de/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-de", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install TianGzlab/OmicsClaw sc-deInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add TianGzlab/OmicsClaw --skill sc-de -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/singlecell/scrna/sc-de .github/skills/sc-de && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "sc-de" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-de into .github/skills/sc-de/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-de", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add TianGzlab/OmicsClaw --skill sc-de -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install TianGzlab/OmicsClaw sc-de --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/singlecell/scrna/sc-de .opencode/skills/sc-de && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "sc-de" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-de into .opencode/skills/sc-de/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-de", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
sc-deLoad when finding marker genes per cluster or comparing condition expression in single-cell RNA-seq.
Sc De is an agent skill from TianGzlab/OmicsClaw. Load when finding marker genes per cluster or comparing condition expression in single-cell RNA-seq. Skip when the data is bulk (use bulkrna-de); spatial (use spatial-de); cluster-only markers without conditions (use sc-markers).
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including reference files (for example `_api.py`, `examples/example_step.py` and `references/methodology.md`).
It sits in Research & Science, covering Bioinformatics. It works with Scanpy. The repository describes itself as: Conversational & memory-enabled AI research partner for multi-omics analysis. CLI + Desktop App (installers in Releases). From biological idea to full research paper. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 90a3bec. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships script files (Python), which the agent can run.
Shell commands in SKILL.md call:
pythonFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Sc De loads about 2.3k tokens when it runs, and up to ~5.2k if it reads all its reference files. Until then it costs about 59 tokens; SKILL.md has 1,017 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from TianGzlab/OmicsClaw at commit 90a3bec, republished under its Apache-2.0 licence (© TianGzlab). 1,017 words, ~2,283 tokens.
.claude/skills/sc-de/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.The user has a preprocessed scRNA-seq AnnData and wants to know either
(a) which genes mark each cluster (Wilcoxon / t-test / logreg ranking) or
(b) which genes change between conditions in a replicate-aware way
(pseudobulk_de, DESeq2 in R). Mixing normalized expression and raw
counts across these paths is the most common silent-wrong-answer failure
mode, so each path reads the matrix it needs.
de = load_skill("sc-de")
adata = read_input("results/04_annotation/intermediate/adata_annotated.h5ad")
table = de.rank_genes(adata, groupby="cell_type", method="wilcoxon")
write_output(table, "tables/de_full.csv")
write_output(de.top_genes(table, n_top=10), "tables/markers_top.csv")
write_output(de.volcano_figure(table, group="B cell"), "figures/volcano_b_cell.png")A complete step that runs on demo data: examples/example_step.py.
<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
rank_genes(adata, *, groupby: str='leiden', method: str='wilcoxon', group1: str | None=None, group2: str | None=None, logreg_solver: str='lbfgs') -> pd.DataFrameRank genes per group of cells: every group against the rest, or group1 against group2.
wilcoxon, t-test and logreg run scanpy's rank_genes_groups on
X (use_raw=False, with the fraction of expressing cells) and also leave
its result in uns['rank_genes_groups']; mast runs the MAST hurdle model
in R. Cells are the units here, so p-values overstate the evidence for a
difference between conditions; use :func:pseudobulk_de for that.
:param groupby: The obs column defining the groups. Default "leiden"; when it
is missing and louvain exists, louvain is used and recorded.
:param method: "wilcoxon" (default; scanpy's recommended test), "t-test",
"logreg" or "mast".
:param group1: Compare only this group ...
:param group2: ... against this one. Default: each group against the rest.
:param logreg_solver: The scikit-learn solver for logreg. Default "lbfgs".
:returns: One row per gene and group. scanpy methods: names, scores,
logfoldchanges, pvals, pvals_adj, pct_nz_group,
pct_nz_reference, group; mast: gene, group, pvalue,
padj and effect columns.
:raises ValueError: an unknown method, or the group column is missing.
:raises RuntimeError: mast and R or MAST is missing.
pseudobulk_de(adata, *, condition_key: str, group1: str, group2: str, sample_key: str='sample_id', celltype_key: str='cell_type', min_cells: int=10, min_counts: int=1000) -> pd.DataFrameDESeq2 on pseudobulk counts: one test of group1 against group2 per cell type, run in R.
Counts are summed per sample and cell type from layers['counts'], raw
or a count-like X; bins below the thresholds are dropped. Samples, not
cells, are the units, so this is the test for condition effects.
:param condition_key: The obs column holding the condition.
:param group1: The condition of interest (numerator of the fold change).
:param group2: The reference condition.
:param sample_key: The obs column naming biological replicates. Default "sample_id".
:param celltype_key: The obs column with cell types. Default "cell_type".
:param min_cells: Minimum cells per sample and cell type bin. Default 10.
:param min_counts: Minimum total counts per bin. Default 1000.
:returns: Columns gene, log2FoldChange, pvalue, padj (and DESeq2's
others) plus cell_type.
:raises ValueError: a missing column, missing groups, or no count-like matrix.
:raises RuntimeError: R or DESeq2 is missing, or no bin passes the thresholds.
run_info(adata, *, keep: bool=True) -> dictWhat the last :func:rank_genes or :func:pseudobulk_de call recorded under summary.
summary has method, groupby (the column actually used), n_groups,
n_genes_tested and expression_source.
:param keep: Leave the record in adata.uns; False removes it.
:returns: The record, or an empty dict when neither has run on adata.
top_genes(table: pd.DataFrame, *, n_top: int=10) -> pd.DataFrameThe first n_top genes of each group.
A scanpy table is already ranked within each group. A table with padj
(MAST) is sorted by padj then pvalue first.
:param table: What :func:rank_genes returned.
:param n_top: Genes per group. Default 10, the CLI's default.
:returns: The selected rows, in the table's columns.
volcano_figure(table: pd.DataFrame, *, padj_threshold: float=0.05, log2fc_threshold: float=1.0, group: str | None=None)A volcano plot of a DE table, significant genes coloured.
:param table: What :func:rank_genes or :func:pseudobulk_de returned.
:param padj_threshold: Adjusted p-value cut. Default 0.05.
:param log2fc_threshold: Absolute log2 fold-change cut. Default 1.0.
:param group: Plot only this group (or cell type). Default: all rows.
:returns: A matplotlib Figure.
<!-- api:end -->
| Question | Function | Units | Needs |
|---|---|---|---|
| Which genes mark each cluster or cell type | rank_genes(method="wilcoxon") (default) | cells | normalised X |
| Same, other tests | rank_genes(method="t-test" / "logreg") | cells | normalised X |
| Same, hurdle model | rank_genes(method="mast") | cells | log-normalised X; R with MAST |
| Which genes change between conditions | pseudobulk_de(...) | samples | raw counts; a replicate column; R with DESeq2 |
Defaults and their sources: method="wilcoxon" is scanpy's recommended
marker test; n_top=10 and the volcano cuts (padj_threshold=0.05,
log2fc_threshold=1.0) are the CLI's defaults; min_cells=10 and
min_counts=1000 per pseudobulk bin are the CLI's defaults, a common
choice for 10x data. A comparison between conditions with biological
replicates is a pseudobulk question; ask the user for the replicate column
when it is not obvious.
pseudobulk_de whenever there are biological replicates and the question is about the condition.pseudobulk_de needs raw counts. It takes layers["counts"], then raw, then X, each only if it looks count-like; check run_info(adata)["summary"]["expression_source"] after the run: layers.counts or adata.raw, not adata.X.pseudobulk_de needs group1 and group2. The cell-level tests compare each group with the rest when they are absent.min_cells cells are skipped without a note; check the per-sample cell counts before reading "no DEGs" as a biological null.sample_key is the statistical design. It must name biological replicates with at least two per condition; a non-replicate column gives nonsense and is not caught.groupby="leiden" falls back to louvain when only louvain exists; run_info(adata)["summary"]["groupby"] says which column was used.rank_genes reads X and obs[groupby], writes uns['rank_genes_groups'] (scanpy methods) and returns the full table. pseudobulk_de reads the count matrix and obs[condition_key], obs[sample_key], obs[celltype_key], and returns one table for all cell types.top_genes returns a DataFrame; volcano_figure returns a matplotlib Figure.sc_de.py runs the same functions outside a project and writes a report,
figures, tables and processed.h5ad: python <skill directory>/sc_de.py --help.
--demo ranks PBMC3k's louvain clusters.
references/parameters.md — every CLI flag and per-method tuning hintreferences/methodology.md — the DE paths, scope boundary, input expectations, workflowreferences/output_contract.md — the CLI's output directory layout + visualization contractreferences/r_visualization.md — five R-enhanced rendererssc-clustering (upstream cluster discovery), sc-cell-annotation (upstream cell type labels for celltype_key), sc-markers (lighter cluster-marker-only path), sc-enrichment (downstream pathway enrichment of DEG lists), bulkrna-de / spatial-de (sibling DE skills for the other two data modalities)Python packages this skill's script needs. They are not installed for you — check before a long run.
adjustText, anndata, matplotlib, numpy, pandas, pydeseq2, scanpy, scipy, seaborn
© TianGzlab, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 10 other files (references) in skills/singlecell/scrna/sc-de of TianGzlab/OmicsClaw.
Open the folder on GitHubat commit 90a3bec
Sc De next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Sc De this skillTianGzlab/OmicsClaw | 161 | — | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| Scanpy Single-Cell Analysisdavila7/claude-code-templates | 32k | 16 repos | ~2.8k | Automated safety check: Pass | MIT | |
| Single Cell Rna AnalysisPKU-YuanGroup/OpenAI4S | 617 | — | ~1.3k | Automated safety check: Pass | MIT | |
| Anndatadavila7/claude-code-templates | 32k | 12 repos | ~2.5k | Automated safety check: Pass | MIT | |
| Cellxgene Censusdavila7/claude-code-templates | 32k | 11 repos | ~3.8k | Automated safety check: Pass | MIT | |
| Bulk RnaseqK-Dense-AI/scientific-agent-skills | 48k | 1 repos | ~4.2k | Automated safety check: Pass | MIT |
davila7/claude-code-templates
Walks through single-cell RNA-seq analysis with Scanpy: loading .h5ad and 10X data, QC, normalization, PCA and UMAP, Leiden clustering, marker genes and cell type annotation.
PKU-YuanGroup/OpenAI4S
Reproducible Scanpy workflow for human or mouse 10x scRNA-seq and snRNA-seq count matrices: single-sample descriptive QC, clustering and annotation, or comparative donor-aware pseudobulk DE and Milo…
davila7/claude-code-templates
This skill should be used when working with annotated data matrices in Python, particularly for single-cell genomics analysis, managing experimental measurements with metadata, or handling…
davila7/claude-code-templates
Query CZ CELLxGENE Census (61M+ cells). An agent skill from davila7/claude-code-templates.
K-Dense-AI/scientific-agent-skills
Prepares bulk RNA-seq FASTQ, Salmon, STAR or featureCounts output for gene-level differential expression.
K-Dense-AI/scientific-agent-skills
Performs pathway and gene-set enrichment analysis on gene lists or ranked gene data and interprets the results.
TianGzlab/OmicsClaw
Load when comparing gene expression between two conditions in bulk RNA-seq count data.
TianGzlab/OmicsClaw
Load when the user needs Deterministic fixed-period 24-hour single-component cosinor OLS rhythm analysis for a bulk RNA time-course CSV.
TianGzlab/OmicsClaw
Load when checking a bulk RNA-seq count matrix for library-size outliers, gene detection rates, and sample-sample correlation before DE.
TianGzlab/OmicsClaw
Load when checking raw single-cell FASTQ read quality (Phred / GC / adapter / length) before counting.
TianGzlab/OmicsClaw
Load when removing low-quality cells and lowly-detected genes from a single-cell AnnData using QC-derived thresholds or tissue presets.
TianGzlab/OmicsClaw
Load when ranking cluster-level marker genes from a clustered single-cell AnnData via Scanpy Wilcoxon / t-test / logreg or COSG specificity.
Works with
Categories
Load when finding marker genes per cluster or comparing condition expression in single-cell RNA-seq. Sc De is an agent skill from TianGzlab/OmicsClaw. Load when finding marker genes per cluster or comparing condition expression in single-cell RNA-seq.
Sc De fits situations like: tasks that involve Bioinformatics.
Run `npx skills add TianGzlab/OmicsClaw --skill sc-de -a claude-code`. Or copy the skill folder (skills/singlecell/scrna/sc-de in TianGzlab/OmicsClaw) into .claude/skills/sc-de in your project. Claude Code loads it when a task matches its description.
Run `npx skills add TianGzlab/OmicsClaw --skill sc-de -a codex`. Or copy the skill folder (skills/singlecell/scrna/sc-de in TianGzlab/OmicsClaw) into .agents/skills/sc-de in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TianGzlab/OmicsClaw --skill sc-de -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sc-de, .gemini/skills/sc-de, .github/skills/sc-de and .opencode/skills/sc-de in your project.
Going by SKILL.md and its folder, Sc De needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Sc De is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Sc De: Scanpy Single-Cell Analysis (davila7/claude-code-templates, 32k stars), Single Cell Rna Analysis (PKU-YuanGroup/OpenAI4S, 617 stars), Anndata (davila7/claude-code-templates, 32k stars) and Cellxgene Census (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
TianGzlab (a GitHub organization) maintains it in TianGzlab/OmicsClaw, which has 161 GitHub stars. The repository holds 88 skills in this directory. The repository was last updated on October 7, 2026.
Source: TianGzlab/OmicsClaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.