/mlops-skills:model-monitoring-and-drift-detectionfrom mlops-skills
Guides setting up production model monitoring for data, concept, and prediction drift using statistical tests, thresholds, and alerting/retraining triggers. Useful for silent model degradation or deciding when retraining is needed.
Ships in mlops-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.
A deployed model does not fail loudly when the world changes underneath it — it fails quietly, by making steadily worse predictions while every infrastructure health check stays green. Model monitoring and drift detection closes that gap: it tracks the statistical properties of inputs, outputs, and (where ground truth eventually arrives) prediction quality over time, and raises an alert or triggers retraining before silent degradation turns into a business incident. This is operationally distinct from standard application monitoring (latency, error rate, uptime) because the failure mode here is a model that is "working" in every infrastructure sense while being wrong.
< 0.1 no significant
shift, 0.1–0.25 moderate shift (investigate), > 0.25 significant
shift (treat as an actionable alert) — tune per feature's known
volatility rather than applying one threshold blindly everywhere.avg_rating_30d:
import numpy as np
def population_stability_index(expected, actual, bins=10):
breakpoints = np.quantile(expected, np.linspace(0, 1, bins + 1))
breakpoints[0], breakpoints[-1] = -np.inf, np.inf
e_counts, _ = np.histogram(expected, bins=breakpoints)
a_counts, _ = np.histogram(actual, bins=breakpoints)
e_pct = np.clip(e_counts / len(expected), 1e-6, None)
a_pct = np.clip(a_counts / len(actual), 1e-6, None)
return float(np.sum((a_pct - e_pct) * np.log(a_pct / e_pct)))
psi = population_stability_index(reference_ratings, current_week_ratings)
# psi = 0.31 -> significant shift, alert
Symptom: Model accuracy silently degrades over several months with no alert firing, discovered only when a business stakeholder notices declining outcomes. Fix: Don't rely solely on infrastructure health checks (uptime, latency, error rate) as a proxy for model health; instrument explicit distributional and (when available) quality monitoring from initial deployment, with a frozen training-time reference baseline.
Symptom: A drift alert fires constantly on a highly seasonal feature (e.g. retail transaction volume around holidays), causing the team to start ignoring drift alerts altogether. Fix: Calibrate thresholds per feature based on its known seasonal/ natural variance rather than one blanket threshold, and consider seasonally-adjusted or week-over-week (rather than static-baseline) comparisons for features with strong known cyclicality.
Symptom: Aggregate drift metrics look fine, but a specific customer segment (e.g. a newly launched region) experiences materially worse model performance for weeks before anyone notices. Fix: Segment drift and quality monitoring by relevant slices (region, device, customer tier, new vs. established users), not only in aggregate; add slice-level dashboards as a standard part of monitoring setup, not an afterthought.
Symptom: A retraining pipeline auto-triggers on a drift alert and auto-promotes the new model straight to production, and the new model turns out worse because the drift was actually caused by a temporary upstream data pipeline bug, not real distribution shift — so the retrained model learned from bad data too. Fix: Never let an automated drift-triggered retrain skip the gated promotion and human/automated evaluation checks described in model-packaging-and-versioning and training-pipeline-orchestration; treat "retrain" and "promote to production" as distinct, separately gated actions.
A subscription-churn model, churn-predictor-v3, is deployed to production.
days_since_last_login, support_tickets_30d, plan_tier) as the
frozen reference baseline, tagged to model version 3.days_since_last_login PSI climbs from a
steady ~0.04 to 0.29 over three consecutive days — flagged as a
significant, persistent shift (exceeds the 0.25 threshold for more than
one window).support_tickets_30d PSI rises to 0.19
alongside a real drop in retention-model recall (from labeled outcomes
arriving on a 30-day delay) — this time judged genuine concept drift from
a product change, and it triggers the scheduled retraining pipeline
(see
training-pipeline-orchestration),
whose output goes through the normal gated promotion before reaching
production.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
22 skills in this plugin
/complete-mlops-platform-deployment-on-aws-from-scratchSequences a complete, end-to-end MLOps platform deployment on AWS from a bare AWS Organization to a production-ready platform serving a first retrained model — AWS landing zone, the SageMaker-vs-EKS+Kubeflow platform decision (EKS+Kubeflow is the worked path here), GPU node pools via the NVIDIA GPU Operator, MLflow experiment tracking on S3, a Kubeflow Pipelines retraining DAG, model registry/packaging with gated promotion, KServe canary/shadow serving, and drift monitoring. This is an integration/orchestration skill that sequences several existing tool-specific skills in the correct order and flags the handoff points between them — it does not restate their internals. Use when a user asks to "stand up an MLOps platform on AWS from scratch," "build the full ML training-to-serving pipeline on EKS/SageMaker," "give me the end-to-end sequence from AWS account to a retrained, monitored production model," or "decide between SageMaker and EKS+Kubeflow for our ML platform."
/complete-mlops-platform-deployment-on-azure-from-scratchSequences a complete, end-to-end MLOps platform deployment on Azure from a bare tenant to a production-ready platform serving a first retrained model — Azure landing zone, the Azure-ML-vs-AKS+Kubeflow platform decision (Azure ML is the worked path), GPU compute clusters/quota, MLflow-compatible experiment tracking, an Azure ML pipeline retraining DAG, Model Registry with gated promotion, managed online endpoints with traffic-split canary rollout, and data-drift monitoring. An integration/ orchestration skill that sequences existing tool-specific skills in the right order and flags handoff points — it does not restate their internals. Use when a user asks to "stand up an MLOps platform on Azure from scratch," "build the full ML training-to-serving pipeline on Azure ML/AKS," "give me the end-to-end sequence from Azure tenant to a retrained, monitored production model," or "decide between Azure ML and AKS+Kubeflow for our ML platform."
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin mlops-skillsOther plugins' skills for the same job