MCPInstall
matlab avatar

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.

Installs
46
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill manage-safety-analysis
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads manage-safety-analysis automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Safety Analysis Manager

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:

  • Spreadsheets — tabular, row-based analysis (FMEA, FHA, HARA, HAZOP, custom)
  • Trees — hierarchical, node-based analysis (Fault Tree Analysis, Attack Trees)

When to Use

Spreadsheet-based analysis

  • Creating FMEA, FHA, HARA, HAZOP, or custom tabular documents
  • Populating spreadsheets with failure modes, effects, and risk ratings
  • Reviewing existing spreadsheets for consistency, completeness, and correctness
  • Editing, searching, or flagging items in an existing spreadsheet
  • Adding derived columns, callbacks, or custom logic to a spreadsheet
  • Exporting spreadsheet results to Excel
  • -> read references/spreadsheet-api.md and references/common-api.md

Tree-based analysis (R2026b+)

  • Creating Fault Tree Analysis (FTA) documents
  • Building fault trees with gates (AND/OR), basic events, and intermediate events
  • Computing minimal cut sets and top-event probability
  • Importance analysis and quantitative assessment
  • -> read references/tree-api.md and references/common-api.md

Common operations (both formats)

  • Opening, saving, closing .mldatx documents
  • Adding callbacks (AnalyzeFcn, PreSaveFcn, custom)
  • Flagging elements for review (error, warning, check)
  • Detecting changes in linked artifacts
  • Creating traceability links to model blocks or requirements
  • Document attributes and metadata
  • -> read references/common-api.md

When NOT to Use

  • Building or editing Simulink model structure -> use building-simulink-models
  • Running simulations or tests -> use simulating-simulink-models or testing-simulink-models
  • Fault injection and simulation-based fault analysis -> use inject-faults
  • Requirements traceability only -> use generate-requirement-drafts

Workflow

Creating a New Spreadsheet (FMEA/FHA/HARA)

  1. Understand the source. Either:
    • From a model: Always use model_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.
    • From requirements: Read the requirements (via Requirements Toolbox or user-provided text) and derive functional elements, failure modes, and hazards from the specified system behavior.
  2. Choose a document structure. Design columns appropriate for the specific system and analysis type. Use a built-in template only if the user explicitly requests one.
  3. Create and populate. Build the spreadsheet programmatically using the API.
  4. Open the manager. Call safetyAnalysisMgr.openManager so the user can see results.
  5. Save. Always save to .mldatx when the user confirms the content.

Creating a Fault Tree (R2026b+)

  1. Identify the top event. The undesired system-level failure (e.g., "Loss of Aircraft Control").
  2. Decompose with gates. Use OR gates for single-point failures, AND gates for redundant systems.
  3. Add basic events. Leaf nodes representing individual component failures or human errors.
  4. Set probabilities. Assign failure probabilities to basic events from reliability data or engineering estimates.
  5. Analyze. Compute minimal cut sets and top-event probability.
  6. Save and review. Save to .mldatx and open the manager for visual inspection.

Reviewing an Existing Document

  1. Open the document. Use safetyAnalysisMgr.openDocument to load the .mldatx file.
  2. Read and analyze content. For spreadsheets, iterate over rows; for trees, traverse nodes. Check for:
    • Grammar and spelling issues in text
    • Inconsistencies between data and the model or requirements
    • Duplicate entries or near-duplicate failure modes
    • Missing information (empty cells, events without probabilities)
    • Calculations that don't match their inputs
  3. Flag issues. Use addFlag to mark problematic elements for user review.
  4. Report findings. Summarize issues found and suggest corrections.

FMEA Generation Conventions

  • One row per failure mode, not per block — a single block can have multiple failure modes.
  • Map model structure to functions: subsystems → functional groups; individual blocks → functions within those groups.
  • Use requirement IDs in the Subsystem/Function column when working from requirements (no model).
  • Detection methods must reference observable signals (model-based) or testable acceptance criteria (requirements-based).
  • Flag entries for review once a model becomes available — model-based analysis may reveal additional failure modes not apparent from requirements alone.

Guardrails

