ml-training

ml-training is a skill for Claude Code, Codex from LuuOW/meridian-mcp. It costs 58 tokens per session (2,022 once invoked), scanned A, original, MIT.

A guide to training machine-learning models, including classifiers, regressors, and fine-tuned transformer models.

In plain words
What is it for?
Use it for feature preparation, balanced data splits, cross-validation, hyperparameter tuning, loss and learning-rate choices, and reproducible training with scikit-learn, PyTorch, or Hugging Face.
Why use it?
It helps structure data preparation and training so results are less likely to be distorted by leakage or inconsistent experiments.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for feature preparation, balanced data splits, cross-validation, hyperparameter tuning, loss and learning-rate choices, and reproducible training with scikit-learn, PyTorch, or Hugging Face.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/luuow/meridian-mcp/ml-training
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 LuuOW/meridian-mcp --skill ml-training
Clone the repo
git clone --depth 1 https://github.com/LuuOW/meridian-mcp

Made for: Claude Code, Codex.

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 ml-training

README.md
[![agentmods](https://agentmods.dev/badge/skills/luuow/meridian-mcp/ml-training/github.svg)](https://agentmods.dev/skills/luuow/meridian-mcp/ml-training)
Your own site
<a href="https://agentmods.dev/skills/luuow/meridian-mcp/ml-training"><img src="https://agentmods.dev/badge/skills/luuow/meridian-mcp/ml-training/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 ml-training

Your own site · 80×15
<a href="https://agentmods.dev/skills/luuow/meridian-mcp/ml-training"><img src="https://agentmods.dev/badge/skills/luuow/meridian-mcp/ml-training.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,022 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.
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.00058 $0.02022
Opus 5 $0.00029 $0.01011
Sonnet 5 $0.00012 $0.00404
Haiku 4.5 $0.00006 $0.00202

Measured 9d ago against content hash ad41a783b481, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

ml-training 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 9d 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/ml-training/SKILL.md · 221 lines

How it starts

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

ml-training

Production ML training: classifiers, regressors, and fine-tuned transformers. Covers dataset hygiene, feature engineering, cross-validation, hyperparameter tuning, and reproducible runs.

Dataset Hygiene

# Stratified train/val/test split — preserves class balance
from sklearn.model_selection import train_test_split
X_train, X_temp, y_train, y_temp = train_test_split(
    X, y, test_size=0.30, stratify=y, random_state=42
)
X_val, X_test, y_val, y_test = train_test_split(
    X_temp, y_temp, test_size=0.50, stratify=y_temp, random_state=42
)
# Result: 70/15/15 train/val/test

Always split BEFORE any feature engineering that uses target statistics (target encoding, target-aware imputation) — otherwise you leak test info into train.

# Compute class weights for imbalanced problems
from sklearn.utils.class_weight import compute_class_weight
weights = compute_class_weight('balanced', classes=np.unique(y_train), y=y_train)
class_weight_dict = dict(zip(np.unique(y_train), weights))

Feature Engineering

from sklearn.preprocessing import StandardScaler, OneHotEncoder
from sklearn.compose import ColumnTransformer
from sklearn.pipeline import Pipeline

numeric_cols = ['age', 'income', 'tenure_days']
categorical_cols = ['region', 'plan_tier']

pre = ColumnTransformer([
    ('num', StandardScaler(), numeric_cols),
    ('cat', OneHotEncoder(handle_unknown='ignore', sparse_output=False), categorical_cols),
])

# ALWAYS wrap preprocessing in Pipeline — fit on train only, transform on val/test
pipe = Pipeline([('pre', pre), ('clf', GradientBoostingClassifier())])
pipe.fit(X_train, y_train)
preds = pipe.predict(X_val)

Classifier Training (tabular)

import xgboost as xgb
from sklearn.metrics import roc_auc_score, average_precision_score, classification_report

model = xgb.XGBClassifier(
    n_estimators=500,
    max_depth=6,
    learning_rate=0.05,
    subsample=0.8,
    colsample_bytree=0.8,
    reg_alpha=0.1,
    reg_lambda=1.0,
    eval_metric='aucpr',
    early_stopping_rounds=50,
    random_state=42,
)
model.fit(X_train, y_train, eval_set=[(X_val, y_val)], verbose=25)

y_proba = model.predict_proba(X_test)[:, 1]
print(f"ROC-AUC: {roc_auc_score(y_test, y_proba):.3f}")
print(f"PR-AUC : {average_precision_score(y_test, y_proba):.3f}")

Read the full file on GitHub · 221 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. 9d ago First seen · 221 lines · 58 tokens per session scan A ad41a783b481

Subscribe to this mod's changes

ml-training is a skill published in the GitHub repository LuuOW/meridian-mcp (0 stars, last pushed yesterday), licensed MIT. It adds 58 tokens to every session and 2,022 once invoked, about $0.0003 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.