ml-best-practices

Guides machine learning and data analysis workflows with structured plans for clustering, classification, regression, and forecasting.

9|Updated Jul 8, 2026
One-click install
npx skills add https://github.com/jerrylin96/dotgemini --skill ml-best-practices-jerrylin96
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ml-best-practices
Source: https://github.com/jerrylin96/dotgemini/tree/main/skills/ml-best-practices
Command: npx skills add https://github.com/jerrylin96/dotgemini --skill ml-best-practices-jerrylin96

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Data analysis and machine learning tasks often lack a consistent methodology, leading to skipped validation steps, data leakage, and notebooks that show code without interpretation. This Skill enforces disciplined ML workflows with step-by-step plans and mandatory analysis after every code cell. ## Core Features & Use Cases - Task-Specific Analysis Plans: Provides structured step-by-step workflows for clustering, classification, regression, time series forecasting, exploratory data analysis, anomaly detection, and model comparison. - Essential ML Safeguards: Enforces strict featurization ordering (split before fitting preprocessing pipelines) and systematic handling of missing or NULL values to prevent data leakage. - Narrative Notebooks: Requires a markdown analysis cell after every code cell and a final summary that comprehensively answers the original prompt. - Use Case: When asked to segment customers, the Skill walks through schema understanding, feature encoding, standardization, silhouette-score-based cluster selection, PCA visualization, and a written description of each cluster. ## Quick Start Ask the AI to perform a clustering, classification, regression, or forecasting analysis on your dataset and it will follow the appropriate structured plan with analysis after each step.

Frequently Asked Questions about ml-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a machine learning analysis in a notebook?

Follow a task-specific plan: understand the schema, visualize features, handle missing values, encode and standardize data, train models, and evaluate results. Add a markdown analysis cell after every code cell and end with a summary answering the original prompt.

How to choose the optimal number of clusters in clustering analysis?

Run clustering across a range of cluster counts and collect the silhouette score for each. Select the number of clusters with the best silhouette score, then use PCA to project data into two dimensions and scatterplot samples colored by cluster label.

Should I split data before or after scaling and encoding?

Always split into training and test sets before fitting preprocessing pipelines such as scaling or encoding. Fit the pipelines on the training data and apply them to the test data independently to prevent data leakage.

How do I handle missing or NULL values in a dataset?

First analyze the frequency of missing values, then decide whether to keep, drop, or impute them with a contextually appropriate value, explaining your reasoning. Prefer keeping data over dropping it, and create indicator features for missingness when meaningful.

How should I validate time series forecasting models?

Always use a chronological split to create training, validation, and test sets rather than random splitting. Check for seasonality and stationarity first, use those findings as model hyperparameters, and evaluate with error metrics on the validation set.

Can this skill be used with SQL or BigQuery ML workflows?

Yes, for SQL-based solutions this skill dictates the analysis steps such as markdown analysis cells and visualization logic, while SQL syntax itself is deferred to the bigquery skill. The analytical methodology remains the same regardless of query language.