$npx -y skills add managedcode/dotnet-skills --skill mlnetUse ML.NET to train, evaluate, or integrate machine-learning models into .NET applications with realistic data preparation, inference, and deployment expectations. USE FOR: ML.NET integration; local model training or retraining; inference pipelines, model loading, evaluation, and
| 1 | # ML.NET |
| 2 | |
| 3 | ## Trigger On |
| 4 | |
| 5 | - integrating machine learning into a .NET application |
| 6 | - training or retraining ML.NET models from local data |
| 7 | - reviewing inference pipelines, model loading, or AutoML-generated code |
| 8 | |
| 9 | ## Workflow |
| 10 | |
| 11 | 1. Start from the prediction task and data quality, not the algorithm or package list. |
| 12 | 2. Separate training code from inference code so the production path stays lean and predictable. |
| 13 | 3. Review feature engineering, normalization, label quality, and evaluation metrics before trusting model output. |
| 14 | 4. Use Model Builder or the ML.NET CLI when they speed up exploration, but inspect the generated C# before treating it as production architecture. |
| 15 | 5. Plan how the model is loaded, versioned, and refreshed in the application lifecycle. |
| 16 | 6. Validate with representative datasets and explicit evaluation, not only with a sample that happens to run. |
| 17 | |
| 18 | ## Deliver |
| 19 | |
| 20 | - ML.NET pipelines that fit the prediction task |
| 21 | - production-usable inference integration |
| 22 | - evaluation evidence tied to the business scenario |
| 23 | |
| 24 | ## Validate |
| 25 | |
| 26 | - model quality is measured, not assumed |
| 27 | - training and inference responsibilities are separated |
| 28 | - deployment and versioning expectations are explicit |
| 29 | |
| 30 | ## References |
| 31 | |
| 32 | - [patterns.md](references/patterns.md) - Data loading, training pipelines, evaluation metrics, deployment strategies, and feature engineering patterns |
| 33 | - [examples.md](references/examples.md) - Complete examples for sentiment analysis, price prediction, image classification, anomaly detection, recommendations, clustering, fraud detection, text classification, object detection, and AutoML |