/major-ai-skills:scikit-learnfrom major-ai-skills
Build scikit-learn preprocessing and model pipelines with cross-validation, model selection, and data-leakage checks.
Ships in major-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
scikit-learn standardizes estimators with fit / predict / transform. Pipeline and ColumnTransformer bundle preprocessing with models so cross-validation applies the same folds to transforms. Agents prevent leakage by fitting preprocessors inside CV, choose metrics matching the task, and persist entire pipelines - not only the final classifier.
raw columns -> ColumnTransformer
-> Pipeline(estimator)
-> cross_val / GridSearchCV
-> joblib dump
fit scalers/encoders on the full dataset before splitting.Pipeline so GridSearchCV tunes preprocessing + model together.joblib.dump(pipeline, ...) including transforms.from sklearn.compose import ColumnTransformer
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import OneHotEncoder, StandardScaler
from sklearn.impute import SimpleImputer
from sklearn.model_selection import cross_val_score
from sklearn.ensemble import HistGradientBoostingClassifier
num = Pipeline([("imp", SimpleImputer()), ("sc", StandardScaler())])
cat = Pipeline([
("imp", SimpleImputer(strategy="most_frequent")),
("oh", OneHotEncoder(handle_unknown="ignore")),
])
pre = ColumnTransformer([
("num", num, ["amount", "tenure_days"]),
("cat", cat, ["segment", "region"]),
])
clf = Pipeline([
("pre", pre),
("model", HistGradientBoostingClassifier(max_depth=6)),
])
scores = cross_val_score(clf, X, y, cv=5, scoring="roc_auc")
print(scores.mean(), scores.std())
clf.fit(X, y)
import joblib
joblib.dump(clf, "artifacts/churn_pipeline.joblib")
pipe = joblib.load("artifacts/churn_pipeline.joblib")
pipe.predict_proba(X_new)[:, 1]
| Symptom | Cause | Fix |
|---|---|---|
| Optimistic AUC | leakage / target encoding wrong | CV-safe target encoders |
| Crash on predict | unseen categories | handle_unknown='ignore' |
| Slow grid search | huge param grid | RandomizedSearchCV; fewer folds first |
| Bad production | trained without pipeline | dump full Pipeline |
DummyClassifier / simple linear baselines.scoring with business cost (precision@k, recall, MAE).@mlflow.@huggingface-transformers, @pytorch).@pandas - feature tables@mlflow - experiment tracking@great-expectations - validate feature inputsWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization./act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing.Other plugins' skills for the same job