/mlops-skills:production-model-rollback-procedurefrom mlops-skills
Guides incident-time rollback of a production model to a previous version, with mandatory feature-schema compatibility verification to prevent silent failures from schema drift.
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.
model-packaging-and-versioning covers designing a registry promotion scheme where rollback is possible in principle; this skill covers executing that rollback correctly under incident pressure, when a bad deploy is actively hurting users and someone needs to act in minutes, not review a design doc. The single most dangerous shortcut at this moment is assuming "the previous version" is automatically safe to restore: features evolve underneath a model version's shelf life, and a model that served correctly a month ago can be fed a feature schema today that has since gained, lost, or renamed columns it depends on. A naive rollback can silently trade one bad model for a model that errors or produces garbage on a schema it no longer recognizes, turning a bad-deploy incident into a longer one. This skill makes the feature-schema compatibility check a required gate in the rollback procedure itself, not an optional nicety.
import json
def schema_diff(old_version_schema: dict, current_feature_output_schema: dict) -> dict:
old_fields = old_version_schema["features"] # {name: dtype}
current_fields = current_feature_output_schema["features"]
missing = {k: v for k, v in old_fields.items() if k not in current_fields}
type_changed = {
k: (v, current_fields[k])
for k, v in old_fields.items()
if k in current_fields and current_fields[k] != v
}
new_unused = {k: v for k, v in current_fields.items() if k not in old_fields}
return {"missing": missing, "type_changed": type_changed, "new_unused": new_unused}
result = schema_diff(
old_version_schema=json.load(open("registry/fraud-scorer/v13/input_schema.json")),
current_feature_output_schema=json.load(open("feature_store/driver_stats/current_schema.json")),
)
if result["missing"] or result["type_changed"]:
raise SystemExit("BLOCKED: rollback target's schema is incompatible with current feature output")
Production (mlflow models transition-stage ... --stage Production
or the equivalent SageMaker/Vertex AI action), so the audit trail and
lineage stay intact.Symptom: The rollback "succeeds" — the previous model version is confirmed deployed — but predictions immediately start erroring or silently degrade, because the feature store now returns a schema the old version's preprocessing pipeline doesn't recognize (a column it expects was renamed or removed, or a categorical feature gained new values it was never trained on). Warning: This is the core risky action this skill exists to prevent. Never roll back to a previous model version without first diffing its expected input schema against the current feature pipeline/feature store output; if incompatible, treat the rollback as blocked and use a compatibility shim, an older compatible version, or a safe fallback instead of forcing it.
Symptom: Someone rolls back by pointing the serving configuration at an old container image or file path directly, bypassing the model registry entirely, so there's no clean record of what changed or when. Fix: Always execute rollback as a registry stage transition (or its cloud-native equivalent), never a manual infrastructure edit — this is what keeps the rollback auditable and reversible.
Symptom: The team assumes "the previous version" (N-1) is automatically safe, but that version had itself been rolled back once before for an unrelated issue and never fully re-validated in production. Fix: Check the registry's version history/annotations for a truly last-known-good version, rather than mechanically reverting one version back without checking its own track record.
Symptom: The rollback target is cut over to 100% of traffic instantly, and a second, separate incident starts minutes later because the rollback target had its own latent issue nobody caught. Fix: Canary the rollback target at a smaller traffic percentage first whenever incident severity allows the extra minutes, rather than treating instant full cutover as always the safest option.
Scenario: fraud-scorer version 14 is promoted to production and
within 20 minutes the false-positive rate spikes sharply, blocking
legitimate transactions.
driver_stats feature view. It finds that driver_stats was
upgraded from v3 to v4 between version 13's retirement and now, and
v4 renamed avg_txn_amount_30d to avg_txn_amount_rolling_30d —
version 13's preprocessing code still looks for the old name and would
silently treat it as missing/null.avg_txn_amount_rolling_30d back to the
avg_txn_amount_30d name version 13 expects, then re-runs the schema
diff to confirm compatibility.Production via
mlflow models transition-stage, canaried at 25% of traffic for ten
minutes, then cut over to 100% once the false-positive rate returns to
baseline.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
model-rollback, mlops, incident-response, feature-schema, runbook
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin mlops-skills22 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."
Other plugins' skills for the same job