scgpt

scgpt is a skill for Claude Code, Codex from aipoch/open-science. It costs 89 tokens per session (1,372 once invoked), scanned A, original, Apache-2.0.

A method for using scGPT, a machine-learning model trained on single-cell biology data, to represent and label cells from an AnnData dataset. AnnData is a file and data structure commonly used for single-cell measurements.

In plain words
What is it for?
Use it to create per-cell embeddings, group or integrate single-cell datasets, label cell types without training for every case, and support gene-level perturbation or gene-regulation analyses.
Why use it?
It provides cell representations that can be used for grouping cells or comparing datasets, and supports cell-type labeling without requiring labels for every example. It requires the specified model files and suitable computing hardware.

Skill for Claude CodeCodex

About the project

Open Science is a local-first, model-agnostic workbench for reproducible scientific research. Scientists use its AI agents, Python and R execution, data connectors, and traceable outputs for tasks such as literature review, analysis, simulation, and visualization across macOS, Windows, and Linux.

aipoch/open-science · 3,497 stars · on GitHub

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.

agentmods
npx agentmods add skills/aipoch/open-science/scgpt
Any agent
npx skills add aipoch/open-science --skill scgpt
Clone the repo
git clone --depth 1 https://github.com/aipoch/open-science

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 scgpt

README.md
[![agentmods](https://agentmods.dev/badge/skills/aipoch/open-science/scgpt.svg)](https://agentmods.dev/skills/aipoch/open-science/scgpt)
Your own site
<a href="https://agentmods.dev/skills/aipoch/open-science/scgpt"><img src="https://agentmods.dev/badge/skills/aipoch/open-science/scgpt.svg" alt="Measured on agentmods" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,372 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00089 $0.01372
Opus 5 $0.00044 $0.00686
Sonnet 5 $0.00018 $0.00274
Haiku 4.5 $0.00009 $0.00137

Measured 5d ago against content hash c28cd78216ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

scgpt 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 5d ago.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • scgpt — 100% identical, 22 lines differ
resources/skills/scgpt/SKILL.md · 148 lines

How it starts

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

scGPT — Single-Cell Foundation Model

Prerequisites

Requirement Minimum Recommended
Python 3.10+ 3.11
CUDA 12.1+ 12.4+
GPU VRAM 16 GB 24 GB+

How to run

Loading the vocabulary and checkpoint

scGPT checkpoints are raw directories (args.json, best_model.pt, vocab.json) — not Hugging Face hub repos. Point at the directory, not an HF repo id.

from scgpt.tokenizer.gene_tokenizer import GeneVocab
gv = GeneVocab.from_file("/path/to/scgpt-human/vocab.json")
print(len(gv))   # 60697 for the released human checkpoint

Embedding an AnnData

import anndata as ad
from scgpt.tasks import embed_data

adata = ad.read_h5ad("dataset.h5ad")        # var must contain a gene-name column
emb = embed_data(
    adata,
    model_dir="/path/to/scgpt-human",
    gene_col="feature_name",
    use_fast_transformer=False,             # see Gotchas
)
# emb is an AnnData with .obsm["X_scGPT"]

Output format

embed_data returns an AnnData whose .obsm["X_scGPT"] is the per-cell embedding (n_cells × emb_dim, 512 by default). Downstream: feed to scanpy.pp.neighbors / scanpy.tl.umap.

Remote compute

Needs ≥24 GB VRAM and the released human checkpoint (~200 MB: args.json, best_model.pt, vocab.json). Read compute_details({provider, mode:'read'}) for an environment with scgpt and a pre-cached checkpoint directory, then:

c = host.compute.create(provider)
job = c.submitJob(
    intent="scGPT embed 50k cells — 1×GPU, ~5 min",
    inputs=[
        {"src": "dataset.h5ad", "dstFilename": "dataset.h5ad"},
        {"src": "embed.py", "dstFilename": "embed.py"},
    ],
    command="python3 embed.py",
    environment=...,   # env name from compute_details
    outputs=["embedded.h5ad"],
    timeoutSeconds=1800,
)
print(job.job_id)   # cell ends here — kernel never blocks on compute

Then call the wait_for_notification brain-tool. When the compute_done notification arrives, act on its payload:

Read the full file on GitHub · 148 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 148 lines · 89 tokens per session scan A c28cd78216ec

Subscribe to this mod's changes

scgpt is a skill published in the GitHub repository aipoch/open-science (3,497 stars, last pushed 2d ago), licensed Apache-2.0. It adds 89 tokens to every session and 1,372 once invoked, about $0.0004 per session on Opus 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-08-30.

Related

Other skills, from other repositories

build-paper-pipeline

Build the pipeline stages a manuscript's TODO comments ask for.

calkit/calkit · 17 tokens

check-questions

Review a Calkit project's questions and answers against their evidence. Use when the user invokes /calkit:check-questions, asks whether the project's answers are still true, or after a pipeline run changes results that answers cite.

calkit/calkit · 51 tokens

clinical-case-report

Structured medical case presentation for clinical rounds, conferences, and documentation. Generates SOAP-format or narrative case reports with physiologically accurate vitals, labs, and evidence-based plans. Use when the brief mentions "case report", "case presentation", "SOAP note", "clinical case", "ward rounds"…

nexu-io/open-design · 73 tokens

source-verify

医学信源快速或完整核验。普通教育性医学问答用单一权威正文快速核验;最新版本、精确推荐、高风险药品、医保监管或跨版本请求升级为完整核验。只整理学习依据,不生成诊疗、处方、急诊处置、医保报销结论或HIS执行建议。.

TencentCloud/Octop · 80 tokens

conventions

Calkit conventions and foundational context. Load whenever working in a Calkit project—defines calkit.yaml structure, environments, pipeline stages, CLI commands, and version control conventions.

calkit/calkit · 40 tokens

check-reproducibility

Check whether a project is fully traceable, and fix what isn't, including numbers typed into a manuscript that no pipeline output accounts for. Use when the user invokes /calkit:check-reproducibility, asks whether a project is reproducible, or asks where a number in a paper came from.

calkit/calkit · 68 tokens