model-scaffold

model-scaffold is a skill for Claude Code from Aperivue/medsci-skills. It costs 62 tokens per session (3,090 once invoked), scanned A, original, MIT.

A generator for runnable PyTorch training repositories for medical-imaging tasks such as segmentation, classification, detection, image synthesis, or self-supervised learning.

In plain words
What is it for?
Use it to create the code structure, configuration, dependencies, and provenance records needed to train an imaging model.
Why use it?
It provides a reproducible training project between choosing a model architecture and testing the trained model, while checking key setup details before training.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_SKILL_DIR} variable.

Part of the medsci-modeling plugin — 15 skills shipped together

Good fit Use it to create the code structure, configuration, dependencies, and provenance records needed to train an imaging model.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aperivue/medsci-skills/model-scaffold
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 Aperivue/medsci-skills --skill model-scaffold
Clone the repo
git clone --depth 1 https://github.com/Aperivue/medsci-skills

Made for: Claude Code.

Or install medsci-modeling, the plugin that ships this one along with the rest of its 15 skills.

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 model-scaffold

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/aperivue/medsci-skills/model-scaffold"><img src="https://agentmods.dev/badge/skills/aperivue/medsci-skills/model-scaffold.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,090 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 pass 7 Sept 2026
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.00062 $0.03090
Opus 5.5 $0.00025 $0.01236
Sonnet 5.5 $0.00012 $0.00618
Haiku 4.5 $0.00006 $0.00309

Measured 20d ago against content hash d0c0d20bbeab, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

model-scaffold 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 20d ago.

The scan reads SKILL.md. This mod also ships 8 executable files (scripts/check_training_hygiene.py, scripts/scaffold_challenge/verify.sh, scripts/scaffold.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/model-scaffold/SKILL.md · 178 lines

How it starts

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

Model-Scaffold Skill

Purpose

This skill stamps out a runnable PyTorch training repo for a medical-imaging task — --task segmentation (U-Net), classification (CNN / timm backbone), detection (torchvision Faster R-CNN / FPN), synthesis (Pix2Pix generator + PatchGAN), ssl (SimCLR encoder), or finetune (transfer-learning a pretrained backbone with a frozen→unfrozen schedule + a provenance record) — with the reproducibility guarantees baked in by construction — so the build is leakage-safe and reproducible before a single epoch runs. It is the imaging analogue of how /analyze-stats generates runnable statistical code: the generator produces the repo, you run the training on your GPU / Colab, and the lane's deterministic gates verify the network-free parts.

It is the missing middle link in the lane: /model-selection (choose) → model-scaffold (build) → /model-assessment (validate the split / design, compute metrics) → /analyze-stats → /write-paper + /check-reporting (publish). It integrates MONAI / nnU-Net / TorchIO (referenced in the generated requirements.txt); it does not reimplement them.

When to use

  • You have a data manifest (one row per image, with a patient/subject ID) and want a reproducible, leakage-safe starting repo for a segmentation, classification, detection, synthesis or self-supervised model.
  • You want to fine-tune a pretrained backbone (transfer learning — the common clinician workflow: a timm / MONAI / MedSAM checkpoint adapted to your collected clinical data) with the freeze schedule, discriminative learning rates, and pretrained-weight provenance recorded (--task finetune).

When NOT to use

  • Auditing an already-trained model's validation design → /model-assessment.
  • Held-out metrics / calibration / bootstrap CIs → /model-assessment then /analyze-stats.
  • Choosing the architecture for the research question → /model-selection.
  • Reimplementing MONAI / nnU-Net → out of scope (the scaffold integrates them).
  • LLM / MLLM evaluation → /mllm-eval.

Read the full file on GitHub · 178 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. 20d ago Changed d0c0d20bbeab
  2. 21d ago Changed · +20 lines 12b9cedce169
  3. 22d ago Changed · +24 lines 2ecaab418a43
  4. 24d ago Changed · -12 lines · -129 tokens per session ab5bb4de96cd
  5. 1mo ago First seen · 146 lines · 191 tokens per session scan A 8fcf4060f064

Subscribe to this mod's changes

model-scaffold is a skill published in the GitHub repository Aperivue/medsci-skills (349 stars, last pushed 3d ago), licensed MIT. It adds 62 tokens to every session and 3,090 once invoked, about $0.0002 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-08-30.

Related

Other skills, from other repositories

genomic-intelligence

Predicts regulatory features, gene structure, and expression directly from DNA sequence using Genomic Intelligence's hosted transformer DNA language models — no local GPU or model weights. Six tasks over a REST API and a hosted MCP server (keyless public demo): promoter regions, splice donor/acceptor sites, enhancer…

K-Dense-AI/scientific-agent-skills · 151 tokens

torch-geometric

Supports PyTorch Geometric (PyG) graph neural networks — node/link/graph classification, message passing (GCN, GAT, GraphSAGE, GIN), heterogeneous graphs, neighbor sampling, and custom datasets. Use when working with torchgeometric, not for general NetworkX analytics or non-graph PyTorch models.

K-Dense-AI/scientific-agent-skills · 71 tokens

bulk-rnaseq

Prepares bulk RNA-seq FASTQ, Salmon, STAR or featureCounts output for gene-level differential expression. Covers nf-core/rnaseq and standalone quantification, biological replication, strandedness, reference provenance, validated count assembly and a PyDESeq2 handoff. Use for FASTQ-to-counts analysis, nf-core/rnaseq…

K-Dense-AI/scientific-agent-skills · 111 tokens

geniml

Supports audited local Geniml genomic-interval workflows: validate BED and universe contracts, plan Region2Vec or scEmbed runs, inspect model/tokenizer compatibility, and assess consensus universes.

K-Dense-AI/scientific-agent-skills · 42 tokens

waypoint-bio

Supports work with Outpost Bio's open microbiome foundation models - the Waypoint checkpoints (Waypoint-6m, Waypoint-45m, Waypoint-170m), the Atlas pretraining corpus, the Compass eight-task benchmark, or the waypoint CLI from the waypoint-bio package. Covers embedding microbiome samples, fine-tuning on taxonomic…

K-Dense-AI/scientific-agent-skills · 129 tokens

aeon

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard…

K-Dense-AI/scientific-agent-skills · 74 tokens