mlops-prototyping
Guide to create structured, reproducible Jupyter notebooks for MLOps prototyping, emphasizing configuration management and pipeline integrity.
Install
mkdir -p .claude/skills/mlops-prototyping && curl -L -o skill.zip "https://mcp.directory/api/skills/download/4777" && unzip -o skill.zip -d .claude/skills/mlops-prototyping && rm skill.zipInstalls to .claude/skills/mlops-prototyping
About this skill
MLOps Prototyping
Goal
To create standardized, reproducible, and production-ready prototypes in Jupyter notebooks. This skill enforces a structured layout (Imports -> Configs -> Load -> EDA -> Modeling -> Eval) and robust engineering practices (Pipelines, Split-Verification) to prevent technical debt and data leakage.
Prerequisites
- Language: Python
- Environment:
uvmanaged project (.venv) - Context: Executed within a
.ipynbfile or converting to one.
Instructions
1. Notebook Structure
Enforce the following linear sections in every notebook to ensure readability and maintainability.
- Title & Purpose: H1 Title and a brief description of the experiment goals.
- Imports: Group standard libraries, third-party, and usage-specific imports.
- Configs: Define Global Constants (paths, random seeds, hyperparameters) here. No magic numbers deeper in the code.
- Datasets: Load, validate, and split data.
- Analysis (EDA): Inspect target distributions and correlations.
- Modeling: Define and train
sklearn.pipeline.Pipelineobjects. - Evaluations: Compute metrics and visualize performance on held-out data.
2. Configuration Standards
Expose all "knobs" at the top of the notebook for easy experimentation.
-
Randomness: Define
RANDOM_STATE = 42and use it in splits and model initialization. -
Paths: Use
pathlibfor robust path handling.from pathlib import Path ROOT = Path("..") DATA_PATH = ROOT / "data" / "input.parquet" -
Hyperparameters: Group model params (e.g.,
N_ESTIMATORS,MAX_DEPTH). -
Toggles: Use booleans for expensive operations (e.g.,
USE_GPU = True,RUN_GRID_SEARCH = False).
3. Data Management
Ensure data integrity and prevent leakage.
- Loading: Prefer
pd.read_parquetfor speed/types, orpd.read_csv. - Splitting:
- Always split into
X_train,X_test,y_train,y_testbefore any data-dependent transformations (imputation, scaling). - Random Split: Use
sklearn.model_selection.train_test_splitwithstratifyfor balanced classification. - Time Series: Use
sklearn.model_selection.TimeSeriesSplitif data has a temporal dimension (do NOT shuffle). - Use
random_state=RANDOM_STATE.
- Always split into
4. Pipeline Construction
Prohibit raw data transformations on the full dataset.
-
Mandate: Use
sklearn.pipeline.PipelineorColumnTransformer. -
Why: Automation of
fiton train andtransformon test prevents data leakage. -
Example:
from sklearn.pipeline import Pipeline from sklearn.preprocessing import StandardScaler, OneHotEncoder from sklearn.impute import SimpleImputer from sklearn.compose import ColumnTransformer CACHE = "./.cache" # Define a cache directory numeric_transformer = Pipeline(steps=[ ('imputer', SimpleImputer(strategy='median')), ('scaler', StandardScaler()) ]) preprocessor = ColumnTransformer(transformers=[ ('num', numeric_transformer, numeric_features) ]) # Use 'memory' to cache transformer outputs, speeding up GridSearch model = Pipeline(steps=[ ('preprocessor', preprocessor), ('classifier', RandomForestClassifier()) ], memory=CACHE)
5. Evaluation & Visualization
Go beyond accuracy/MSE.
- Metrics: Use
sklearn.metricsappropriate for the task (F1, ROC-AUC, RMSE, MAE). - Baselines: Compare against a "Dummy" model (mean/mode) to verify learning.
- Visualization:
- Regression: Residual plots, Actual vs Predicted.
- Classification: Confusion Matrix, ROC Curve, Precision-Recall.
- Feature Importance: Visualize
feature_importances_or SHAP values.
6. Transition to Production
Facilitate the move from notebook to python package (src/).
- Function Refactoring: Once a block of code is stable (e.g., a complex data cleaning step), refactor it into a function within the notebook. This makes moving it to a
.pyfile trivial later. - Cell Tagging: Use tags like
parameters(for Papermill) orexportto mark cells that should be part of the final documentation or automated pipeline. - Clean State: Ensure the notebook runs top-to-bottom (
Restart Kernel and Run All) without errors before committing.
Self-Correction Checklist
- No Magic Numbers: Are all parameters in the
Configssection? - No Data Leakage: Is
fitcalled ONLY onX_train? - Reproducibility: Is
random_stateset for all stochastic operations? - Resilience: are paths defined relative to the project root?
- Clarity: Does the notebook read like a report (Markdown cells explaining the Why)?
More by fmind
View all →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
rust-coding-skill
UtakataKyosui
Guides Claude in writing idiomatic, efficient, well-structured Rust code using proper data modeling, traits, impl organization, macros, and build-speed best practices.
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.