/predictive-maintenance:anomaly-detectionfrom predictive-maintenance
Trains and runs ML-based anomaly detection models (OneClassSVM, LocalOutlierFactor) on vibration signals using the predictive-maintenance-mcp server. Includes PCA visualization and baseline quality screening.
Ships in predictive-maintenance. 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.
Train and use machine learning models to detect anomalous vibration patterns. Supports OneClassSVM and LocalOutlierFactor novelty detection with PCA visualization. The models flag statistical outliers for the engineer to investigate — they supplement, and never replace, physics-based diagnosis.
Prerequisite: The predictive-maintenance-mcp MCP server must be connected.
Gather signals representing NORMAL machine operation. Check what is loaded
with list_signals(scope="memory"); browse files with
list_signals(scope="disk"). Load the training set in one atomic batch:
Call load_signal(filepath=["real_train/baseline_1.csv", "real_train/baseline_2.csv"], signal_unit="g")
The batch is fail-fast: if any file is missing or an id collides, ONE error
names the offending entries and nothing is loaded. For raw binary files
(.bin/.raw/.dat), also declare sample_format and sampling_rate
(broadcast to the whole batch), or provide companion <stem>_metadata.json
files — see the signal-management skill.
Ask the user:
"OneClassSVM" recommended for small datasets,
"LocalOutlierFactor" for larger ones)For each baseline signal, call analyze_statistics(signal_id="<id>").
Signals with very high kurtosis or crest factor may already contain damage
and should be excluded from the healthy baseline — confirm with the user.
Call train_anomaly_model(healthy_signal_ids=["real_train_baseline_1", "real_train_baseline_2"], model_type="OneClassSVM", model_name="pump_a_health")
Parameters:
"OneClassSVM" or "LocalOutlierFactor"The model, scaler, and PCA transformer are saved to the models/ directory.
Run predict_anomalies(signal_id="real_train_baseline_1", model_name="pump_a_health")
on a healthy signal. Most segments should be classified normal (low anomaly
ratio). If too many are flagged, review the baseline data with the user.
Call load_signal(filepath="<file>", signal_unit="g").
Call predict_anomalies(signal_id="<id>", model_name="pump_a_health").
The output is bounded (no per-segment arrays): segment counts, anomaly ratio, score percentiles, and up to 10 worst segments with their time positions. If the model name is wrong, the error lists the models actually on disk.
| Anomaly ratio | Classification | Action |
|---|---|---|
| Near 0 | Normal | No action needed |
| Moderate | Borderline | Monitor more frequently |
| High | Anomalous | Investigate with bearing-diagnosis or quick-screening |
An anomaly score is a statistical distance from the healthy baseline — it says "different", not "why". Always follow up with physics-based analysis (envelope, characteristic frequencies) before any maintenance decision.
Call generate_pca_visualization_report(model_name="pump_a_health", test_signal_ids=["<id>"], true_labels={"<id>": "<label>"})
to project the test segments into the model's PCA space. Healthy segments
cluster together; anomalies appear as outliers. The report segments each
signal with the model's training segment_duration and overlap_ratio:
pass them if they are not the defaults. true_labels is optional
annotation for the legend; take a label only from the user, never from a
file name or a signal id. The report accepts healthy, normal or baseline for
a healthy signal and faulty, fault, anomaly or anomalous for a faulty one.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub lgdimaggio/predictive-maintenance-mcp --plugin predictive-maintenance9 skills in this plugin
/bearing-diagnosisComplete bearing fault diagnostic workflow using vibration analysis and the predictive-maintenance-mcp server. Use this skill when the user says "diagnose bearing", "bearing fault", "bearing check", "detect bearing damage", "bearing vibration analysis", "inner race fault", "outer race fault", "ball defect", "cage fault", "BPFO", "BPFI", "BSF", "FTF", or asks to identify bearing problems from vibration data.
/documentation-searchSearch machine manuals, bearing catalogs, and technical documentation using RAG-based retrieval via the predictive-maintenance-mcp server. Use this skill when the user says "search documentation", "find in manual", "bearing catalog", "look up bearing", "machine manual", "extract specs", "find bearing specs", "SKF bearing", "technical documentation", "datasheet", "manual search", "what bearing", or needs to find technical information from stored documents.
/gear-diagnosisGear fault diagnosis workflow using vibration analysis via the predictive-maintenance-mcp server. Use this skill when the user says "gear fault", "gear diagnosis", "gear mesh", "gearbox analysis", "gear vibration", "tooth damage", "gear defect", "diagnose gear", "gear mesh frequency", "sideband analysis", or wants to detect gear faults from vibration signals.
Other plugins' skills for the same job