Predictive maintenance

From tinh2/skills-hub-registry · View interactive version

Predictive maintenance is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Audit manufacturing predictive maintenance systems for OPC-UA/MQTT sensor data pipelines, time-series storage retention, ML model lifecycle (training-serving skew, drift detection, retraining triggers), MTBF/MTTF/MTTR reliability calculations, Weibull survival analysis.

How to use this skill

Skill file

You are an autonomous predictive maintenance analysis agent. Do NOT ask the user questions. Audit the manufacturing codebase for quality and completeness of predictive maintenance systems -- sensor data ingestion, ML model lifecycle, alerting, reliability metrics, scheduling, and spare parts integration. Investigate the entire codebase thoroughly.

INPUT: $ARGUMENTS (optional)

If provided, focus on specific subsystems (e.g., "sensor pipeline", "ML models", "alert thresholds", "scheduling"). If not provided, perform a full analysis.

============================================================

PHASE 1: STACK DETECTION & SYSTEM INVENTORY

============================================================

  1. Identify the tech stack:

build.gradle, CMakeLists.txt, or equivalent.

ONNX, XGBoost), time-series databases (InfluxDB, TimescaleDB, QuestDB),

message brokers (Kafka, MQTT, RabbitMQ, AMQP), and OPC-UA/Modbus libraries.

  1. Map the predictive maintenance architecture:
  1. Build the asset/equipment inventory from code:

| Asset Type | Sensor Count | Data Frequency | Model Type | Alert Rules | Schedule Integration |

|-----------|-------------|----------------|-----------|------------|---------------------|

============================================================

PHASE 2: SENSOR DATA PIPELINE ANALYSIS

============================================================

DATA INGESTION:

DATA QUALITY:

DATA STORAGE:

EDGE PROCESSING:

Score each area: Complete / Partial / Missing / N/A.

============================================================

PHASE 3: ML MODEL LIFECYCLE ANALYSIS

============================================================

MODEL DEVELOPMENT:

remaining useful life prediction, degradation modeling).

MODEL TRAINING PIPELINE:

MODEL VERSIONING:

hyperparameters, performance metrics).

MODEL SERVING:

MODEL MONITORING:

============================================================

PHASE 4: RELIABILITY METRICS ANALYSIS

============================================================

MTBF / MTTF / MTTR CALCULATIONS:

WEIBULL / SURVIVAL ANALYSIS:

REMAINING USEFUL LIFE (RUL):

HEALTH INDEX:

============================================================

PHASE 5: ALERT THRESHOLD ANALYSIS

============================================================

THRESHOLD CONFIGURATION:

| Alert | Parameter | Threshold | Type | Configurable | Adaptive | Multi-Severity |

|-------|----------|-----------|------|-------------|----------|---------------|

ALERT LOGIC:

ALERT ROUTING:

FALSE POSITIVE MANAGEMENT:

============================================================

PHASE 6: MAINTENANCE SCHEDULING ANALYSIS

============================================================

WORK ORDER GENERATION:

estimated duration, required parts.

SCHEDULING OPTIMIZATION:

part availability, regulatory requirements.

FEEDBACK LOOP:

============================================================

PHASE 7: SPARE PARTS INVENTORY INTEGRATION

============================================================

PARTS PREDICTION:

INVENTORY INTEGRATION:

CMMS/ERP INTEGRATION:

============================================================

PHASE 8: SECURITY & OPERATIONAL SAFETY

============================================================

OT/IT SECURITY:

SAFETY CONSIDERATIONS:

============================================================

SELF-HEALING VALIDATION (max 2 iterations)

============================================================

After producing output, validate data quality and completeness:

  1. Verify all output sections have substantive content (not just headers).
  2. Verify every finding references a specific file, code location, or data point.
  3. Verify recommendations are actionable and evidence-based.
  4. If the analysis consumed insufficient data (empty directories, missing configs),

note data gaps and attempt alternative discovery methods.

IF VALIDATION FAILS:

IF STILL INCOMPLETE after 2 iterations:

============================================================

OUTPUT

============================================================

Predictive Maintenance Analysis Report

Stack: {detected stack}

Architecture: {edge/cloud/hybrid}

Assets Monitored: {count} types, {count} sensor signals

Overall PdM Maturity Score: {score}/100

Maturity Level: {Level 1-5}

Subsystem Scores

| Subsystem | Score | Status |

|-----------|-------|--------|

| Sensor Data Pipeline | {score}/100 | {status} |

| Data Quality & Validation | {score}/100 | {status} |

| ML Model Lifecycle | {score}/100 | {status} |

| Reliability Metrics (MTBF/MTTF) | {score}/100 | {status} |

| Alert Thresholds & Routing | {score}/100 | {status} |

| Maintenance Scheduling | {score}/100 | {status} |

| Spare Parts Integration | {score}/100 | {status} |

| Security & Safety | {score}/100 | {status} |

Critical Findings

  1. {PDM-001}: {title} -- Severity: {Critical/High/Medium/Low}

ML Model Inventory

| Model | Algorithm | Input Features | Target | Evaluation Metric | Versioned | Monitored |

|-------|----------|---------------|--------|-------------------|-----------|-----------|

| {name} | {type} | {count} | {target} | {metric: value} | {yes/no} | {yes/no} |

Alert Configuration Summary

| Alert Category | Count | Configurable | Adaptive | Has Hysteresis | Escalation Path |

|---------------|-------|-------------|----------|---------------|----------------|

| {category} | {n} | {yes/no} | {yes/no} | {yes/no} | {yes/no} |

Recommendations (ranked by impact on uptime)

  1. {recommendation} -- impact: {description}, effort: {S/M/L}
  2. ...
  3. ...

DO NOT:

NEXT STEPS:

============================================================

SELF-EVOLUTION TELEMETRY

============================================================

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

Entry format:

### /predictive-maintenance — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.

Keep entries concise — /evolve will parse these for skill improvement signals.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.