> Compute and report task-correct held-out metrics for a trained medical-imaging model — segmentation (Dice plus a boundary metric such as HD95 or NSD, per structure), classification (AUROC plus AUPRC and sensitivity/specificity with bootstrap CIs at the deployment prevalence), detection (FROC or mAP with a stated IoU criterion), interactive/promptable segmentation (the interaction-count, convergence, and per-case-time axes a static Dice omits), or generative/synthesis image evaluation (similarity plus the downstream-task efficacy similarity alone cannot establish) — plus calibration and subgroup slices. Emits a per-case results table that analyze-stats turns into publication tables, and gates the metric choice against Metrics Reloaded, CLAIM 2024, and Park et al. 2024 (no pixel accuracy for segmentation, no bare accuracy under imbalance, no static Dice for an interactive method, no similarity-only claim for a generative model). Numbers come only from executed code, never hand-typed.
npx skills add https://github.com/Aperivue/medsci-skills --skill model-evaluation
This skill makes a medical-imaging model's held-out evaluation task-correct and honest: the right
metric for the task and the prevalence, with uncertainty, calibration, and subgroup performance. It
emits a per-case metric table that the publication statistics build on, and gates the metric choice
against Metrics Reloaded (Maier-Hein & Reinke et al., *Nat Methods* 2024) and CLAIM 2024.
It sits between /model-validation (which audits the split / design) and /analyze-stats (which owns
the comparative inference). It computes the imaging-specific per-case metrics (surface distances, FROC,
ECE of a softmax head); /analyze-stats owns DeLong / NRI / IDI / decision curves / MRMC. Like
/analyze-stats, it generates and executes code on your predictions — numbers are never hand-typed.
subgroup slices, plus a per-case table for the manuscript statistics.
/model-validation./analyze-stats./model-scaffold; LLM / MLLM → /mllm-eval./make-figures.State the task (segmentation / classification / detection / interactive / generative) and the analysis unit the metric must
respect (per-patient vs per-lesion vs per-image). A per-lesion metric must not be reported as
per-patient.
Generate evaluation code that computes, on the held-out predictions:
mean, with bootstrap 95% CIs.
the deployment prevalence** (not a balanced set).
metrics above plus the interaction axis — Dice-vs-interactions / number-of-clicks (NoC) to a
target threshold, initial-vs-converged (or peak) Dice, and per-case interaction/inference time
(see the metric guide; the study design is in /design-study + /model-validation).
(MSE/RMSE/PSNR/SSIM) or no-reference quality (SNR/CNR, standardized visual scores), **plus a
downstream-task evaluation** — image quality is not clinical utility (Park et al., *Radiol Med* 2024).
For multiclass classification, state the aggregation scheme (one-vs-rest / macro / micro /
pairwise / Obuchowski); time-to-event discrimination (Harrell's C, time-dependent ROC) is handed
to /analyze-stats.
Add calibration (reliability diagram / ECE) and subgroup slices (the Model Card Factors).
See ${CLAUDE_SKILL_DIR}/references/metric_guide.md. Emit a per-case CSV for /analyze-stats.
python3 ${CLAUDE_SKILL_DIR}/scripts/check_metric_reporting.py \
--report results.md --task segmentation|classification|detection|interactive|generative --strict
PIXEL_ACCURACY_SEG / NO_BOUNDARY_METRIC / ACCURACY_ONLY / DETECTION_METRIC_MISSING must be zero.
The per-case table → /analyze-stats (DeLong / NRI / IDI / decision curves, publication tables);
figures → /make-figures; the numbers + subgroup performance → /model-card; Methods/Results →
/write-paper; compliance → /check-reporting.
if predictions or ground truth are missing, say so and stop — do not invent a result.
flags these; report Dice + a boundary metric, or AUROC + AUPRC with CIs.
[VERIFY] and ask.scripts/check_metric_reporting.py — flags a task-metric mismatch / missing uncertainty (stdlib,
network-free). Reproducible challenge: bash ${CLAUDE_SKILL_DIR}/scripts/metric_reporting_challenge/verify.sh.
Load on demand (keep SKILL.md short):
${CLAUDE_SKILL_DIR}/references/metric_guide.md — operational checklist: the task-correct metricper task (segmentation Dice + HD95/NSD per structure; classification AUROC + AUPRC + sens/spec at
deployment prevalence; detection FROC/mAP with a stated IoU), plus calibration, subgroup slices,
run-variance, and the per-case CSV hand-off.
${CLAUDE_SKILL_DIR}/references/metric_selection_grounding.md — the standards grounding behindthose choices: the Metrics Reloaded task-fingerprint principle, why each metric pairing is
required, calibration vs discrimination, disaggregated reporting, and the CLAIM 2024
reporting-fit map (/check-reporting owns the item audit).
model-validation (design) -> model-evaluation (this skill: per-case task-correct metrics + CIs)
-> analyze-stats (DeLong / NRI / IDI / decision curves, publication tables) -> make-figures
-> model-card (numbers + subgroup) -> write-paper + check-reporting
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
Access NCBI GEO for gene expression/genomics data. Search/download microarray and RNA-seq datasets (GSE, GSM, GPL), retrieve SOFT/Matrix files, for transcriptomics and expression analysis.
Bayesian modeling with PyMC. Build hierarchical models, MCMC (NUTS), variational inference, LOO/WAIC comparison, posterior checks, for probabilistic programming and inference.
Multi-objective optimization framework. NSGA-II, NSGA-III, MOEA/D, Pareto fronts, constraint handling, benchmarks (ZDT, DTLZ), for engineering design and optimization problems.
Statistical modeling toolkit. OLS, GLM, logistic, ARIMA, time series, hypothesis tests, diagnostics, AIC/BIC, for rigorous statistical inference and econometric analysis.
Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.
Convert PyTorch AT_DISPATCH macros to AT_DISPATCH_V2 format in ATen C++ code. Use when porting AT_DISPATCH_ALL_TYPES_AND*, AT_DISPATCH_FLOATING_TYPES*, or other dispatch macros to the new v2 API. For ATen kernel files, CUDA kernels, and native operator implementations.
Write docstrings for PyTorch functions and methods following PyTorch conventions. Use when writing or updating docstrings in PyTorch code.
Take aperivue/model-evaluation from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.