[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AWVT619FP7GRH9SWXFMTGC":3,"skill-same:01M7AWVT619FP7GRH9SWXFMTGC":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":14,"repositoryHtmlUrl":38,"repositoryHomepageUrl":6,"ownerHtmlUrl":39,"ownerBlogUrl":40,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M7AWVT619FP7GRH9SWXFMTGC","scgpt",null,"Embed and annotate single-cell expression data with scGPT, a foundation model for single-cell biology. Use this skill when: (1) Producing cell embeddings from an AnnData for clustering\u002Fintegration, (2) Zero-shot or fine-tuned cell-type annotation, (3) Gene-level representation for perturbation\u002FGRN tasks.\nFor probabilistic single-cell models (scVI etc.), use the scvi-tools library.","flyme2bluemoon\u002Fskills","flyme2bluemoon","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F37197710?v=4","01M7AWSKCXRPGZSNS26MTB5YR4","Matthew Shen","01M7AWSKE11G83QK1885PSGJ3K",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills-examples\u002Fclaude-science-skills\u002Fscgpt\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: scgpt\ndescription: >\n  Embed and annotate single-cell expression data with scGPT, a foundation model\n  for single-cell biology. Use this skill when:\n  (1) Producing cell embeddings from an AnnData for clustering\u002Fintegration,\n  (2) Zero-shot or fine-tuned cell-type annotation,\n  (3) Gene-level representation for perturbation\u002FGRN tasks.\n\n  For probabilistic single-cell models (scVI etc.), use the scvi-tools\n  library.\nlicense: Apache-2.0\nmetadata:\n  category: biomodels\n  requirements: [gpu]\n  display-name: scGPT\n  # scGPT checkpoints are distributed as unlabeled Google Drive directories\n  # (linked from github.com\u002Fbowang-lab\u002FscGPT); the repo LICENSE (MIT) covers\n  # the CODE, and no source states a weights license. Per the sourcing rule:\n  # leave `license` absent. Repo root is a README, not a terms page —\n  # info_url. verified 2026-06-30\n  third_party:\n    - kind: weights\n      name: scGPT\n      provider: Wang Lab (University of Toronto)\n      info_url: https:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FscGPT\n---\n\n# scGPT — Single-Cell Foundation Model\n\n## Prerequisites\n\n| Requirement | Minimum | Recommended |\n| ----------- | ------- | ----------- |\n| Python      | 3.10+   | 3.11        |\n| CUDA        | 12.1+   | 12.4+       |\n| GPU VRAM    | 16 GB   | 24 GB+      |\n\n## How to run\n\n### Loading the vocabulary and checkpoint\n\nscGPT checkpoints are **raw directories** (`args.json`, `best_model.pt`,\n`vocab.json`) — not Hugging Face hub repos. Point at the directory, not an HF\nrepo id.\n\n```python\nfrom scgpt.tokenizer.gene_tokenizer import GeneVocab\ngv = GeneVocab.from_file(\"\u002Fpath\u002Fto\u002Fscgpt-human\u002Fvocab.json\")\nprint(len(gv))   # 60697 for the released human checkpoint\n```\n\n### Embedding an AnnData\n\n```python\nimport anndata as ad\nfrom scgpt.tasks import embed_data\n\nadata = ad.read_h5ad(\"dataset.h5ad\")        # var must contain a gene-name column\nemb = embed_data(\n    adata,\n    model_dir=\"\u002Fpath\u002Fto\u002Fscgpt-human\",\n    gene_col=\"feature_name\",\n    use_fast_transformer=False,             # see Gotchas\n)\n# emb is an AnnData with .obsm[\"X_scGPT\"]\n```\n\n## Output format\n\n`embed_data` returns an `AnnData` whose `.obsm[\"X_scGPT\"]` is the per-cell\nembedding (`n_cells × emb_dim`, 512 by default). Downstream: feed to\n`scanpy.pp.neighbors` \u002F `scanpy.tl.umap`.\n\n\n## Remote compute\n\nNeeds ≥24 GB VRAM and the released human checkpoint (~200 MB:\n`args.json`, `best_model.pt`, `vocab.json`). Read\n`compute_details({provider, mode:'read'})` for an environment with `scgpt`\nand a pre-cached checkpoint directory, then:\n\n```python\nc = host.compute.create(provider)\njob = c.submit_job(\n    intent=\"scGPT embed 50k cells — 1×GPU, ~5 min\",\n    inputs=[\n        \"dataset.h5ad\",\n        \"embed.py\",\n    ],\n    # env activation is host-specific — put it IN the command string\n    # (e.g. \"conda run -n \u003Cenv> python3 embed.py\"; see compute_details)\n    command=\"python3 embed.py\",\n    outputs=[\"embedded.h5ad\"],\n    run_timeout_s=1800,\n)\n# the Job repr just printed itself (id, notes) — cell ends here; the kernel never waits on the job\n```\n\nThen call the `wait_for_notification` brain-tool. When the\n`compute_done` notification arrives, act on its payload:\n\n```python\nsave_artifacts(payload[\"output_files\"])   # paths under hpc\u002F\u003Cjob_id>\u002F\n```\n\nFor the full record (`files`, `stdout_tail`, `notes`, …), re-enter the\nkernel and bind the compute handle separately — `.close()` lives on the\nhandle, not on the job object:\n\n```python\nc = host.compute.create(provider)\nres = c.attach_job(job_id).result()   # a read of the persisted result, never a wait\nc.close(intent=\"scGPT embedding done\")\n```\n\nSee the `remote-compute-ssh` \u002F `remote-compute-modal` skill for the\norchestration details.\n\nIn `embed.py`, pass `model_dir=` the checkpoint path from `compute_details`.\nIf `flash-attn` is unavailable in that environment, set\n`use_fast_transformer=False`.\n\n\n## Gotchas\n\n- **`use_fast_transformer` default is `True`** but resolves to a FlashAttention\n  path that may not import in every env. Pass `use_fast_transformer=False`\n  unless you've confirmed `flash_attn` loads cleanly.\n- The package historically depended on `torchtext.vocab.Vocab`; in\n  environments without torchtext a pure-Python shim provides `Vocab` —\n  functionally identical for `GeneVocab`, but if you hit\n  `AttributeError: 'Vocab' object has no attribute …`, you're on a stale shim.\n- Gene names must match the vocab; unmatched genes are dropped. Set\n  `gene_col` to the column in `adata.var` that holds symbols.\n\n## Troubleshooting\n\n| Symptom                                           | Fix                                              |\n| ------------------------------------------------- | ------------------------------------------------ |\n| `flash_attn is not installed` warning at import   | Harmless; pass `use_fast_transformer=False`      |\n| `'Vocab' object has no attribute 'vocab'`         | Env has an old torchtext shim — update the env   |\n| Nearly all genes dropped                          | Wrong `gene_col`; check `adata.var.columns`      |\n| \"scgpt not in manifest\" \u002F env-detection misses scGPT | The baked env manifest lists the distribution as `scGPT` (and `flash_attn`), pip's canonical casing — normalize manifest keys before lookup: `name.lower().replace('-', '_')` |\n\n---\n\n**Next**: cluster\u002Fannotate the embedding with the scanpy library\n(`sc.pp.neighbors` → `sc.tl.leiden` \u002F `sc.tl.umap`), or compare to an\nscvi-tools latent space on the same data.\n","# scGPT — Single-Cell Foundation Model\n\n## Prerequisites\n\n| Requirement | Minimum | Recommended |\n| ----------- | ------- | ----------- |\n| Python      | 3.10+   | 3.11        |\n| CUDA        | 12.1+   | 12.4+       |\n| GPU VRAM    | 16 GB   | 24 GB+      |\n\n## How to run\n\n### Loading the vocabulary and checkpoint\n\nscGPT checkpoints are **raw directories** (`args.json`, `best_model.pt`,\n`vocab.json`) — not Hugging Face hub repos. Point at the directory, not an HF\nrepo id.\n\n```python\nfrom scgpt.tokenizer.gene_tokenizer import GeneVocab\ngv = GeneVocab.from_file(\"\u002Fpath\u002Fto\u002Fscgpt-human\u002Fvocab.json\")\nprint(len(gv))   # 60697 for the released human checkpoint\n```\n\n### Embedding an AnnData\n\n```python\nimport anndata as ad\nfrom scgpt.tasks import embed_data\n\nadata = ad.read_h5ad(\"dataset.h5ad\")        # var must contain a gene-name column\nemb = embed_data(\n    adata,\n    model_dir=\"\u002Fpath\u002Fto\u002Fscgpt-human\",\n    gene_col=\"feature_name\",\n    use_fast_transformer=False,             # see Gotchas\n)\n# emb is an AnnData with .obsm[\"X_scGPT\"]\n```\n\n## Output format\n\n`embed_data` returns an `AnnData` whose `.obsm[\"X_scGPT\"]` is the per-cell\nembedding (`n_cells × emb_dim`, 512 by default). Downstream: feed to\n`scanpy.pp.neighbors` \u002F `scanpy.tl.umap`.\n\n\n## Remote compute\n\nNeeds ≥24 GB VRAM and the released human checkpoint (~200 MB:\n`args.json`, `best_model.pt`, `vocab.json`). Read\n`compute_details({provider, mode:'read'})` for an environment with `scgpt`\nand a pre-cached checkpoint directory, then:\n\n```python\nc = host.compute.create(provider)\njob = c.submit_job(\n    intent=\"scGPT embed 50k cells — 1×GPU, ~5 min\",\n    inputs=[\n        \"dataset.h5ad\",\n        \"embed.py\",\n    ],\n    # env activation is host-specific — put it IN the command string\n    # (e.g. \"conda run -n \u003Cenv> python3 embed.py\"; see compute_details)\n    command=\"python3 embed.py\",\n    outputs=[\"embedded.h5ad\"],\n    run_timeout_s=1800,\n)\n# the Job repr just printed itself (id, notes) — cell ends here; the kernel never waits on the job\n```\n\nThen call the `wait_for_notification` brain-tool. When the\n`compute_done` notification arrives, act on its payload:\n\n```python\nsave_artifacts(payload[\"output_files\"])   # paths under hpc\u002F\u003Cjob_id>\u002F\n```\n\nFor the full record (`files`, `stdout_tail`, `notes`, …), re-enter the\nkernel and bind the compute handle separately — `.close()` lives on the\nhandle, not on the job object:\n\n```python\nc = host.compute.create(provider)\nres = c.attach_job(job_id).result()   # a read of the persisted result, never a wait\nc.close(intent=\"scGPT embedding done\")\n```\n\nSee the `remote-compute-ssh` \u002F `remote-compute-modal` skill for the\norchestration details.\n\nIn `embed.py`, pass `model_dir=` the checkpoint path from `compute_details`.\nIf `flash-attn` is unavailable in that environment, set\n`use_fast_transformer=False`.\n\n\n## Gotchas\n\n- **`use_fast_transformer` default is `True`** but resolves to a FlashAttention\n  path that may not import in every env. Pass `use_fast_transformer=False`\n  unless you've confirmed `flash_attn` loads cleanly.\n- The package historically depended on `torchtext.vocab.Vocab`; in\n  environments without torchtext a pure-Python shim provides `Vocab` —\n  functionally identical for `GeneVocab`, but if you hit\n  `AttributeError: 'Vocab' object has no attribute …`, you're on a stale shim.\n- Gene names must match the vocab; unmatched genes are dropped. Set\n  `gene_col` to the column in `adata.var` that holds symbols.\n\n## Troubleshooting\n\n| Symptom                                           | Fix                                              |\n| ------------------------------------------------- | ------------------------------------------------ |\n| `flash_attn is not installed` warning at import   | Harmless; pass `use_fast_transformer=False`      |\n| `'Vocab' object has no attribute 'vocab'`         | Env has an old torchtext shim — update the env   |\n| Nearly all genes dropped                          | Wrong `gene_col`; check `adata.var.columns`      |\n| \"scgpt not in manifest\" \u002F env-detection misses scGPT | The baked env manifest lists the distribution as `scGPT` (and `flash_attn`), pip's canonical casing — normalize manifest keys before lookup: `name.lower().replace('-', '_')` |\n\n---\n\n**Next**: cluster\u002Fannotate the embedding with the scanpy library\n(`sc.pp.neighbors` → `sc.tl.leiden` \u002F `sc.tl.umap`), or compare to an\nscvi-tools latent space on the same data.\n",{"name":5,"license":15,"metadata":24,"description":34},{"category":25,"third_party":26,"display-name":29,"requirements":32},"biomodels",[27],{"kind":28,"name":29,"info_url":30,"provider":31},"weights","scGPT","https:\u002F\u002Fgithub.com\u002Fbowang-lab\u002FscGPT","Wang Lab (University of Toronto)",[33],"gpu","Embed and annotate single-cell expression data with scGPT, a foundation model for single-cell biology. Use this skill when: (1) Producing cell embeddings from an AnnData for clustering\u002Fintegration, (2) Zero-shot or fine-tuned cell-type annotation, (3) Gene-level representation for perturbation\u002FGRN tasks.\nFor probabilistic single-cell models (scVI etc.), use the scvi-tools library.\n","main","9a28ca56870fad42cc4efa04a1d487c07a561ab1","skills-examples\u002Fclaude-science-skills\u002Fscgpt","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon","https:\u002F\u002Fflyme2bluemoon.github.io","Computer Science and Biology @ McGill University | making computer do cool thing","2026-10-31 13:32:13",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add flyme2bluemoon\u002Fskills --skill scgpt",{"tool":49,"command":50},"bunx","bunx skills add flyme2bluemoon\u002Fskills --skill scgpt",{"tool":52,"command":53},"pnpm","pnpm dlx skills add flyme2bluemoon\u002Fskills --skill scgpt","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills-examples\u002Fclaude-science-skills\u002Fscgpt\u002FSKILL.md",true,[],[58,66,73,80,87,94],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":62,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7AWZ83KYJ9YSB4E5VQJ1K9B","unslop","Edit substantive human-facing prose to remove AI writing patterns while preserving meaning and tone.","MIT","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Funslop\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":62,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7AWZ4FJPVNRMFFJC6JSHHKQ","pstack-principle-type-system-discipline","Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, refuse to lie to the compiler, exhaust variants, derive from authoritative schemas.","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fpstack-principle-type-system-discipline\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":62,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7AWZ11K4KET3ASESNABPE52","pstack-principle-test-behavior-not-implementation","Apply when you write, change, or keep a test. Call the code the way its users do and assert the result they observe against a literal expected value. If the test would still pass when every imported function returns undefined, rewrite the assertion or delete the test.","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fpstack-principle-test-behavior-not-implementation\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":62,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7AWYWT47M5JG7XV6ZK6QSSX","pstack-principle-subtract-before-you-add","Apply when sequencing an addition, refactor, or rewrite. Remove dead weight, redundant validators, and stub references first, then build on the simpler base.","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fpstack-principle-subtract-before-you-add\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":62,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7AWYTNNHNGHB583NEV888BB","pstack-principle-sequence-verifiable-units","Sequence migrations or dependent changes around meaningful verification boundaries.","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fpstack-principle-sequence-verifiable-units\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":62,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7AWYQ2C15PV2W2V6ZVMK3ZM","pstack-principle-separate-before-serializing-shared-state","Apply when concurrent actors might write to the same file, branch, key, or state object. Eliminate the sharing first; serialize structurally only when one shared writer is a real invariant.","https:\u002F\u002Fgithub.com\u002Fflyme2bluemoon\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fpstack-principle-separate-before-serializing-shared-state\u002FSKILL.md",[],[]]