Always

  • Use 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.
  • Verify .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.
  • When a model is available, read it with 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.
  • Always call 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.
  • Remind the user to save (or save programmatically with confirmation) — new documents have no file until explicitly saved

Never

  • Use close(doc, Force=true) or safetyAnalysisMgr.closeAllDocuments(Force=true) without asking — this discards unsaved work
  • Delete rows, columns, or nodes from an existing document without user confirmation

Ask First

  • Before overwriting an existing .mldatx file
  • Before adding flags (addFlag) that mark elements as errors or warnings
  • Before deleting rows, columns, or nodes from an existing document

Review Gates

After Creating/Populating a Spreadsheet

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)

After Creating a Fault Tree (R2026b+)

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)

After Reviewing an Existing Document

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)

Domain-Specific References

  • Spreadsheet operations (rows, columns, cells, formulas, search) -> references/spreadsheet-api.md
  • Tree operations (nodes, gates, cut sets, quantitative analysis) -> references/tree-api.md
  • Common operations (save, callbacks, flags, links, change detection) -> references/common-api.md

Copyright 2026 The MathWorks, Inc.


FAQ

What does the manage-safety-analysis skill do?

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.

How do I install manage-safety-analysis?

Run npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill manage-safety-analysis in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/manage-safety-analysis/ (personal) or .claude/skills/manage-safety-analysis/ (project).

Which AI agents can use manage-safety-analysis?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is manage-safety-analysis safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains manage-safety-analysis?

It is published by matlab in matlab/simulink-agentic-toolkit. It has 46 recorded installs.

More from matlab/simulink-agentic-toolkit

View all →
matlab avatar

building-simulink-models

matlab/simulink-agentic-toolkit

Builds and edits Simulink, System Composer, Stateflow, and Simscape models. Use when modifying model structure, parameters, ports, connections, or Stateflow chart internals.

AI & Agents187 installs
matlab avatar

simulating-simulink-models

matlab/simulink-agentic-toolkit

Configures Simulink simulations non-destructively using SimulationInput objects — parameter overrides without modifying the model, batch sweeps via parsim, custom input signals via Dataset, and simulation data retrieval via logsout. Use when running sim()/parsim() with setVariable, setBlockParameter, setExternalInput, or when performing parameter sweeps and multi-run analysis. Not needed for one-shot simulations without configuration.

Data & Databases157 installs
matlab avatar

testing-simulink-models

matlab/simulink-agentic-toolkit

Tests Simulink models using either ephemeral Gherkin-based tests (modeltest) for quick validation or persistent tests (Simulink Test API) authored from requirements or behavioral specs. Requires Simulink Test.

Testing & QA125 installs
matlab avatar

specifying-plant-models

matlab/simulink-agentic-toolkit

Specify plant models for closed-loop simulation: system specs, architecture, build plans, validation plans. Use when creating, updating, or reviewing plant model specifications, planning plant model architecture, or planning plant model validation.

matlab avatar

specifying-mbd-algorithms

matlab/simulink-agentic-toolkit

Specify algorithms for Model-Based Design: system specs, architecture specs, implementation plans, test plans. Use when creating specifications for controllers, signal processing, diagnostics, estimators, or other algorithms authored in Simulink, Stateflow, System Composer, or MATLAB Function blocks.

AI & Agents91 installs
matlab avatar

generate-requirement-drafts

matlab/simulink-agentic-toolkit

Generates draft requirements from Simulink models. Use when drafting or updating requirement artifacts from a model. Prefers Requirements Toolbox (.slreqx) when available; falls back to structured YAML.

AI & Agents81 installs

Popular ai & agents skills

View category →
google avatar

google-agents-cli-publish

google/agents-cli

This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).

AI & Agents588.9K installs
google avatar

google-agents-cli-eval

google/agents-cli

This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).

AI & Agents587.7K installs
anthropics avatar

skill-creator

anthropics/skills

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

OfficialAI & Agents439.9K installs
prime-skills avatar

codex-pet

prime-skills/runcomfy-agent-skills

Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.

AI & Agents413.4K installs
leonxlnx avatar

full-output-enforcement

leonxlnx/taste-skill

Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.

AI & Agents401.1K installs
obra avatar

executing-plans

obra/superpowers

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

AI & Agents270.5K installs