$npx -y skills add Aperivue/medsci-skills --skill architecture-zooChoose a model architecture for a medical-imaging research question before scaffolding. Maps the task (classification, segmentation, detection, transfer), modality and dimensionality, labelled-data scale, and class imbalance to a shortlist of architectures, each grounded in its s
| 1 | # Architecture-Zoo Skill |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | This skill turns a **medical-imaging research question into a paper-grounded architecture choice** — |
| 6 | so the build starts from the right archetype (and a known validation setup) rather than from whatever is |
| 7 | fashionable, and the choice carries its source citation into the Methods. It is the **front end** of the |
| 8 | model-engineering lane: `architecture-zoo (choose)` → `/model-scaffold (build)` → `/model-validation |
| 9 | (validate)`. |
| 10 | |
| 11 | It is **advisory** (Layer D): it writes a short decision note, never code or weights. The actual repo is |
| 12 | `/model-scaffold`. It describes **archetypes and the task → family → constraint logic**, not a live SOTA |
| 13 | leaderboard (SOTA churns; the logic does not). |
| 14 | |
| 15 | ## When to use |
| 16 | - You need to pick an architecture/backbone for a classification, segmentation, detection, or |
| 17 | transfer-learning question and want it grounded in the literature with a sensible default. |
| 18 | |
| 19 | ## When NOT to use |
| 20 | - Generating the runnable repo → `/model-scaffold`. |
| 21 | - Auditing a trained model's validation design → `/model-validation`. |
| 22 | - Metrics / calibration → `/model-evaluation` + `/analyze-stats`. |
| 23 | - General study/validity design → `/design-study`; AI-vs-expert benchmark → `/design-ai-benchmarking`. |
| 24 | - LLM / MLLM → `/mllm-eval`. |
| 25 | |
| 26 | ## Workflow |
| 27 | |
| 28 | ### Phase 1 — Frame the question |
| 29 | State the **task** (classification / segmentation / detection / transfer), the **modality + |
| 30 | dimensionality** (2-D vs 3-D volume), the **labelled-data scale** (events / structures, not just |
| 31 | images), **label availability** (lots / few / unlabelled pool), and constraints (class imbalance, |
| 32 | small structures, interpretability, deployment compute). |
| 33 | |
| 34 | ### Phase 2 — Walk the decision tree |
| 35 | Open `${CLAUDE_SKILL_DIR}/references/index.md` and follow task → constraints → default pick. It routes to |
| 36 | a family card. |
| 37 | |
| 38 | ### Phase 3 — Read the family card |
| 39 | - `${CLAUDE_SKILL_DIR}/references/classification.md` — ResNet / DenseNet / EfficientNet / Inception / |
| 40 | ViT / Swin / DeiT. |
| 41 | - `${CLAUDE_SKILL_DIR}/references/segmentation.md` — U-Net / 3-D U-Net / V-Net / Attention & Residual |
| 42 | U-Net / nnU-Net / SegResNet / Swin-UNETR / Mask R-CNN. |
| 43 | - `${CLAUDE_SKILL_DIR}/references/detection.md` — R-CNN family / Faster R-CNN + FPN / Mask R-CNN / |
| 44 | RetinaNet / YOLO / DETR. |
| 45 | - `${CLAUDE_SKILL_DIR}/references/synthesis.md` — Pix2Pix / CycleGAN / SPADE / diffusion (DDPM, latent) / |
| 46 | VAE / fastMRI reconstruction. |
| 47 | - `${CLAUDE_SKILL_DIR}/references/foundation_models.md` — SAM / MedSAM / MedSAM2 / TotalSegmentator / |
| 48 | SegVol / BiomedCLIP / DINO / MAE / SimCLR / MoCo. |
| 49 | - `${CLAUDE_SKILL_DIR}/references/graph.md` — GCN / GraphSAGE / GAT / GIN / BrainGNN for brain |
| 50 | connectomes & population graphs (integrate PyTorch Geometric / DGL; not scaffolded by model-scaffold). |
| 51 | Each card gives the paper, core idea, when-to-use, medical-imaging use, reference implementation, and the |
| 52 | **typical validation/experiment setup** for that architecture class. |
| 53 | |
| 54 | ### Phase 4 — Write the decision note |
| 55 | Record `decisions/architecture_choice.md`: the **task**, the **chosen architecture**, its **source |
| 56 | paper**, the **reason** against the constraints, the **runner-up + why not**, and the matching |
| 57 | **`/model-scaffold` template**. Naming the source paper is mandatory; cite, never invent, any benchmark |
| 58 | number. |
| 59 | |
| 60 | ### Phase 5 — Hand off |
| 61 | Carry the decision note to `/model-scaffold` (instantiate the template), then `/model-validation` |
| 62 | (split / validation design), `/model-evaluation` + `/analyze-stats` (metrics), and `/write-paper` |
| 63 | (the Methods cite the architecture's source paper). |
| 64 | |
| 65 | ## Anti-Hallucination |
| 66 | |
| 67 | - **Never recommend an architecture without naming its source paper.* |