Agent skill

Sc Preprocessing

by TianGzlab in TianGzlab/OmicsClaw

Load when normalising QC'd scRNA into a PCA-ready AnnData via scanpy / Seurat / SCTransform / Pearson residuals.

MITAuto-check passedResearch & Science

Install Sc Preprocessing

skills CLI
$ npx skills add TianGzlab/OmicsClaw --skill sc-preprocessing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install TianGzlab/OmicsClaw sc-preprocessing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/singlecell/scrna/sc-preprocessing .claude/skills/sc-preprocessing && rm -rf skills-src

Use ~/.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/

Facts

Skill name
sc-preprocessing
GitHub stars
161
Token cost
~1.4k tokens
SKILL.md length
401 words
Files
10 (incl. references)
Skills in repo
95
Repo updated
First seen
Licence
MIT

At a glance

Load when normalising QC'd scRNA into a PCA-ready AnnData via scanpy / Seurat / SCTransform / Pearson residuals.

  • Works in 6 steps: Load AnnData; infer species;… → Reuse existing QC if n_genes_by_counts /… → Apply shared filtering (--min-genes,… → …
  • Tasks that involve Bioinformatics
  • SKILL.md covers When to use, Inputs & Outputs, Flow and Gotchas, plus 2 more sections
  • Runs Python scripts from its folder; calls python

What it does

Sc Preprocessing is an agent skill from TianGzlab/OmicsClaw. Load when normalising QC'd scRNA into a PCA-ready AnnData via scanpy / Seurat / SCTransform / Pearson residuals. Skip when QC thresholds are still undecided (use sc-qc); batch correction across samples (use sc-batch-integration).

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including reference files (for example `references/methodology.md`, `references/output_contract.md` and `references/parameters.md`).

It sits in Research & Science, covering Bioinformatics. It works with AnnData and 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 MIT.

When your agent uses it

  • Tasks that involve Bioinformatics

Example prompts

  • “/sc-preprocessing”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Load AnnData; infer species; canonicalise gene-name / expression layout via the shared single-cell standardiser.
  2. Reuse existing QC if n_genes_by_counts / total_counts / pct_counts_mt are present in obs; otherwise compute them.
  3. Apply shared filtering (--min-genes, --min-cells, --max-mt-pct); drop doublets when predicted_doublet / doublet_score columns are present…
  4. Run the chosen normalisation backend (scanpy / seurat / sctransform / pearson_residuals).
  5. Select HVGs (--n-top-hvg) and compute PCA (--n-pcs).
  6. Save processed.h5ad, tables, figures, report.md, result.json.

What it can do on your machine

Read from SKILL.md and the folder at commit 6fbd79f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sc Preprocessing loads about 1.4k tokens when it runs, and up to ~3.7k if it reads all its reference files. Until then it costs about 62 tokens; SKILL.md has 401 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.7k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from TianGzlab/OmicsClaw at commit 6fbd79f, republished under its MIT licence (© TianGzlab). 401 words, ~1,375 tokens.

Download SKILL.mdSave it as .claude/skills/sc-preprocessing/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
sc-preprocessing
description
Load when normalising QC'd scRNA into a PCA-ready AnnData via scanpy / Seurat / SCTransform / Pearson residuals. Skip when QC thresholds are still undecided (use sc-qc); batch correction across samples (use sc-batch-integration).
version
0.6.0
author
OmicsClaw
license
MIT
emoji
🧫
tags
singlecell, scrna, preprocessing, normalization, hvg, pca, scanpy, seurat, sctransform, pearson_residuals
requires
anndata, matplotlib, numpy, pandas, phate, scanpy, scipy, seaborn

sc-preprocessing

When to use

The user has a filtered, QC-annotated AnnData and wants the standard "normalise → HVG → PCA" pipeline before clustering or batch integration. Four interchangeable backends are available: scanpy (default; CP10k log + HVG seurat flavour), seurat (R-backed LogNormalize / CLR / RC), sctransform (R-backed regularised NB), and pearson_residuals (raw-count HVG selection plus Pearson residual transformation). The skill stops at PCA — UMAP / clustering live in sc-clustering, multi-sample correction in sc-batch-integration.

Inputs & Outputs

<!-- AUTO-GENERATED from skill.yaml (interface) — do not edit by hand. Regenerate: python scripts/generate_skill_md.py <skill_dir> -->

Inputs

  • Modalities: scrna
  • File types: .h5ad

Outputs

  • tables/X_norm.csv
  • tables/cell_metadata.csv
  • tables/cluster_summary.csv
  • tables/embedding_points.csv
  • tables/gene_expression.csv
  • tables/hvg.csv
  • tables/hvg_summary.csv
  • tables/obs.csv
  • tables/pca.csv
  • tables/pca_embedding.csv
  • tables/pca_variance_ratio.csv
  • tables/preprocess_summary.csv
  • tables/qc_metrics_per_cell.csv
  • figures/highly_variable_genes.png
  • figures/pca_variance.png
  • figures/qc_violin.png
  • figures/r_hvg_violin.png
  • analysis_summary.txt
  • info.json
  • processed.h5ad
  • report.md
  • result.json
  • Processed AnnData (saves_h5ad) — adds obsm: X_pca; var: highly_variable; layers: counts
  • AnnData processing state after success: preprocessed

Flow

  1. Load AnnData; infer species; canonicalise gene-name / expression layout via the shared single-cell standardiser.
  2. Reuse existing QC if n_genes_by_counts / total_counts / pct_counts_mt are present in obs; otherwise compute them.
  3. Apply shared filtering (--min-genes, --min-cells, --max-mt-pct); drop doublets when predicted_doublet / doublet_score columns are present (opt out via --no-remove-doublets).
  4. Run the chosen normalisation backend (scanpy / seurat / sctransform / pearson_residuals).
  5. Select HVGs (--n-top-hvg) and compute PCA (--n-pcs).
  6. Save processed.h5ad, tables, figures, report.md, result.json.
Show full SKILL.md (212 more words)Show less

Gotchas

  • result.json["n_pcs_used"] may be smaller than the requested --n-pcs. sc_preprocess.py:876 reads obsm["X_pca"].shape[1] after PCA — small matrices cap the count below the request. Trust n_pcs_used, not the input flag, when handing off to sc-clustering --n-pcs.
  • R-backed seurat / sctransform need a working Rscript env. sc_preprocess.py:271 raises RuntimeError("Seurat preprocessing returned no overlapping cells or genes") when the R round-trip empties the matrix; sc_preprocess.py:296 raises RuntimeError("Seurat preprocessing returned PCA rows that do not align with exported cells") when the R-side PCA shape disagrees with the cell list. Confirm Seurat, SingleCellExperiment, zellkonverter (and sctransform for that method) are installed before picking these methods.
  • Doublet filter is on-by-default whenever sc-doublet-detection ran. sc_preprocess.py:510-511 passes filter_doublets=True and doublet_score_threshold=0.25 when those columns exist in obs. To keep the called-doublet rows, pass --no-remove-doublets.
  • figure_data/gene_expression.csv write failures are silent. sc_preprocess.py:670-672 catches the exception and only logs a warning — figure_data/manifest.json is the source of truth for which figure-data files actually landed.
  • --input is mandatory unless --demo. sc_preprocess.py:1013 raises ValueError("--input required when not using --demo").

Key CLI

bash
# Demo (built-in synthetic data)
python omicsclaw.py run sc-preprocessing --demo --output /tmp/sc_preprocess_demo

# Default scanpy backend
python omicsclaw.py run sc-preprocessing \
  --input filtered.h5ad --output results/

# R-backed Seurat LogNormalize
python omicsclaw.py run sc-preprocessing \
  --input filtered.h5ad --output results/ \
  --method seurat --seurat-normalize-method LogNormalize

# Pearson residuals (recommended for very sparse / heterogeneous data)
python omicsclaw.py run sc-preprocessing \
  --input filtered.h5ad --output results/ \
  --method pearson_residuals --n-top-hvg 3000

See also

  • references/parameters.md — every CLI flag and per-method tuning hint
  • references/methodology.md — when each backend wins; canonicalisation contract
  • references/output_contract.md — obs / obsm / layers / uns schema + table layouts
  • Adjacent skills: sc-qc / sc-filter (upstream — produce the input), sc-batch-integration (parallel — multi-sample alternative path; consumes obsm["X_pca"]), sc-clustering (downstream — consumes obsm["X_pca"] for neighbour-graph + UMAP + Leiden)

© TianGzlab, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (references) in skills/singlecell/scrna/sc-preprocessing of TianGzlab/OmicsClaw.

  • SKILL.md
  • references/methodology.md
  • references/output_contract.md
  • references/parameters.md
  • references/r_visualization.md
  • sc_preprocess.py
  • skill.yaml
  • tests/__init__.py
  • tests/test_sc_preprocess.py
  • tests/test_sc_preprocess_methods.py

Open the folder on GitHubat commit 6fbd79f

Compare with similar skills

Sc Preprocessing 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.

Sc Preprocessing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sc Preprocessing this skillTianGzlab/OmicsClaw161—~1.4kAutomated safety check: PassMIT
Scanpy Single-Cell Analysisdavila7/claude-code-templates32k16 repos~2.8kAutomated safety check: PassMIT
Anndatadavila7/claude-code-templates32k12 repos~2.5kAutomated safety check: PassMIT
ScanpyK-Dense-AI/scientific-agent-skills48k1 repos~5.1kAutomated safety check: PassBSD-3-Clause
Cellxgene CensusK-Dense-AI/scientific-agent-skills48k1 repos~3.4kAutomated safety check: NotesMIT
Omics ToolsDrugClaw/DrugClaw125—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • 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.

    32k GitHub starsUsed in 16 repos~2.8k tokens
    Research & ScienceAuto-check passed
  • Anndata

    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…

    32k GitHub starsUsed in 12 repos~2.5k tokens
    Research & ScienceAuto-check passed
  • Scanpy

    K-Dense-AI/scientific-agent-skills

    Performs Scanpy single-cell RNA-seq QC, normalization, HVG selection, PCA/UMAP/t-SNE, clustering, exploratory marker ranking, pseudobulk preparation, visualization, and Seurat or…

    48k GitHub starsUsed in 1 repo~5.1k tokens
    Research & ScienceAuto-check passed
  • Cellxgene Census

    K-Dense-AI/scientific-agent-skills

    Queries the CZ CELLxGENE Census programmatically for versioned public single-cell and spatial transcriptomics data.

    48k GitHub starsUsed in 1 repo~3.4k tokens
    Research & ScienceAuto-check: notes
  • Omics Tools

    DrugClaw/DrugClaw

    Omics and single-cell workflow guide for AnnData, Scanpy-style dataset profiling, PyDESeq2-oriented count checks, pysam alignment inspection, and pyOpenMS mass-spectrometry summaries.

    125 GitHub stars~1.1k tokensUpdated 6 mo ago
    Research & ScienceAuto-check passed
  • Anndata Data Structure

    jaechang-hits/SciAgent-Skills

    Annotated matrices for single-cell genomics. An agent skill from jaechang-hits/SciAgent-Skills.

    370 GitHub starsUsed in 2 repos~5.8k tokens
    Research & ScienceAuto-check passed

More from TianGzlab/OmicsClaw

All 95 skills in this repo
  • Bulkrna Batch Correction

    TianGzlab/OmicsClaw

    Load when removing batch effects from a multi-cohort bulk RNA-seq dataset using ComBat (R or Python implementation).

    161 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Bulkrna Coexpression

    TianGzlab/OmicsClaw

    Load when discovering gene co-expression modules and hub genes in a bulk RNA-seq cohort via WGCNA-style soft-thresholded networks.

    161 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Bulkrna De

    TianGzlab/OmicsClaw

    Load when comparing gene expression between two conditions in bulk RNA-seq count data.

    161 GitHub stars~976 tokensUpdated 2 mo ago
    Auto-check passed
  • Bulkrna Deconvolution

    TianGzlab/OmicsClaw

    Load when estimating cell-type proportions in bulk RNA-seq samples from a single-cell or signature-matrix reference.

    161 GitHub stars~984 tokensUpdated 2 mo ago
    Auto-check passed
  • Bulkrna Enrichment

    TianGzlab/OmicsClaw

    Load when running pathway / GO term enrichment on a bulk RNA-seq DE result list.

    161 GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Bulkrna Geneid Mapping

    TianGzlab/OmicsClaw

    Load when converting gene identifiers between Ensembl, Entrez, and HGNC symbol in a bulk RNA-seq count matrix.

    161 GitHub stars~1k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Questions about Sc Preprocessing

What does Sc Preprocessing do?

Load when normalising QC'd scRNA into a PCA-ready AnnData via scanpy / Seurat / SCTransform / Pearson residuals. Sc Preprocessing is an agent skill from TianGzlab/OmicsClaw. Load when normalising QC'd scRNA into a PCA-ready AnnData via scanpy / Seurat / SCTransform / Pearson residuals.

When should I use Sc Preprocessing?

Sc Preprocessing fits situations like: tasks that involve Bioinformatics.

How do I install Sc Preprocessing in Claude Code?

Run `npx skills add TianGzlab/OmicsClaw --skill sc-preprocessing -a claude-code`. Or copy the skill folder (skills/singlecell/scrna/sc-preprocessing in TianGzlab/OmicsClaw) into .claude/skills/sc-preprocessing in your project. Claude Code loads it when a task matches its description.

How do I install Sc Preprocessing in Codex?

Run `npx skills add TianGzlab/OmicsClaw --skill sc-preprocessing -a codex`. Or copy the skill folder (skills/singlecell/scrna/sc-preprocessing in TianGzlab/OmicsClaw) into .agents/skills/sc-preprocessing in your project. Codex loads it when a task matches its description.

Can I use Sc Preprocessing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TianGzlab/OmicsClaw --skill sc-preprocessing -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-preprocessing, .gemini/skills/sc-preprocessing, .github/skills/sc-preprocessing and .opencode/skills/sc-preprocessing in your project.

What does Sc Preprocessing need to run?

Going by SKILL.md and its folder, Sc Preprocessing needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Sc Preprocessing access the network?

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.

Is Sc Preprocessing safe to install?

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.

What licence does Sc Preprocessing use?

Sc Preprocessing is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sc Preprocessing use?

About 1.4k tokens (SKILL.md is roughly 5.5k 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 2.3k tokens, read only when the agent opens those files.

What are the alternatives to Sc Preprocessing?

Skills that share tags, products or a category with Sc Preprocessing: Scanpy Single-Cell Analysis (davila7/claude-code-templates, 32k stars), Anndata (davila7/claude-code-templates, 32k stars), Scanpy (K-Dense-AI/scientific-agent-skills, 48k stars) and Cellxgene Census (K-Dense-AI/scientific-agent-skills, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sc Preprocessing?

TianGzlab (a GitHub organization) maintains it in TianGzlab/OmicsClaw, which has 161 GitHub stars. The repository holds 95 skills in this directory. The repository was last updated on July 28, 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.