model-selection

model-selection is a skill for Claude Code, Codex from zpower426/datapowers. It costs 31 tokens per session (2,068 once invoked), scanned A, original, MIT.

A machine-learning model selection process: compare simple reference models first, then tune the best candidates using measures that fit the task and business goal.

In plain words
What is it for?
Choosing between models, comparing their results with cross-validation, tuning promising candidates, and recording why the final model was selected.
Why use it?
It prevents tuning models before knowing whether they beat a basic benchmark, and reduces the risk of choosing the wrong success measure.

Skill for Claude CodeCodex

Part of the datapowers plugin — 20 skills, 3 commands, 3 agents, 1 hook shipped together

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.

agentmods
npx agentmods add skills/zpower426/datapowers/model-selection
Any agent
npx skills add zpower426/datapowers --skill model-selection
Clone the repo
git clone --depth 1 https://github.com/zpower426/datapowers

Made for: Claude Code, Codex.

Or install datapowers, the plugin that ships this one along with the rest of its 20 skills, 3 commands, 3 agents, 1 hook.

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-selection

README.md
[![agentmods](https://agentmods.dev/badge/skills/zpower426/datapowers/model-selection.svg)](https://agentmods.dev/skills/zpower426/datapowers/model-selection)
Your own site
<a href="https://agentmods.dev/skills/zpower426/datapowers/model-selection"><img src="https://agentmods.dev/badge/skills/zpower426/datapowers/model-selection.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,068 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00031 $0.02068
Opus 5 $0.00015 $0.01034
Sonnet 5 $0.00006 $0.00414
Haiku 4.5 $0.00003 $0.00207

Measured 4d ago against content hash 7097e4f90341, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

model-selection 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 4d ago.

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-selection/SKILL.md · 234 lines

How it starts

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

Model Selection

Systematic selection of the best model through baseline comparison and rigorous hyperparameter optimization.

Iron Law: NO HYPERPARAMETER TUNING WITHOUT BASELINE COMPARISON FIRST. METRIC MUST MATCH BUSINESS OBJECTIVE.

Do NOT begin model selection if test-driven-data-science has not been run. Check the manifest:

manifest = read_manifest()
assert manifest["data_validation"].get("decision") not in (None, "BLOCKED"), \
    "BLOCKED: test-driven-data-science must PASS before model selection. Run it first."

Checklist

  1. Confirm correct metric — must match task type and business objective
  2. Establish dummy baseline — minimum bar any model must beat
  3. Train 4 baseline models — without tuning
  4. Cross-validate all baselines — stratified k-fold, log all results
  5. Statistical comparison — Wilcoxon test on CV scores
  6. Select top 2 candidates — for hyperparameter optimization
  7. Run Bayesian HPO — Optuna, minimum 50 trials, log to MLflow
  8. Final model selection — based on CV score, NOT test set
  9. Document selection rationale — model choice + justification

Step 1: Choose the Right Metric

Task Metric (Primary) Metric (Secondary) Never Use
Binary classification, balanced F1 AUC-ROC
Binary classification, imbalanced F1-macro or PR-AUC Recall Accuracy alone
Multi-class classification F1-macro Accuracy alone
Regression RMSE MAE, R² R² alone
Ranking NDCG MAP Accuracy
Time series MAPE or SMAPE RMSE
# For imbalanced classification: always check the ratio first
minority_ratio = df[target].value_counts(normalize=True).min()
if minority_ratio < 0.20:
    print(f"⚠️ Imbalanced dataset ({minority_ratio:.1%} minority)")
    print("Primary metric: F1-macro or PR-AUC — NOT accuracy")
    PRIMARY_METRIC = 'f1_macro'

Read the full file on GitHub · 234 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. 4d ago First seen · 234 lines · 31 tokens per session scan A 7097e4f90341

Subscribe to this mod's changes

model-selection is a skill published in the GitHub repository zpower426/datapowers (1 stars, last pushed 5mo ago), licensed MIT. It adds 31 tokens to every session and 2,068 once invoked, about $0.0002 per session on Opus 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-31.

Related

Other skills, from other repositories

peer-conversation

Многотуровый диалог писателя (Claude) с одним или несколькими напарниками (любой набор из kimi/codex/hermes/claude-headless) по задаче пилота (DP.SC.154). Ведёт turn-loop (2 участника) или round-loop (3+, WP-509), обнаруживает CONSENSUS/ESCALATE, после консенсуса — Decision Gate (зафиксировать vs реализовать → ревью →…

TserenTserenov/FMT-exocortex-template · 118 tokens

kimi-peer-writer

Peer-сессия DP.SC.154 где Kimi = писатель, Claude = напарник. Запускается простой фразой. Включает ОРЗ Opening и Closing, turn-loop, эскалации, Decision Gate (зафиксировать vs реализовать → ревью → проверить → задеплоить), отложенную финализацию и верификацию.

TserenTserenov/FMT-exocortex-template · 84 tokens

pack-new

Create a new Pack — guided flow through SPF: choose domain, name Pack, scaffold structure, fill roadmap.

TserenTserenov/FMT-exocortex-template · 25 tokens

apply-captures

Разбор extraction-reports со status pending-review — решение R15 (accept/reject/defer) ЖИВЫМ ПИЛОТОМ, запись в Pack, обновление статуса, коммит. Вызывать при Close при наличии N>0 pending-review отчётов.

TserenTserenov/FMT-exocortex-template · 63 tokens

archgate

Оценка архитектурного решения по 7 характеристикам ЭМОГССБ (v3.1 — фильтр допуска, атрибут-сценарии, совет затронутых сторон; профиль без агрегатного балла, conjunctive screening). Используй когда пользователь предлагает архитектурное решение, новый инструмент или системное изменение.

TserenTserenov/FMT-exocortex-template · 75 tokens

bottleneck-pick

Аналитик ограничений (DP.ROLE.054): находит главное ограничение (bottleneck) конкретного конвейера через TOC Five Steps + EC + NBR и строит Stage Dependency Map. Используй ТОЛЬКО при работе с конкретным WP, эпиком, проектом или weekplan (--target WP-NNN|weekplan|pilot:id). НЕ используй для общих вопросов приоритизации…

TserenTserenov/FMT-exocortex-template · 104 tokens