matlab/manage-safety-analysis
Create, populate, and manage safety analysis spreadsheets (FMEA, FHA, HARA, custom) and fault trees (FTA) in Safety Analysis Manager. Use when the user asks to perform FMEA, hazard analysis, fault tree analysis, safety analysis, or work with Safety Analysis Manager documents. Requires Simulink Fault Analyzer.
npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill manage-safety-analysis
Use evaluate_matlab_code with the safetyAnalysisMgr package to create, populate, query, and export safety analysis documents. Requires Simulink Fault Analyzer (R2023b+).
> Version enforcement: APIs are annotated with the MATLAB release they were introduced. Do NOT use an API unless the user's MATLAB release is equal to or newer than the annotated version. If the user's release is unknown, assume R2023b and restrict to R2023b APIs only until confirmed. Check the reference files for per-API version annotations.
Safety Analysis Manager supports two document formats:
references/spreadsheet-api.md and references/common-api.mdreferences/tree-api.md and references/common-api.md.mldatx documentsreferences/common-api.mdbuilding-simulink-modelssimulating-simulink-models or testing-simulink-modelsinject-faultsgenerate-requirement-draftsmodel_overview to inspect the model structure first. Use model_read for deeper subsystem details. Identify subsystems, signal paths, feedback loops, sensors, and actuators. These become FMEA rows or hazard entries.safetyAnalysisMgr.openManager so the user can see results..mldatx when the user confirms the content..mldatx and open the manager for visual inspection.safetyAnalysisMgr.openDocument to load the .mldatx file.addFlag to mark problematic elements for user review.evaluate_matlab_code with project_path set to the skill's scripts/ folder so MATLAB can find helper scripts (e.g., fileType). Never use addpath..mldatx files with fileType(filePath) before opening — the extension is shared with other tools. Only proceed if it returns "document" or "template"; if it throws, the file is not a Safety Analysis Manager document.model_overview or model_read before writing failure modes — ground the analysis in actual structure. When working from requirements alone, derive failure modes from the requirements text instead.safetyAnalysisMgr.openManager as the final step after creating, modifying, or reviewing a document — never skip this. The user cannot see results until the manager is open.close(doc, Force=true) or safetyAnalysisMgr.closeAllDocuments(Force=true) without asking — this discards unsaved work.mldatx fileaddFlag) that mark elements as errors or warnings> Review this safety analysis spreadsheet for:
> - Rows with empty detection methods, severity, or occurrence ratings
> - Failure modes that don't trace back to a model element or requirement
> - Duplicate or near-duplicate entries (same failure mode, different wording)
> - Column values that are inconsistent with each other (e.g., high severity + no detection + low RPN)
> - Missing common failure modes for the system type (sensors without bias/drift, actuators without stuck)
> Review this fault tree for:
> - Basic events without assigned failure models or with placeholder probabilities
> - Cut sets containing a single basic event (indicates missing redundancy or analysis gap)
> - Common-cause failures not modeled (shared power supply, shared sensor, common software)
> - Gates with only one input (redundant gate — simplify)
> - Circular or illogical decomposition (effect listed as its own cause)
> Verify the review findings for:
> - False positives (flagged items that are actually correct in context)
> - Missed issues in rows/nodes that were not inspected
> - Consistency of flag severity (errors vs warnings vs checks)
references/spreadsheet-api.mdreferences/tree-api.mdreferences/common-api.md----
Copyright 2026 The MathWorks, Inc.
----
Take matlab/manage-safety-analysis from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.