sc-clustering

sc-clustering is a skill for Claude Code, Codex from TianGzlab/OmicsClaw. It costs 73 tokens per session (2,726 once invoked), scanned A, original, Apache-2.0.

A standard single-cell analysis that builds a graph of nearby cells, places them in a visual map, and groups similar cells into clusters. The map can use methods such as UMAP, t-SNE, diffusion maps, or PHATE.

In plain words
What is it for?
Use it on normalised single-cell data with principal components or another integrated representation already available. It helps explore cell populations before marker analysis or cell-type annotation.
Why use it?
A table of gene counts is difficult to inspect directly, and similar cells are not yet organised into groups. This creates visual and cluster summaries that reveal population structure.

Skill for Claude CodeCodex

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

Good fit Use it on normalised single-cell data with principal components or another integrated representation already available. It helps explore cell populations before marker analysis or cell-type annotation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tiangzlab/omicsclaw/sc-clustering
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 TianGzlab/OmicsClaw --skill sc-clustering
Clone the repo
git clone --depth 1 https://github.com/TianGzlab/OmicsClaw

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 sc-clustering

README.md
[![agentmods](https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/sc-clustering/github.svg)](https://agentmods.dev/skills/tiangzlab/omicsclaw/sc-clustering)
Your own site
<a href="https://agentmods.dev/skills/tiangzlab/omicsclaw/sc-clustering"><img src="https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/sc-clustering/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 sc-clustering

Your own site · 80×15
<a href="https://agentmods.dev/skills/tiangzlab/omicsclaw/sc-clustering"><img src="https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/sc-clustering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,726 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
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 3
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
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.00073 $0.02726
Opus 5.5 $0.00029 $0.01090
Sonnet 5.5 $0.00015 $0.00545
Haiku 4.5 $0.00007 $0.00273

Measured 14d ago against content hash 73c3a68a4d83, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sc-clustering 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 14d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (_api.py, examples/example_step.py, sc_cluster.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.

skills/singlecell/scrna/sc-clustering/SKILL.md · 169 lines

How it starts

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

sc-clustering

When to use

The user has a normalised AnnData with PCA / integrated embedding already populated and wants the standard scRNA neighbour-graph → embedding → cluster workflow. Combinable in one call: pick an embedding method (umap default, also tsne / diffmap / phate) and a clustering method (leiden default, also louvain), with an explicit resolution or auto-resolution search. Reads from obsm["X_pca"] / obsm["X_harmony"] / etc. via use_rep.

Use from a step

clustering = load_skill("sc-clustering")
adata = read_input("results/02_preprocess/intermediate/adata_preprocessed.h5ad")
# resolution 0.8: the user wants broad cell types; sc-clustering's default is 1.0.
adata = clustering.cluster(adata, resolution=0.8)
write_output(clustering.cluster_summary(adata, key="leiden"), "tables/cluster_summary.csv")
write_output(clustering.embedding_figure(adata, color="leiden"), "figures/umap_leiden.png")
write_output(adata, "intermediate/adata_clustered.h5ad")

A complete step that runs on demo data: examples/example_step.py.

API

cluster(adata, *, use_rep: str | None=None, use_existing_graph: bool=False, n_neighbors: int=15, n_pcs: int=50, embedding: str='umap', method: str='leiden', resolution: float=1.0, random_state: int=0, umap_min_dist: float=0.5, umap_spread: float=1.0, tsne_perplexity: float=30.0, tsne_metric: str='euclidean', diffmap_n_comps: int=15, phate_knn: int=15, phate_decay: int=40)

Build the neighbour graph, cluster the cells and compute a 2-D embedding, in place.

Writes obs[method] (the cluster labels, a categorical of strings), obsm['X_<embedding>'], the graph in obsp and uns['neighbors'], and records the cluster key as the primary one in the matrix contract.

:param use_rep: The obsm key the graph is built on. Default None: the first of X_pca, X_harmony, X_scvi, X_scanvi, X_scanorama present. Pass X_harmony or X_scvi after batch integration. :param n_neighbors: Neighbours per cell in the graph. Default 15, scanpy's default. Larger values give smoother, coarser structure. :param use_existing_graph: Keep the graph in uns['neighbors'] and obsp instead of rebuilding it. Default False; set True after BBKNN. Graph construction parameters are then ignored; UMAP and diffusion maps use the retained graph, while t-SNE and PHATE still use use_rep. :param n_pcs: Components of use_rep to use. Default 50; pick it from sc-preprocessing's pca_variance_table (the elbow) when the data are small. :param embedding: "umap" (default), "tsne", "diffmap" or "phate". :param method: "leiden" (default) or "louvain"; also the obs column written. :param resolution: Clustering resolution. Default 1.0, scanpy's default. Lower it (0.3 to 0.6) for broad cell types, raise it for finer subtypes; or use :func:auto_resolution. :param random_state: Seed for the graph, the clustering and the embedding. Default 0, scanpy's default, which makes reruns reproduce the labels. :param umap_min_dist: UMAP min_dist. Default 0.5, scanpy's default. :param umap_spread: UMAP spread. Default 1.0, scanpy's default. :param tsne_perplexity: t-SNE perplexity. Default 30. :param tsne_metric: t-SNE distance metric. Default "euclidean". :param diffmap_n_comps: Diffusion-map components. Default 15. :param phate_knn: PHATE neighbours. Default 15. :param phate_decay: PHATE alpha decay. Default 40. :returns: The same AnnData. :raises ValueError: no embedding is available, or an unknown method or embedding.

Read the full file on GitHub · 169 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. 14d ago Changed · +46 lines 73c3a68a4d83
  2. 1mo ago First seen · 123 lines · 73 tokens per session scan A 3ab5ebe80132

Subscribe to this mod's changes

sc-clustering is a skill published in the GitHub repository TianGzlab/OmicsClaw (161 stars, last pushed 14d ago), licensed Apache-2.0. It adds 73 tokens to every session and 2,726 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

Other skills, from other repositories

scanpy

Standard single-cell RNA-seq analysis pipeline. Use for QC, normalization, dimensionality reduction (PCA/UMAP/t-SNE), clustering, differential expression, and visualization. Best for exploratory scRNA-seq analysis with established workflows. For deep learning models use scvi-tools; for data format questions use…

synthetic-sciences/openscience · 68 tokens

spatial-domain-identification

Identify tissue regions and spatial niches from preprocessed spatial transcriptomics data using Leiden, Louvain, SpaGCN, STAGATE, GraphST, or BANKSY.

ShangBioLab/SpatialClaw · 40 tokens

Virtual Embryo — atlas data + knowledge graph

Query the Virtual Embryo knowledge graph (mouse/human developmental biology: genes, anatomy, Theiler/Carnegie stages, gene expression, diseases, papers) and its 3D atlas catalog (anatomical OPT/light-sheet volumes + 3D spatial- transcriptomics datasets), and visualise those datasets in 3D with the volume3d / spatial3d…

aristoteleo/PantheonOS · 170 tokens

single-cell-scrna-seq-analysis-scanpy

Complete single-cell RNA-seq analysis workflow built on Scanpy and AnnData. Use this skill when: (1) Loading diverse single-cell data formats (10X, h5ad, CSV), (2) Performing quality control and filtering, (3) Normalization, dimensionality reduction, and clustering, (4) Marker gene identification and cell type…

PharMolix/OpenBioMed · 85 tokens

neuropixels-analysis

Analyzes Neuropixels extracellular recordings end-to-end with SpikeInterface. Covers loading SpikeGLX/Open Ephys/NWB data, preprocessing, drift/motion correction, Kilosort4 (and CPU) spike sorting, quality metrics, and unit curation (threshold-based, model-based UnitRefine, and AI-assisted visual review). Use when…

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

onekgpd

Queries the 1000 Genomes Project dataset (3,202 whole-genome-sequenced individuals, GRCh38) at the level of individual participants. Use when a question is about individuals or variants in the 1000 Genomes Project cohort: which individuals carry variants matching specific criteria in a gene or region, which…

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