[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76EVZ017GCHVDCD9261CEKV":3,"skill-same:01M76EVZ017GCHVDCD9261CEKV":48},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M76EVZ017GCHVDCD9261CEKV","spatial-panel-design",null,"Spatial transcriptomics gene panel design (Xenium, MERFISH, CosMx custom panels) for cell type identification: rank markers on a tissue-matched CELLxGENE scRNA-seq reference, add PanglaoDB and CellMarker 2.0 marker evidence, build a per-gene evidence table, allocate per-cell-type quotas, and check that the panel separates cell types in the reference. Output: final_gene_panel.csv with N genes, cell type and reason. For annotating data from an existing panel use spatial-transcriptomics-cell-type-annotation.","bg-szy\u002FTOP-SKILLS","bg-szy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106576190?v=4","01M73A4E8KPV67SFXRY8XZGNBX","ShuZhiyong","01M73A4E96MQ294MHM74TZBVQD",6,"CC-BY-4.0","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fawesome-skills\u002Fspatial-panel-design\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: \"spatial-panel-design\"\ndescription: \"Spatial transcriptomics gene panel design (Xenium, MERFISH, CosMx custom panels) for cell type identification: rank markers on a tissue-matched CELLxGENE scRNA-seq reference, add PanglaoDB and CellMarker 2.0 marker evidence, build a per-gene evidence table, allocate per-cell-type quotas, and check that the panel separates cell types in the reference. Output: final_gene_panel.csv with N genes, cell type and reason. For annotating data from an existing panel use spatial-transcriptomics-cell-type-annotation.\"\nlicense: \"CC-BY-4.0\"\n---\n\n# Spatial Gene Panel Design\n\n## Overview\n\nPick exactly N genes that let an imaging-based platform identify every major\ncell type of a tissue. Code builds the evidence; you (the agent) make the\nfinal selection from the evidence table and write a reason per gene. Output:\na per-gene evidence table and `final_gene_panel.csv` with N genes, the cell\ntype each marks, its evidence and a reason.\n\n## When to Use\n\n- Designing a custom Xenium, MERFISH or CosMx gene panel for a tissue and state\n- Choosing add-on genes to extend a vendor base panel for missing cell types\n- Checking that a proposed panel can separate the cell types the study needs\n- Documenting why each panel gene was chosen, with reference and database evidence\n- Comparing candidate markers from a reference with PanglaoDB and CellMarker 2.0\n- Use `spatial-transcriptomics-cell-type-annotation` instead when the panel already exists and data must be annotated\n- For genes the panel will not measure, use the gene imputation route of `spatial-mapping-tangram` after the experiment\n\n## Prerequisites\n\n- **From the user**: organism, tissue, state (healthy or a disease) and panel size N\n- **Reference**: tissue- and state-matched; run Steps 3-4 of\n  `spatial-transcriptomics-cell-type-annotation` (same code), adding\n  `\"cell_type_ontology_term_id\"` to `obs_column_names`, with `GENES = None`\n  (markers are ranked over every gene) and `MAX_PER_TYPE = 300`, to get `reference.h5ad`\n- **Literature**: ask the research subagent \u002F literature tools for published panels\n  and canonical markers of this tissue; add what they return in Step 5\n- **Python packages**: `cellxgene-census`, `scanpy`, `openpyxl`, `scikit-learn`\n\n```bash\n# Install only what `import` reports missing. `--pypi` keeps the env's scanpy\u002Fnumba\n# stack; a conda add can swap it and bare pip can shadow it.\npixi add --pypi cellxgene-census scanpy openpyxl scikit-learn\n```\n\n## Pre-flight Interview\n\n```yaml\ndecisions:\n  - id: D1\n    param: ORGANISM\n    kind: required\n    source: user\n    ask: \"Human or mouse tissue?\"\n    default: null\n  - id: D2\n    param: TISSUE\n    kind: required\n    source: user\n    ask: \"Which tissue will be profiled?\"\n    default: null\n  - id: D3\n    param: STATE\n    kind: required\n    source: user\n    ask: \"Healthy tissue, or which disease or tumour?\"\n    default: null\n  - id: D4\n    param: PANEL_SIZE\n    kind: required\n    source: user\n    ask: \"How many genes can the panel hold?\"\n    default: null\n  - id: D5\n    param: basePanel\n    kind: required\n    source: user\n    ask: \"Is this a standalone custom panel, or add-on genes for a vendor base panel (which one)?\"\n    default: \"standalone panel\"\n  - id: D6\n    param: DATASET_ID\n    kind: required\n    source: data\n    depends_on: [D1, D2, D3]\n    ask: \"These CELLxGENE datasets match the tissue and state: which one should be the reference?\"\n    default: null\n  - id: D7\n    param: cellTypeResolution\n    kind: required\n    source: data\n    depends_on: [D4, D6]\n    ask: \"These are the reference cell types; for a panel of this size I propose merging \u003Cfine states> into \u003Clineages>. Which types must the panel separate?\"\n    default: \"major lineages; merge fine states the panel size cannot resolve\"\n  - id: D8\n    param: requiredGenes\n    kind: optional\n    source: user\n    ask: \"Are there genes that must be on the panel (study targets, known markers)?\"\n    default: \"none\"\n  - id: D9\n    param: MIN_PER_TYPE\n    kind: optional\n    source: user\n    ask: \"At least how many genes per cell type, so rare but important types are covered?\"\n    default: \"3\"\n  - id: D10\n    param: cancerTypeFilter\n    kind: derived\n    source: upstream\n    depends_on: [D3]\n    ask: \"Keep tumour-derived CellMarker entries?\"\n    default: \"Normal only for healthy tissue; drop the filter for tumour panels\"\n```\n\nAsk D1-D5 together. D6 and D7 come in a later round, after the Census search\nand the reference's cell types are known; D8 genes join the evidence table as\nrows in Step 5.\n\n## Workflow\n\n1. Load the reference and true cell type abundance\n2. Rank reference markers per cell type\n3. PanglaoDB markers\n4. CellMarker 2.0 markers\n5. Build the evidence table\n6. Allocate quotas and draft the panel\n7. Check the panel separates cell types, then save\n\n### Step 1: Reference and Abundance\n\nThe Step 4 reference is capped per cell type, so take real abundance from the\nfull dataset metadata:\n\n```python\nimport cellxgene_census\nimport numpy as np\nimport pandas as pd\nimport scanpy as sc\n\nORGANISM, TISSUE, PANEL_SIZE = \"Homo sapiens\", \"liver\", 100\nDATASET_ID = \"\u003Cdataset_id used for reference.h5ad>\"\n\nref = sc.read_h5ad(\"reference.h5ad\")          # X = raw counts\nref.layers[\"counts\"] = ref.X.copy()\nsc.pp.normalize_total(ref)\nsc.pp.log1p(ref)\n\nwith cellxgene_census.open_soma(census_version=\"stable\") as census:\n    obs = census[\"census_data\"][ORGANISM.lower().replace(\" \", \"_\")].obs.read(\n        value_filter=f\"dataset_id == '{DATASET_ID}'\", column_names=[\"cell_type\"]).concat().to_pandas()\nabundance = obs[\"cell_type\"].value_counts(normalize=True)\n\nkeep = ref.obs[\"cell_type\"].value_counts()\nkeep = keep[keep >= 20].index                  # too few cells for stable markers\nref = ref[ref.obs[\"cell_type\"].isin(keep)].copy()\nref.obs[\"cell_type\"] = ref.obs[\"cell_type\"].astype(\"category\").cat.remove_unused_categories()\nct_ids = ref.obs.groupby(\"cell_type\", observed=True)[\"cell_type_ontology_term_id\"].first()\nprint(pd.DataFrame({\"fraction\": abundance.reindex(keep).round(4), \"cl_id\": ct_ids}))\n```\n\nMerge or drop types the platform cannot be expected to resolve (e.g. ten T\ncell states for a 100-gene panel) before going on:\n`ref.obs[\"cell_type\"] = ref.obs[\"cell_type\"].replace({...})`, and apply the\nsame mapping to `obs[\"cell_type\"]` before computing `abundance`, `keep` and\n`ct_ids` (CellMarker then joins on the IDs of the kept fine types only).\n\n### Step 2: Reference Markers\n\n```python\nsc.tl.rank_genes_groups(ref, \"cell_type\", method=\"wilcoxon\", pts=True)\nrk = sc.get.rank_genes_groups_df(ref, group=None)\nrk = rk.rename(columns={\"group\": \"cell_type\", \"names\": \"gene\"})\nrk = rk[(rk[\"logfoldchanges\"] > 1) & (rk[\"pvals_adj\"] \u003C 0.01) & (rk[\"pct_nz_group\"] >= 0.3)]\nrk[\"specificity\"] = rk[\"pct_nz_group\"] - rk[\"pct_nz_reference\"]\nref_markers = rk.sort_values([\"cell_type\", \"scores\"], ascending=[True, False]).groupby(\"cell_type\").head(30)\nprint(ref_markers.groupby(\"cell_type\").head(5)[[\"cell_type\", \"gene\", \"logfoldchanges\", \"pct_nz_group\", \"pct_nz_reference\"]])\n```\n\n### Step 3: PanglaoDB Markers\n\nThe PanglaoDB site (panglaodb.se) was unreachable when this guide was\nwritten; Enrichr serves its marker sets as the `PanglaoDB_Augmented_2021`\nlibrary (human symbols, cell type names without tissue):\n\n```python\nimport os\nimport re\nimport requests\n\nos.makedirs(\"ref_cache\", exist_ok=True)\nPANGLAO = \"ref_cache\u002FPanglaoDB_Augmented_2021.txt\"\nif not os.path.exists(PANGLAO):\n    url = \"https:\u002F\u002Fmaayanlab.cloud\u002FEnrichr\u002FgeneSetLibrary?mode=text&libraryName=PanglaoDB_Augmented_2021\"\n    open(PANGLAO, \"w\").write(requests.get(url, timeout=300).text)\npanglao = {}\nfor line in open(PANGLAO):\n    name, _, *genes = line.rstrip(\"\\n\").split(\"\\t\")\n    panglao[name] = {g.split(\",\")[0] for g in genes if g}\n\ndef norm(s):\n    s = re.sub(r\"\\bcells?\\b\", \"\", s.lower())\n    return re.sub(r\"[^a-z0-9]+\", \" \", s).strip().rstrip(\"s\")\n\n# Keyword match reference cell types to library names; review and fix by hand.\nname_map = {ct: [p for p in panglao if norm(p) and (norm(p) in norm(ct) or norm(ct) in norm(p))]\n            for ct in keep}\nfor ct, hits in name_map.items():\n    print(f\"{ct:45s} -> {hits}\")\n```\n\nEdit `name_map` where the match is wrong or empty (e.g. \"Kupffer cell\" ->\n`[\"Kupffer Cells\"]`), then collect:\n\n```python\npang = pd.DataFrame([(ct, g) for ct, names in name_map.items() for n in names for g in panglao[n]],\n                    columns=[\"cell_type\", \"gene\"]).drop_duplicates()\npang[\"panglao\"] = True\nif ORGANISM == \"Mus musculus\":       # library is human; map with an ortholog table, not by case\n    print(\"convert PanglaoDB symbols to mouse orthologs before merging\")\nprint(pang.groupby(\"cell_type\").size())\n```\n\n### Step 4: CellMarker 2.0 Markers\n\nCellMarker 2.0 carries Cell Ontology IDs, so it joins the reference by ID, not\nby name. The official mirror (NAR 2023) serves the files:\n\n```python\nspecies = \"Human\" if ORGANISM == \"Homo sapiens\" else \"Mouse\"\nCM = f\"ref_cache\u002FCell_marker_{species}.xlsx\"\nif not os.path.exists(CM):\n    url = f\"http:\u002F\u002F117.50.127.228\u002FCellMarker\u002FCellMarker_download_files\u002Ffile\u002FCell_marker_{species}.xlsx\"\n    open(CM, \"wb\").write(requests.get(url, timeout=600).content)\ncm = pd.read_excel(CM)\ncm = cm[(cm[\"cancer_type\"] == \"Normal\") & cm[\"Symbol\"].notna()]   # drop for tumour panels\ncm[\"cl_id\"] = cm[\"cellontology_id\"].astype(str).str.replace(\"_\", \":\")\nid_to_ct = {v: k for k, v in ct_ids.items()}\ncm[\"cell_type\"] = cm[\"cl_id\"].map(id_to_ct)\ncm = cm[cm[\"cell_type\"].notna()]\nin_tissue = cm[\"tissue_class\"].str.contains(TISSUE, case=False, na=False)\ncmk = (cm.assign(in_tissue=in_tissue).groupby([\"cell_type\", \"Symbol\"])\n         .agg(cm_pmids=(\"PMID\", \"nunique\"), cm_in_tissue=(\"in_tissue\", \"any\")).reset_index()\n         .rename(columns={\"Symbol\": \"gene\"}))\nprint(cmk.sort_values(\"cm_pmids\", ascending=False).groupby(\"cell_type\").head(3))\n```\n\nCell types with no ID match fall back to the `cell_name` column with the\n`norm()` matching from Step 3.\n\n### Step 5: Evidence Table\n\nOne row per (cell type, gene) candidate, measured in the reference:\n\n```python\ncand = pd.concat([ref_markers[[\"cell_type\", \"gene\"]], pang[[\"cell_type\", \"gene\"]],\n                  cmk[[\"cell_type\", \"gene\"]]]).drop_duplicates()\ncand = cand[cand[\"gene\"].isin(ref.var_names)]           # unmeasured genes cannot be checked\n\nX = ref[:, cand[\"gene\"].unique()]\nexpr = pd.DataFrame(X.X.toarray() if hasattr(X.X, \"toarray\") else X.X,\n                    index=ref.obs_names, columns=X.var_names)\ngrp = ref.obs[\"cell_type\"]\npct = (expr > 0).groupby(grp, observed=True).mean()\nmean = expr.groupby(grp, observed=True).mean()\n\nev = cand.merge(rk[[\"cell_type\", \"gene\", \"logfoldchanges\", \"specificity\"]], how=\"left\", on=[\"cell_type\", \"gene\"])\nev = ev.merge(pang, how=\"left\", on=[\"cell_type\", \"gene\"]).merge(cmk, how=\"left\", on=[\"cell_type\", \"gene\"])\nev[\"pct_in\"] = [pct.at[c, g] for c, g in zip(ev[\"cell_type\"], ev[\"gene\"])]\nev[\"pct_out_max\"] = [pct.drop(index=c)[g].max() for c, g in zip(ev[\"cell_type\"], ev[\"gene\"])]\nev[\"mean_log\"] = [mean.at[c, g] for c, g in zip(ev[\"cell_type\"], ev[\"gene\"])]\nev[\"in_reference_de\"] = ev[\"logfoldchanges\"].notna()\nev[\"panglao\"] = ev[\"panglao\"].fillna(False).astype(bool)\nev[\"cm_pmids\"] = ev[\"cm_pmids\"].fillna(0).astype(int)\nev[\"n_sources\"] = ev[\"in_reference_de\"].astype(int) + ev[\"panglao\"] + (ev[\"cm_pmids\"] > 0)\nev = ev[ev[\"pct_in\"] >= 0.2].sort_values([\"cell_type\", \"n_sources\", \"specificity\"], ascending=[True, False, False])\nev.to_csv(\"panel_evidence.csv\", index=False)\nprint(ev.groupby(\"cell_type\").head(5).to_string(max_cols=12))\n```\n\nAdd literature or user-required genes as rows with a note before Step 6.\n\n### Step 6: Quotas and Draft Panel\n\nQuota grows with the square root of abundance so rare types still get genes:\n\n```python\nMIN_PER_TYPE = 3\nw = np.sqrt(abundance.reindex(keep).fillna(0) + 1e-3)\nquota = (MIN_PER_TYPE + (PANEL_SIZE - MIN_PER_TYPE * len(keep)) * w \u002F w.sum()).round().astype(int)\nquota.iloc[0] += PANEL_SIZE - quota.sum()                 # make it sum to N\nassert quota.min() >= 1, \"too many cell types for this panel size - merge types in Step 1\"\n\npicked, used = [], set()\nfor ct, q in quota.sort_values().items():                 # fill rare types first\n    rows = ev[(ev[\"cell_type\"] == ct) & ~ev[\"gene\"].isin(used)].head(q)\n    picked.append(rows)\n    used.update(rows[\"gene\"])\ndraft = pd.concat(picked)\nprint(pd.DataFrame({\"quota\": quota, \"picked\": draft[\"cell_type\"].value_counts()}).fillna(0).astype(int))\nprint(f\"draft: {draft['gene'].nunique()} \u002F {PANEL_SIZE} genes\")\n```\n\nReview `draft` against `panel_evidence.csv`: swap genes with low\n`pct_in`, high `pct_out_max` or one weak source; keep canonical markers even\nif one source misses them; fill any shortfall from the next rows of the\nunder-filled types. Very highly expressed genes (top `mean_log`) can crowd\nimaging-based assays - check the vendor's panel limits.\n\n### Step 7: Check Separation, then Save\n\n```python\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.metrics import classification_report\nfrom sklearn.model_selection import cross_val_predict\n\npanel = list(dict.fromkeys(draft[\"gene\"]))\nXp = ref[:, panel].X\nXp = Xp.toarray() if hasattr(Xp, \"toarray\") else Xp\npred = cross_val_predict(LogisticRegression(max_iter=2000), Xp, ref.obs[\"cell_type\"].astype(str), cv=5)\nprint(classification_report(ref.obs[\"cell_type\"].astype(str), pred, zero_division=0))\n\nfinal = draft.drop_duplicates(\"gene\")[[\"gene\", \"cell_type\", \"n_sources\", \"logfoldchanges\", \"pct_in\", \"pct_out_max\",\n                                       \"panglao\", \"cm_pmids\"]].rename(columns={\"gene\": \"Gene\"})\nfinal[\"Reason\"] = \"\"          # fill: cell type marked, function, sources, reference pct_in\nassert len(final) == PANEL_SIZE, f\"panel has {len(final)} genes, need {PANEL_SIZE}\"\nfinal.to_csv(\"final_gene_panel.csv\", index=False)\n```\n\nTypes with recall below ~0.7 need more or better genes; confused pairs show\nwhich. Write each `Reason` as one or two specific sentences, e.g. \"Hepatocyte\nmarker encoding serum albumin; top reference DE gene (98% of hepatocytes),\nalso in PanglaoDB and CellMarker 2.0.\"\n\n## Key Parameters\n\n| Parameter | Default | Effect |\n|---|---|---|\n| `PANEL_SIZE` | from the user | Number of genes; must be met exactly |\n| reference `STATE` | from the user | Healthy vs disease reference changes which types and markers appear |\n| `MIN_PER_TYPE` | 3 | Floor per cell type; raise for rare but important types |\n| `logfoldchanges` \u002F `pct_nz_group` filters | > 1 \u002F >= 0.3 | Strictness of reference markers |\n| `pct_in` floor | 0.2 | Drops markers detected in few cells of their type |\n| CellMarker `cancer_type` filter | `Normal` | Remove for tumour panels |\n\n## Common Recipes\n\n### Recipe: Add-on Genes for a Vendor Base Panel\n\nMost imaging panels are a fixed base panel plus custom genes. Count how well\nthe base already covers each type, then spend the custom budget where it is\nthin:\n\n```python\nBASE_PANEL = set(pd.read_csv(\"base_panel.csv\")[\"gene\"])     # vendor gene list\nADD_ON_SIZE = 50\ncovered = ev[ev[\"gene\"].isin(BASE_PANEL)].groupby(\"cell_type\")[\"gene\"].nunique().reindex(keep).fillna(0)\nneed = (MIN_PER_TYPE + 2 - covered).clip(lower=0)            # aim for ~5 good markers per type\nprint(pd.DataFrame({\"base_markers\": covered.astype(int), \"need\": need.astype(int)}))\nadd_ev = ev[~ev[\"gene\"].isin(BASE_PANEL)]\nadd_on = (add_ev[add_ev[\"cell_type\"].isin(need[need > 0].index)]\n          .groupby(\"cell_type\", group_keys=False).apply(lambda d: d.head(int(need[d.name]))))\nprint(f\"proposed add-ons: {add_on['gene'].nunique()} (budget {ADD_ON_SIZE})\")\nadd_on.to_csv(\"addon_candidates.csv\", index=False)\n```\n\nTrim or extend `add_on` to the budget from the evidence table, as in Step 6.\n\n### Recipe: Which Cell Types the Panel Confuses\n\nThe classification report gives recall per type; the confusion matrix says\nwhich pairs are mixed up and so where to add discriminating genes:\n\n```python\nfrom sklearn.metrics import confusion_matrix\n\nlabels = sorted(ref.obs[\"cell_type\"].astype(str).unique())\ncm_ = pd.DataFrame(confusion_matrix(ref.obs[\"cell_type\"].astype(str), pred, labels=labels, normalize=\"true\"),\n                   index=labels, columns=labels)\noff = cm_.where(~np.eye(len(labels), dtype=bool)).stack().sort_values(ascending=False)\nprint(off.head(10).round(2))                     # (true type, predicted type): fraction misassigned\na, b = off.index[0]\ndiff = pct.loc[a] - pct.loc[b]\nprint(f\"genes separating {a} from {b}:\", diff.abs().nlargest(10).index.tolist())\n```\n\n## Expected Outputs\n\n- `ref_cache\u002F` - downloaded PanglaoDB and CellMarker files\n- `panel_evidence.csv` - candidate genes with reference stats and database support\n- `final_gene_panel.csv` - Gene, cell_type, evidence columns, Reason\n\n## Troubleshooting\n\n| Problem | Cause | Fix |\n|---|---|---|\n| A cell type has no PanglaoDB match | Name differs | Edit `name_map` by hand; leave empty if no equivalent |\n| CellMarker download fails | Mirror down or blocked | Retry later; the panel can proceed on reference + PanglaoDB evidence, state it |\n| Few CellMarker rows join | Reference uses finer CL terms | Fall back to `cell_name` matching or map to parent types |\n| Quota assertion fails | More types than the panel can cover | Merge related types in Step 1 |\n| Low recall for one type | Markers shared with a neighbour type | Add genes with low `pct_out_max` against that neighbour |\n| Mouse panel with human symbols | PanglaoDB library is human-only | Map orthologs (e.g. Ensembl\u002FBioMart) before merging |\n\n## Related Skills\n\n- `spatial-transcriptomics-cell-type-annotation` - reference search and download (Steps 3-4)\n- `scanpy-scrna-seq` - reference preprocessing and marker ranking\n\n## References\n\n- Franzen et al. (2019) PanglaoDB, Database: https:\u002F\u002Fdoi.org\u002F10.1093\u002Fdatabase\u002Fbaz046\n- Hu et al. (2022) CellMarker 2.0, Nucleic Acids Research: https:\u002F\u002Fdoi.org\u002F10.1093\u002Fnar\u002Fgkac947\n- Enrichr libraries (PanglaoDB_Augmented_2021): https:\u002F\u002Fmaayanlab.cloud\u002FEnrichr\u002F\n- CZ CELLxGENE Census documentation: https:\u002F\u002Fchanzuckerberg.github.io\u002Fcellxgene-census\u002F\n","# Spatial Gene Panel Design\n\n## Overview\n\nPick exactly N genes that let an imaging-based platform identify every major\ncell type of a tissue. Code builds the evidence; you (the agent) make the\nfinal selection from the evidence table and write a reason per gene. Output:\na per-gene evidence table and `final_gene_panel.csv` with N genes, the cell\ntype each marks, its evidence and a reason.\n\n## When to Use\n\n- Designing a custom Xenium, MERFISH or CosMx gene panel for a tissue and state\n- Choosing add-on genes to extend a vendor base panel for missing cell types\n- Checking that a proposed panel can separate the cell types the study needs\n- Documenting why each panel gene was chosen, with reference and database evidence\n- Comparing candidate markers from a reference with PanglaoDB and CellMarker 2.0\n- Use `spatial-transcriptomics-cell-type-annotation` instead when the panel already exists and data must be annotated\n- For genes the panel will not measure, use the gene imputation route of `spatial-mapping-tangram` after the experiment\n\n## Prerequisites\n\n- **From the user**: organism, tissue, state (healthy or a disease) and panel size N\n- **Reference**: tissue- and state-matched; run Steps 3-4 of\n  `spatial-transcriptomics-cell-type-annotation` (same code), adding\n  `\"cell_type_ontology_term_id\"` to `obs_column_names`, with `GENES = None`\n  (markers are ranked over every gene) and `MAX_PER_TYPE = 300`, to get `reference.h5ad`\n- **Literature**: ask the research subagent \u002F literature tools for published panels\n  and canonical markers of this tissue; add what they return in Step 5\n- **Python packages**: `cellxgene-census`, `scanpy`, `openpyxl`, `scikit-learn`\n\n```bash\n# Install only what `import` reports missing. `--pypi` keeps the env's scanpy\u002Fnumba\n# stack; a conda add can swap it and bare pip can shadow it.\npixi add --pypi cellxgene-census scanpy openpyxl scikit-learn\n```\n\n## Pre-flight Interview\n\n```yaml\ndecisions:\n  - id: D1\n    param: ORGANISM\n    kind: required\n    source: user\n    ask: \"Human or mouse tissue?\"\n    default: null\n  - id: D2\n    param: TISSUE\n    kind: required\n    source: user\n    ask: \"Which tissue will be profiled?\"\n    default: null\n  - id: D3\n    param: STATE\n    kind: required\n    source: user\n    ask: \"Healthy tissue, or which disease or tumour?\"\n    default: null\n  - id: D4\n    param: PANEL_SIZE\n    kind: required\n    source: user\n    ask: \"How many genes can the panel hold?\"\n    default: null\n  - id: D5\n    param: basePanel\n    kind: required\n    source: user\n    ask: \"Is this a standalone custom panel, or add-on genes for a vendor base panel (which one)?\"\n    default: \"standalone panel\"\n  - id: D6\n    param: DATASET_ID\n    kind: required\n    source: data\n    depends_on: [D1, D2, D3]\n    ask: \"These CELLxGENE datasets match the tissue and state: which one should be the reference?\"\n    default: null\n  - id: D7\n    param: cellTypeResolution\n    kind: required\n    source: data\n    depends_on: [D4, D6]\n    ask: \"These are the reference cell types; for a panel of this size I propose merging \u003Cfine states> into \u003Clineages>. Which types must the panel separate?\"\n    default: \"major lineages; merge fine states the panel size cannot resolve\"\n  - id: D8\n    param: requiredGenes\n    kind: optional\n    source: user\n    ask: \"Are there genes that must be on the panel (study targets, known markers)?\"\n    default: \"none\"\n  - id: D9\n    param: MIN_PER_TYPE\n    kind: optional\n    source: user\n    ask: \"At least how many genes per cell type, so rare but important types are covered?\"\n    default: \"3\"\n  - id: D10\n    param: cancerTypeFilter\n    kind: derived\n    source: upstream\n    depends_on: [D3]\n    ask: \"Keep tumour-derived CellMarker entries?\"\n    default: \"Normal only for healthy tissue; drop the filter for tumour panels\"\n```\n\nAsk D1-D5 together. D6 and D7 come in a later round, after the Census search\nand the reference's cell types are known; D8 genes join the evidence table as\nrows in Step 5.\n\n## Workflow\n\n1. Load the reference and true cell type abundance\n2. Rank reference markers per cell type\n3. PanglaoDB markers\n4. CellMarker 2.0 markers\n5. Build the evidence table\n6. Allocate quotas and draft the panel\n7. Check the panel separates cell types, then save\n\n### Step 1: Reference and Abundance\n\nThe Step 4 reference is capped per cell type, so take real abundance from the\nfull dataset metadata:\n\n```python\nimport cellxgene_census\nimport numpy as np\nimport pandas as pd\nimport scanpy as sc\n\nORGANISM, TISSUE, PANEL_SIZE = \"Homo sapiens\", \"liver\", 100\nDATASET_ID = \"\u003Cdataset_id used for reference.h5ad>\"\n\nref = sc.read_h5ad(\"reference.h5ad\")          # X = raw counts\nref.layers[\"counts\"] = ref.X.copy()\nsc.pp.normalize_total(ref)\nsc.pp.log1p(ref)\n\nwith cellxgene_census.open_soma(census_version=\"stable\") as census:\n    obs = census[\"census_data\"][ORGANISM.lower().replace(\" \", \"_\")].obs.read(\n        value_filter=f\"dataset_id == '{DATASET_ID}'\", column_names=[\"cell_type\"]).concat().to_pandas()\nabundance = obs[\"cell_type\"].value_counts(normalize=True)\n\nkeep = ref.obs[\"cell_type\"].value_counts()\nkeep = keep[keep >= 20].index                  # too few cells for stable markers\nref = ref[ref.obs[\"cell_type\"].isin(keep)].copy()\nref.obs[\"cell_type\"] = ref.obs[\"cell_type\"].astype(\"category\").cat.remove_unused_categories()\nct_ids = ref.obs.groupby(\"cell_type\", observed=True)[\"cell_type_ontology_term_id\"].first()\nprint(pd.DataFrame({\"fraction\": abundance.reindex(keep).round(4), \"cl_id\": ct_ids}))\n```\n\nMerge or drop types the platform cannot be expected to resolve (e.g. ten T\ncell states for a 100-gene panel) before going on:\n`ref.obs[\"cell_type\"] = ref.obs[\"cell_type\"].replace({...})`, and apply the\nsame mapping to `obs[\"cell_type\"]` before computing `abundance`, `keep` and\n`ct_ids` (CellMarker then joins on the IDs of the kept fine types only).\n\n### Step 2: Reference Markers\n\n```python\nsc.tl.rank_genes_groups(ref, \"cell_type\", method=\"wilcoxon\", pts=True)\nrk = sc.get.rank_genes_groups_df(ref, group=None)\nrk = rk.rename(columns={\"group\": \"cell_type\", \"names\": \"gene\"})\nrk = rk[(rk[\"logfoldchanges\"] > 1) & (rk[\"pvals_adj\"] \u003C 0.01) & (rk[\"pct_nz_group\"] >= 0.3)]\nrk[\"specificity\"] = rk[\"pct_nz_group\"] - rk[\"pct_nz_reference\"]\nref_markers = rk.sort_values([\"cell_type\", \"scores\"], ascending=[True, False]).groupby(\"cell_type\").head(30)\nprint(ref_markers.groupby(\"cell_type\").head(5)[[\"cell_type\", \"gene\", \"logfoldchanges\", \"pct_nz_group\", \"pct_nz_reference\"]])\n```\n\n### Step 3: PanglaoDB Markers\n\nThe PanglaoDB site (panglaodb.se) was unreachable when this guide was\nwritten; Enrichr serves its marker sets as the `PanglaoDB_Augmented_2021`\nlibrary (human symbols, cell type names without tissue):\n\n```python\nimport os\nimport re\nimport requests\n\nos.makedirs(\"ref_cache\", exist_ok=True)\nPANGLAO = \"ref_cache\u002FPanglaoDB_Augmented_2021.txt\"\nif not os.path.exists(PANGLAO):\n    url = \"https:\u002F\u002Fmaayanlab.cloud\u002FEnrichr\u002FgeneSetLibrary?mode=text&libraryName=PanglaoDB_Augmented_2021\"\n    open(PANGLAO, \"w\").write(requests.get(url, timeout=300).text)\npanglao = {}\nfor line in open(PANGLAO):\n    name, _, *genes = line.rstrip(\"\\n\").split(\"\\t\")\n    panglao[name] = {g.split(\",\")[0] for g in genes if g}\n\ndef norm(s):\n    s = re.sub(r\"\\bcells?\\b\", \"\", s.lower())\n    return re.sub(r\"[^a-z0-9]+\", \" \", s).strip().rstrip(\"s\")\n\n# Keyword match reference cell types to library names; review and fix by hand.\nname_map = {ct: [p for p in panglao if norm(p) and (norm(p) in norm(ct) or norm(ct) in norm(p))]\n            for ct in keep}\nfor ct, hits in name_map.items():\n    print(f\"{ct:45s} -> {hits}\")\n```\n\nEdit `name_map` where the match is wrong or empty (e.g. \"Kupffer cell\" ->\n`[\"Kupffer Cells\"]`), then collect:\n\n```python\npang = pd.DataFrame([(ct, g) for ct, names in name_map.items() for n in names for g in panglao[n]],\n                    columns=[\"cell_type\", \"gene\"]).drop_duplicates()\npang[\"panglao\"] = True\nif ORGANISM == \"Mus musculus\":       # library is human; map with an ortholog table, not by case\n    print(\"convert PanglaoDB symbols to mouse orthologs before merging\")\nprint(pang.groupby(\"cell_type\").size())\n```\n\n### Step 4: CellMarker 2.0 Markers\n\nCellMarker 2.0 carries Cell Ontology IDs, so it joins the reference by ID, not\nby name. The official mirror (NAR 2023) serves the files:\n\n```python\nspecies = \"Human\" if ORGANISM == \"Homo sapiens\" else \"Mouse\"\nCM = f\"ref_cache\u002FCell_marker_{species}.xlsx\"\nif not os.path.exists(CM):\n    url = f\"http:\u002F\u002F117.50.127.228\u002FCellMarker\u002FCellMarker_download_files\u002Ffile\u002FCell_marker_{species}.xlsx\"\n    open(CM, \"wb\").write(requests.get(url, timeout=600).content)\ncm = pd.read_excel(CM)\ncm = cm[(cm[\"cancer_type\"] == \"Normal\") & cm[\"Symbol\"].notna()]   # drop for tumour panels\ncm[\"cl_id\"] = cm[\"cellontology_id\"].astype(str).str.replace(\"_\", \":\")\nid_to_ct = {v: k for k, v in ct_ids.items()}\ncm[\"cell_type\"] = cm[\"cl_id\"].map(id_to_ct)\ncm = cm[cm[\"cell_type\"].notna()]\nin_tissue = cm[\"tissue_class\"].str.contains(TISSUE, case=False, na=False)\ncmk = (cm.assign(in_tissue=in_tissue).groupby([\"cell_type\", \"Symbol\"])\n         .agg(cm_pmids=(\"PMID\", \"nunique\"), cm_in_tissue=(\"in_tissue\", \"any\")).reset_index()\n         .rename(columns={\"Symbol\": \"gene\"}))\nprint(cmk.sort_values(\"cm_pmids\", ascending=False).groupby(\"cell_type\").head(3))\n```\n\nCell types with no ID match fall back to the `cell_name` column with the\n`norm()` matching from Step 3.\n\n### Step 5: Evidence Table\n\nOne row per (cell type, gene) candidate, measured in the reference:\n\n```python\ncand = pd.concat([ref_markers[[\"cell_type\", \"gene\"]], pang[[\"cell_type\", \"gene\"]],\n                  cmk[[\"cell_type\", \"gene\"]]]).drop_duplicates()\ncand = cand[cand[\"gene\"].isin(ref.var_names)]           # unmeasured genes cannot be checked\n\nX = ref[:, cand[\"gene\"].unique()]\nexpr = pd.DataFrame(X.X.toarray() if hasattr(X.X, \"toarray\") else X.X,\n                    index=ref.obs_names, columns=X.var_names)\ngrp = ref.obs[\"cell_type\"]\npct = (expr > 0).groupby(grp, observed=True).mean()\nmean = expr.groupby(grp, observed=True).mean()\n\nev = cand.merge(rk[[\"cell_type\", \"gene\", \"logfoldchanges\", \"specificity\"]], how=\"left\", on=[\"cell_type\", \"gene\"])\nev = ev.merge(pang, how=\"left\", on=[\"cell_type\", \"gene\"]).merge(cmk, how=\"left\", on=[\"cell_type\", \"gene\"])\nev[\"pct_in\"] = [pct.at[c, g] for c, g in zip(ev[\"cell_type\"], ev[\"gene\"])]\nev[\"pct_out_max\"] = [pct.drop(index=c)[g].max() for c, g in zip(ev[\"cell_type\"], ev[\"gene\"])]\nev[\"mean_log\"] = [mean.at[c, g] for c, g in zip(ev[\"cell_type\"], ev[\"gene\"])]\nev[\"in_reference_de\"] = ev[\"logfoldchanges\"].notna()\nev[\"panglao\"] = ev[\"panglao\"].fillna(False).astype(bool)\nev[\"cm_pmids\"] = ev[\"cm_pmids\"].fillna(0).astype(int)\nev[\"n_sources\"] = ev[\"in_reference_de\"].astype(int) + ev[\"panglao\"] + (ev[\"cm_pmids\"] > 0)\nev = ev[ev[\"pct_in\"] >= 0.2].sort_values([\"cell_type\", \"n_sources\", \"specificity\"], ascending=[True, False, False])\nev.to_csv(\"panel_evidence.csv\", index=False)\nprint(ev.groupby(\"cell_type\").head(5).to_string(max_cols=12))\n```\n\nAdd literature or user-required genes as rows with a note before Step 6.\n\n### Step 6: Quotas and Draft Panel\n\nQuota grows with the square root of abundance so rare types still get genes:\n\n```python\nMIN_PER_TYPE = 3\nw = np.sqrt(abundance.reindex(keep).fillna(0) + 1e-3)\nquota = (MIN_PER_TYPE + (PANEL_SIZE - MIN_PER_TYPE * len(keep)) * w \u002F w.sum()).round().astype(int)\nquota.iloc[0] += PANEL_SIZE - quota.sum()                 # make it sum to N\nassert quota.min() >= 1, \"too many cell types for this panel size - merge types in Step 1\"\n\npicked, used = [], set()\nfor ct, q in quota.sort_values().items():                 # fill rare types first\n    rows = ev[(ev[\"cell_type\"] == ct) & ~ev[\"gene\"].isin(used)].head(q)\n    picked.append(rows)\n    used.update(rows[\"gene\"])\ndraft = pd.concat(picked)\nprint(pd.DataFrame({\"quota\": quota, \"picked\": draft[\"cell_type\"].value_counts()}).fillna(0).astype(int))\nprint(f\"draft: {draft['gene'].nunique()} \u002F {PANEL_SIZE} genes\")\n```\n\nReview `draft` against `panel_evidence.csv`: swap genes with low\n`pct_in`, high `pct_out_max` or one weak source; keep canonical markers even\nif one source misses them; fill any shortfall from the next rows of the\nunder-filled types. Very highly expressed genes (top `mean_log`) can crowd\nimaging-based assays - check the vendor's panel limits.\n\n### Step 7: Check Separation, then Save\n\n```python\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.metrics import classification_report\nfrom sklearn.model_selection import cross_val_predict\n\npanel = list(dict.fromkeys(draft[\"gene\"]))\nXp = ref[:, panel].X\nXp = Xp.toarray() if hasattr(Xp, \"toarray\") else Xp\npred = cross_val_predict(LogisticRegression(max_iter=2000), Xp, ref.obs[\"cell_type\"].astype(str), cv=5)\nprint(classification_report(ref.obs[\"cell_type\"].astype(str), pred, zero_division=0))\n\nfinal = draft.drop_duplicates(\"gene\")[[\"gene\", \"cell_type\", \"n_sources\", \"logfoldchanges\", \"pct_in\", \"pct_out_max\",\n                                       \"panglao\", \"cm_pmids\"]].rename(columns={\"gene\": \"Gene\"})\nfinal[\"Reason\"] = \"\"          # fill: cell type marked, function, sources, reference pct_in\nassert len(final) == PANEL_SIZE, f\"panel has {len(final)} genes, need {PANEL_SIZE}\"\nfinal.to_csv(\"final_gene_panel.csv\", index=False)\n```\n\nTypes with recall below ~0.7 need more or better genes; confused pairs show\nwhich. Write each `Reason` as one or two specific sentences, e.g. \"Hepatocyte\nmarker encoding serum albumin; top reference DE gene (98% of hepatocytes),\nalso in PanglaoDB and CellMarker 2.0.\"\n\n## Key Parameters\n\n| Parameter | Default | Effect |\n|---|---|---|\n| `PANEL_SIZE` | from the user | Number of genes; must be met exactly |\n| reference `STATE` | from the user | Healthy vs disease reference changes which types and markers appear |\n| `MIN_PER_TYPE` | 3 | Floor per cell type; raise for rare but important types |\n| `logfoldchanges` \u002F `pct_nz_group` filters | > 1 \u002F >= 0.3 | Strictness of reference markers |\n| `pct_in` floor | 0.2 | Drops markers detected in few cells of their type |\n| CellMarker `cancer_type` filter | `Normal` | Remove for tumour panels |\n\n## Common Recipes\n\n### Recipe: Add-on Genes for a Vendor Base Panel\n\nMost imaging panels are a fixed base panel plus custom genes. Count how well\nthe base already covers each type, then spend the custom budget where it is\nthin:\n\n```python\nBASE_PANEL = set(pd.read_csv(\"base_panel.csv\")[\"gene\"])     # vendor gene list\nADD_ON_SIZE = 50\ncovered = ev[ev[\"gene\"].isin(BASE_PANEL)].groupby(\"cell_type\")[\"gene\"].nunique().reindex(keep).fillna(0)\nneed = (MIN_PER_TYPE + 2 - covered).clip(lower=0)            # aim for ~5 good markers per type\nprint(pd.DataFrame({\"base_markers\": covered.astype(int), \"need\": need.astype(int)}))\nadd_ev = ev[~ev[\"gene\"].isin(BASE_PANEL)]\nadd_on = (add_ev[add_ev[\"cell_type\"].isin(need[need > 0].index)]\n          .groupby(\"cell_type\", group_keys=False).apply(lambda d: d.head(int(need[d.name]))))\nprint(f\"proposed add-ons: {add_on['gene'].nunique()} (budget {ADD_ON_SIZE})\")\nadd_on.to_csv(\"addon_candidates.csv\", index=False)\n```\n\nTrim or extend `add_on` to the budget from the evidence table, as in Step 6.\n\n### Recipe: Which Cell Types the Panel Confuses\n\nThe classification report gives recall per type; the confusion matrix says\nwhich pairs are mixed up and so where to add discriminating genes:\n\n```python\nfrom sklearn.metrics import confusion_matrix\n\nlabels = sorted(ref.obs[\"cell_type\"].astype(str).unique())\ncm_ = pd.DataFrame(confusion_matrix(ref.obs[\"cell_type\"].astype(str), pred, labels=labels, normalize=\"true\"),\n                   index=labels, columns=labels)\noff = cm_.where(~np.eye(len(labels), dtype=bool)).stack().sort_values(ascending=False)\nprint(off.head(10).round(2))                     # (true type, predicted type): fraction misassigned\na, b = off.index[0]\ndiff = pct.loc[a] - pct.loc[b]\nprint(f\"genes separating {a} from {b}:\", diff.abs().nlargest(10).index.tolist())\n```\n\n## Expected Outputs\n\n- `ref_cache\u002F` - downloaded PanglaoDB and CellMarker files\n- `panel_evidence.csv` - candidate genes with reference stats and database support\n- `final_gene_panel.csv` - Gene, cell_type, evidence columns, Reason\n\n## Troubleshooting\n\n| Problem | Cause | Fix |\n|---|---|---|\n| A cell type has no PanglaoDB match | Name differs | Edit `name_map` by hand; leave empty if no equivalent |\n| CellMarker download fails | Mirror down or blocked | Retry later; the panel can proceed on reference + PanglaoDB evidence, state it |\n| Few CellMarker rows join | Reference uses finer CL terms | Fall back to `cell_name` matching or map to parent types |\n| Quota assertion fails | More types than the panel can cover | Merge related types in Step 1 |\n| Low recall for one type | Markers shared with a neighbour type | Add genes with low `pct_out_max` against that neighbour |\n| Mouse panel with human symbols | PanglaoDB library is human-only | Map orthologs (e.g. Ensembl\u002FBioMart) before merging |\n\n## Related Skills\n\n- `spatial-transcriptomics-cell-type-annotation` - reference search and download (Steps 3-4)\n- `scanpy-scrna-seq` - reference preprocessing and marker ranking\n\n## References\n\n- Franzen et al. (2019) PanglaoDB, Database: https:\u002F\u002Fdoi.org\u002F10.1093\u002Fdatabase\u002Fbaz046\n- Hu et al. (2022) CellMarker 2.0, Nucleic Acids Research: https:\u002F\u002Fdoi.org\u002F10.1093\u002Fnar\u002Fgkac947\n- Enrichr libraries (PanglaoDB_Augmented_2021): https:\u002F\u002Fmaayanlab.cloud\u002FEnrichr\u002F\n- CZ CELLxGENE Census documentation: https:\u002F\u002Fchanzuckerberg.github.io\u002Fcellxgene-census\u002F\n",{"name":5,"license":15,"description":7},"master","fd76f882a04e445e899d5cfb2732f2105ea054ee","skills\u002Fawesome-skills\u002Fspatial-panel-design",0,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS","https:\u002F\u002Fbg-szy.github.io\u002FTOP-SKILLS\u002F","https:\u002F\u002Fgithub.com\u002Fbg-szy","https:\u002F\u002Fwww.ecust.edu.cn\u002F","a student of East China University of Science and Technology","2026-11-15 03:38:02",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add bg-szy\u002FTOP-SKILLS --skill spatial-panel-design",{"tool":40,"command":41},"bunx","bunx skills add bg-szy\u002FTOP-SKILLS --skill spatial-panel-design",{"tool":43,"command":44},"pnpm","pnpm dlx skills add bg-szy\u002FTOP-SKILLS --skill spatial-panel-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fawesome-skills\u002Fspatial-panel-design\u002FSKILL.md",true,[],[49,58,65,72,79,86],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":57},"01M7DXW9N826PKXK174PVW3038","serpmaven","Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.","MIT","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fserpmaven\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"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":53,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":57},"01M7DXVHSTWDV65475QEQ915M7","revnu-landing-page-audit","Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: \"audit my landing page\", \"why isn't this page converting\", \"review my homepage\", \"my ads get clicks but no signups\", \"people bounce from the pricing page\", \"CRO review\", \"improve conversion rate\", \"is my hero section clear\", \"roast my landing page\", \"rewrite my headline\", \"what's wrong with this page\", \"landing page feedback\", \"make the signup page convert better\". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-landing-page-audit\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":57},"01M7DXV8X2D7B3VTD4HHYYHTGR","revnu-growth-context","Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents\u002Frevnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says \"set up our marketing context\", \"who is our ideal customer\", \"write our ICP\", \"describe the product for marketing\", \"positioning doc\", \"what's our brand voice\", \"remember this about our customers\", \"log what we tried\", \"what have we learned from marketing\", \"we changed pricing, update the context\", \"update our growth notes\", \"summarize the business for the agent\", \"import my product-marketing.md\", \"start a growth doc\", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-growth-context\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":57},"01M7DXV0DGJ1G0A60PAHC6J3C5","revnu-get-listed","Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: \"best X\" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says \"get us listed\", \"which directories should we submit to\", \"how do we get into best-of lists\", \"why does ChatGPT recommend competitors and not us\", \"get mentioned in AI answers\", \"submit to awesome lists\", \"get on G2\", \"where are our competitors listed\", \"pitch listicle authors\", \"find backlink opportunities\", \"launch directories\", \"get into roundups\", \"Product Hunt alternatives\", \"where should we be listed\", \"get cited by Perplexity\". Never submits, pays or posts without a yes. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-get-listed\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":57},"01M7DXTSPMGT9D6DSS0HP9BSTA","revnu-ai-readiness-audit","Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks \"is my site ready for AI search\", \"audit my site for AI answers\", \"AEO audit\", \"GEO audit\", \"why doesn't ChatGPT quote our pricing\", \"make our pages citable by AI\", \"do I need llms.txt\", \"does schema help with ChatGPT\", \"check our structured data\", \"is our content visible without JavaScript\", \"AI SEO audit\", \"optimize our homepage for AI answers\", \"LLM SEO check\", \"why does AI get our product wrong\", \"fix our site for AI Overviews\". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-ai-readiness-audit\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":57},"01M7DXSZHCVTRS620GC3S97JZV","proxy-troubleshooting","Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fproxy-troubleshooting\u002FSKILL.md",[],[]]