sc-metacell

sc-metacell is a skill for Claude Code, Codex from TianGzlab/OmicsClaw. It costs 72 tokens per session (1,380 once invoked), scanned A, original, Apache-2.0.

A tool that combines similar single cells into larger representative groups called metacells. Metacells reduce the number of units while retaining sample-aware expression patterns.

In plain words
What is it for?
Creating metacells from a normalised single-cell dataset using SEACells or KMeans, with mappings from original cells to metacells.
Why use it?
Individual cells can have sparse or noisy measurements. Aggregating similar cells can provide more stable units for gene-regulation studies, RNA-velocity analysis, or cluster-level statistics.

Skill for Claude CodeCodex

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

Good fit Creating metacells from a normalised single-cell dataset using SEACells or KMeans, with mappings from original cells to metacells.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tiangzlab/omicsclaw/sc-metacell
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-metacell
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-metacell

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tiangzlab/omicsclaw/sc-metacell"><img src="https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/sc-metacell.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,380 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.00072 $0.01380
Opus 5.5 $0.00029 $0.00552
Sonnet 5.5 $0.00014 $0.00276
Haiku 4.5 $0.00007 $0.00138

Measured 1mo ago against content hash 4919b5e10d5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sc-metacell 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 5 executable files (_api.py, examples/example_step.py, sc_metacell.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-metacell/SKILL.md · 127 lines

How it starts

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

sc-metacell

Use from a step

aggregation = load_skill("sc-metacell")
cells = read_input("clustered.h5ad")
metacells = aggregation.metacells(cells, method="kmeans", n_metacells=30)
write_output(aggregation.cell_to_metacell(cells), "tables/cell_to_metacell.csv")
write_output(aggregation.metacell_summary(metacells), "tables/metacell_summary.csv")
write_output(metacells, "intermediate/metacells.h5ad")

The input receives obs['metacell']; the returned AnnData contains the aggregates. See examples/example_step.py for a PBMC example.

API

metacells(adata, *, method: str='seacells', use_rep: str='X_pca', n_metacells: int=30, min_iter: int=10, max_iter: int=30, n_neighbors: int=15, n_pcs: int=20, random_state: int=0, celltype_key: str='leiden')

Annotate input cells and return a new mean-expression metacell AnnData.

KMeans uses the selected embedding. SEACells falls back to KMeans only when its package cannot be imported; a warning and run_info identify the fallback. Runtime errors propagate. Counts are averaged, not summed, using layers['counts'] when present, else X. Input X is preserved; obs['metacell'] receives the assignments.

:param method: seacells (default) or kmeans. :param use_rep: Existing embedding, default X_pca. :param n_metacells: Requested aggregates, default 30; at least 2 and fewer than cells. :param min_iter: SEACells minimum fitting iterations, default 10. :param max_iter: SEACells maximum fitting iterations, default 30. :param n_neighbors: Neighbor count for SEACells when its graph is absent, default 15. :param n_pcs: PCs for that graph, default 20. :param random_state: Seed for KMeans and SEACells initialization, default 0. :param celltype_key: SEACells dominant-celltype annotation, default leiden. KMeans retains the legacy dominant_label from the first obs column. :returns: A new AnnData with mean_expression layer, n_cells and dominant_label. :raises ValueError: The method, embedding or numerical parameters are invalid.

Read the full file on GitHub · 127 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 · -1 lines 4919b5e10d5a
  2. 2mo ago First seen · 128 lines · 72 tokens per session scan A 852c1d6b7d03

Subscribe to this mod's changes

sc-metacell is a skill published in the GitHub repository TianGzlab/OmicsClaw (161 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 72 tokens to every session and 1,380 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

sc-metacell compared with skills from other repositories

sc-metacell next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sc-metacellTianGzlab/OmicsClawSkill1611mo agoApache-2.0A72Claude Code, Codex
scanpysynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A68Claude Code, Codex
Virtual Embryo — atlas data + knowledge grapharistoteleo/PantheonOSSkill499todayBSD-2-ClauseA170Claude Code, Codex
Single-Cell Analysis Skills Indexaristoteleo/PantheonOSSkill499todayBSD-2-ClauseA48Claude Code, Codex
cellxgene-census-queryPharMolix/OpenBioMedSkill1.1k4mo agoMITA105Claude Code, Codex
single-cell-scrna-seq-analysis-scanpyPharMolix/OpenBioMedSkill1.1k4mo agoMITA85Claude Code, Codex
single-cell-multi-omics-analysis-scviPharMolix/OpenBioMedSkill1.1k4mo agoMITA94Claude Code, Codex