Borrowing it
Nothing to install: this file belongs to ScottDuncanAI/industrial-ai-troubleshooting-agent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ScottDuncanAI/industrial-ai-troubleshooting-agent/main/.claude/commands/mspc-analysis.mdgit clone --depth 1 https://github.com/ScottDuncanAI/industrial-ai-troubleshooting-agentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/scottduncanai/industrial-ai-troubleshooting-agent/mspc-analysis)<a href="https://agentmods.dev/commands/scottduncanai/industrial-ai-troubleshooting-agent/mspc-analysis"><img src="https://agentmods.dev/badge/commands/scottduncanai/industrial-ai-troubleshooting-agent/mspc-analysis/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/scottduncanai/industrial-ai-troubleshooting-agent/mspc-analysis"><img src="https://agentmods.dev/badge/commands/scottduncanai/industrial-ai-troubleshooting-agent/mspc-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00648 |
| Opus 5 | $0.00000 | $0.00324 |
| Sonnet 5 | $0.00000 | $0.00130 |
| Haiku 4.5 | $0.00000 | $0.00065 |
Grade A, and why
mspc-analysis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MSPC Analysis
Run Multivariate Statistical Process Control analysis on the boiler historian data using PCA-based monitoring with T-squared and SPE statistics.
Conventions
- Python: Always use the project's virtual-environment Python, never bare
python(which on macOS may not exist or may point at a dependency-free system Python). Written as<venv-python>below — substitute.venv/bin/pythonon macOS/Linux or.venv/Scripts/pythonon Windows. - Opening files: Use the command for the user's OS, written as
<open>below —openon macOS,xdg-openon Linux,starton Windows.
Steps
1. Run the analysis
Run the MSPC analysis script:
<venv-python> mspc_analysis.py
Capture the JSON output from stdout. The script prints progress to stderr and the JSON summary to stdout.
If the script fails, diagnose the error and report it to the user.
2. Open key plots and fault report
All outputs are saved to plots/MSPC/MSPC_<date>/. Open the monitoring chart, scree plot, and fault report for the user:
<open> <monitoring_plot_path>
<open> <scree_plot_path>
<open> <fault_report_path>
3. Present model summary
Report to the user:
- Number of PCA components retained and cumulative variance explained
- Training set size (NOC rows vs total rows)
- Control limits (T-squared and SPE at 95% and 99% confidence)
4. Present anomaly results
Report:
- Percentage of observations exceeding T-squared and SPE limits
- Number and timing of anomalous periods
- Duration of each anomalous period
5. Investigate worst events
For each of the top 3 worst T-squared events from the JSON output:
- Open the contribution plot:
<open> <contribution_plot_path> - Call
alarm_search_contextat that timestamp to get alarm context - Call
kg_get_upstream_sensorson the top contributing tag to trace process causality - Summarize: what tags drove the anomaly, what alarms were active, what equipment is upstream
Do the same for the top 3 worst SPE events (skip any that overlap with T-squared worst events).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 73 lines · 0 tokens per session scan A f5870a2fcad6
mspc-analysis is a command published in the GitHub repository ScottDuncanAI/industrial-ai-troubleshooting-agent (59 stars, last pushed 1mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 648 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
verify-math
Verify a self-authored mathematical result end to end by routing claims across adversarial review, numerical falsification, symbolic or CAS checks, and Lean, then aggregating one report. Use when a theorem, proposition, conjecture, or paper-wide mathematical argument needs the appropriate combination of verification…
replication-package
Scaffold or audit a social-science replication package at a target directory, and audit the manuscript and its archived research objects against FAIR principles.
diff
Quantitative volume comparison between a CadQuery model and a reference STEP file.
simulation-calibrator
Test and refine simulation accuracy with validation loops, bias detection, and continuous improvement frameworks.
arg-diagram
ARG academic-paper diagram mode — standalone structural & conceptual diagram generation.
graphite-morphology-classify
Classify graphite in a cast-iron micrograph per ASTM A247 / ISO 945-1, quantify nodularity, and read the matrix — the single most diagnostic observation in a cast-iron case.