用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/InugamiDev/ultrathink-oss --skill ml-ops命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Unified design foundations — design system architecture, tokens, component specs, visual principles, creative vision, figma integration, plus brand design system loader (66 real brands via DESIGN.md). Absorbs design, design-system, design-systems, design-principles, design-router, creative-vision, figma, design-md.
Render, summarize, and present markdown documents and structured content in multiple output modes
Ultra UI skill - combines Google's DESIGN.md spec (machine-readable design tokens) with the ui-ux-pro-max knowledge base (91 styles, 161 palettes, 73 font pairings, 161 products, 104 UX guidelines, 25 chart types). Generates lint-clean DESIGN.md files, validates token references and WCAG contrast, exports Tailwind/DTCG tokens, and diffs design systems version-over-version.
正在显示 SKILL.md
基于 SOC 职业分类
| name | ml-ops |
| description | Model deployment, versioning, monitoring, A/B testing, feature stores, and ML pipeline orchestration |
| layer | domain |
| category | ai-ml |
| triggers | ["MLOps","model deployment","model monitoring","model versioning","A/B testing models","feature store","ML pipeline","model serving"] |
| inputs | [{"model":"Model type, framework (PyTorch, TensorFlow, ONNX, LLM)"},{"requirements":"Latency, throughput, availability, cost targets"},{"infrastructure":"Cloud provider, Kubernetes, serverless preferences"},{"workflow":"Training, evaluation, deployment, monitoring needs"}] |
| outputs | [{"deployment_architecture":"Model serving infrastructure design"},{"pipeline_config":"Training and deployment pipeline configuration"},{"monitoring_setup":"Model performance and data drift monitoring"},{"versioning_strategy":"Model and dataset version management"},{"ab_testing_plan":"Experiment design for model comparison"}] |
| linksTo | ["docker","kubernetes","monitoring","cicd","logging"] |
| linkedFrom | ["ai-agents","rag","plan"] |
| preferredNextSkills | ["monitoring","docker"] |
| fallbackSkills | ["cicd"] |
| riskLevel | medium |
| memoryReadPolicy | selective |
| memoryWritePolicy | none |
| sideEffects | ["May create deployment configurations","May configure monitoring dashboards","Model deployments affect production traffic"] |
Design and implement the operational infrastructure for machine learning systems: model versioning, reproducible training pipelines, deployment strategies, A/B testing, monitoring for data drift and model degradation, and feature stores. MLOps bridges the gap between training a model in a notebook and running it reliably in production.
DATA:
Collection -> Cleaning -> Feature Engineering -> Feature Store
|
MODEL: v
Experiment -> Train -> Evaluate -> Register -> Deploy -> Monitor
^ |
| v
+<--- Retrain <--- Alert (drift/degradation detected) -+
BATCH INFERENCE:
Run predictions on a schedule (hourly, daily)
Results stored in database/cache
Good for: Recommendations, risk scoring, email personalization
Latency: Minutes to hours (acceptable)
REAL-TIME INFERENCE:
HTTP API endpoint, request-response
Good for: Search ranking, fraud detection, chatbots
Latency: <100ms (required)
STREAMING INFERENCE:
Process events from a message queue
Good for: Anomaly detection, real-time scoring
Latency: Seconds (near real-time)
EDGE INFERENCE:
Model runs on device (browser, mobile, IoT)
Good for: Image classification, NLP on device
Latency: <10ms (on-device)
LLM SERVING:
Managed API (OpenAI, Anthropic) or self-hosted (vLLM, Ollama)
Good for: Text generation, chat, code generation
Latency: 1-30 seconds (token streaming)
MODEL REGISTRY:
model-name/
v1.0.0/
model.onnx (or model.pt, model weights)
config.json (hyperparameters, architecture)
metrics.json (evaluation results)
requirements.txt (dependencies)
README.md (training notes, known limitations)
v1.1.0/
...
v2.0.0/
...
VERSIONING SCHEME:
MAJOR: Architecture change, different input/output schema
MINOR: Retrained on new data, improved accuracy
PATCH: Bug fix, configuration change
METADATA TO TRACK:
- Training data version (hash or timestamp)
- Hyperparameters used
- Evaluation metrics (accuracy, F1, latency)
- Training duration and cost
- Git commit of training code
- Feature set version
# serve.py
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
import onnxruntime ort
numpy np
app = FastAPI(title=, version=)
session = ort.InferenceSession()
():
features: []
():
prediction:
confidence:
model_version:
():
input_array = np.array([request.features], dtype=np.float32)
outputs = session.run(, {: input_array})
PredictionResponse(
prediction=(outputs[][]),
confidence=(outputs[][]),
model_version=,
)
():
{: , : }
// Traffic splitting for model comparison
interface ModelConfig {
name: string;
version: string;
endpoint: string;
trafficWeight: number; // 0-100
}
const modelConfigs: ModelConfig[] = [
{ name: 'baseline', version: 'v1.0.0', endpoint: '/models/v1/predict', trafficWeight: 80 },
{ name: 'challenger', version: 'v2.0.0', endpoint: '/models/v2/predict', trafficWeight: 20 },
];
async function routeRequest(request: PredictionRequest, userId: string) {
// Consistent routing: same user always goes to same model
const hash = hashString(`${userId}:experiment-2026-03`);
const bucket = hash % 100;
let cumulative = 0;
for (const config of modelConfigs) {
cumulative += config.trafficWeight;
if (bucket < cumulative) {
const result = await callModel(config.endpoint, request);
// Log for analysis
await logExperiment({
userId,
model: config.name,
version: config.version,
input: request,
output: result,
timestamp: new Date(),
});
return { ...result, model: config.name };
}
}
}
# monitor.py
import numpy as np
from scipy.stats import ks_2samp
class DriftDetector:
def __init__(self, reference_data: np.ndarray, threshold: float = 0.05):
self.reference = reference_data
self.threshold = threshold
def check_drift(self, current_data: np.ndarray) -> dict:
results = {}
for i in range(current_data.shape[1]):
stat, p_value = ks_2samp(
self.reference[:, i],
current_data[:, i],
)
results[f"feature_{i}"] = {
"statistic": float(stat),
"p_value": float(p_value),
"drift_detected": p_value < self.threshold,
}
drift_count = sum(1 for r in results.values() if r["drift_detected"])
return {
"features": results,
"drift_count": drift_count,
"total_features": current_data.shape[1],
"alert": drift_count > current_data.shape[1] * 0.3,
}
# Run daily
# detector = DriftDetector(training_data)
# report = detector.check_drift(last_24h_data)
# if report["alert"]:
# send_alert("Data drift detected", report)
# .github/workflows/ml-pipeline.yml
name: ML Pipeline
on:
push:
paths: ['models/**', 'training/**']
jobs:
train:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Train model
run: python training/train.py --config training/config.yaml
- name: Evaluate model
run: python training/evaluate.py
- name: Check quality gate
run: |
python -c "
import json
metrics = json.load(open('metrics.json'))
assert metrics['accuracy'] >= 0.95, f'Accuracy {metrics[\"accuracy\"]} below threshold'
assert metrics['latency_p99_ms'] <= 100, f'Latency {metrics[\"latency_p99_ms\"]}ms above threshold'
"
- name: Register model
if: success()
run: python training/register.py --version ${{ github.sha }}
- name: Deploy canary
if: success()
run: python deploy/canary.py --version ${{ github.sha }} --traffic 10
| Pitfall | Impact | Fix |
|---|---|---|
| Training-serving skew | Model performs differently in prod | Use feature store, same preprocessing |
| No drift monitoring | Silent degradation over time | Automated drift detection with alerts |
| Manual deployments | Slow, error-prone, not reproducible | CI/CD pipeline with quality gates |
| No model versioning | Cannot rollback, cannot reproduce | Register every model with metadata |
| Ignoring latency | Timeouts, bad user experience | Profile and optimize, set SLA targets |
| No A/B testing | Ship worse models without knowing | Canary deploy, measure business metrics |