# Resolve Design Errors

Use when asked to run Design Error Detection (quick defect scan), find design errors in...

- Repository: https://github.com/matlab/simulink-agentic-toolkit (1305 stars)
- Category: Design
- License: see repository
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add matlab/simulink-agentic-toolkit --skill resolve-design-errors -g -a claude-code -y`
Codex: `npx skills add matlab/simulink-agentic-toolkit --skill resolve-design-errors -g -a codex -y`
Cursor: `npx skills add matlab/simulink-agentic-toolkit --skill resolve-design-errors -g -a cursor -y`
Gemini CLI: `npx skills add matlab/simulink-agentic-toolkit --skill resolve-design-errors -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add matlab/simulink-agentic-toolkit`

## Description

Use when asked to run Design Error Detection (quick defect scan), find design errors in a Simulink model, perform root cause analysis on DED findings, fix division-by-zero, overflow, dead logic or out-of-bounds defects detected by SLDV, or diagnose why missing coverage cannot be achieved (dead logic blocking coverage objectives). Do NOT use for requirement verification, test generation, Inf/NaN detection, active logic analysis, or coverage measurement.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Detecting Design Errors (SLDV DED + Root Cause Analysis)

## When to Use

- User asks to **check a Simulink model for design errors** (division-by-zero, overflow, dead logic, out-of-bounds)
- User asks to **find root causes** of DED findings
- User asks to **fix** or **understand** an analysis finding
- User asks **why there is missing coverage** due to dead logic (dead logic gates prevent coverage objectives from being satisfied)
- User has SLDV artifacts (`.mat` file) and wants analysis without re-running DED

## When NOT to Use

- **Requirement verification**, checking if a model satisfies a requirement
- **Test generation or test authoring**, creating test cases from requirements or for coverage
- **Comprehensive verification**, this skill is a quick defect scan, not an exhaustive proof; a clean result does not guarantee the model is free of all errors
- **Coverage measurement**, this skill does not measure or report model coverage; use Simulink Coverage tools

## Safety Rules

1. **Never patch the original model directly.** Always clone first before applying any fix.
2. **NEVER apply fixes without explicit user approval.** After root cause analysis, present findings and *suggest* a fix strategy, then STOP and wait for the user to say "yes, apply it" or "go ahead." Even if the user's prompt says "suggest a fix" or "fix it," you must present the plan first and wait for confirmation. Do NOT create clone models, set parameters, or run verification until the user explicitly approves.
3. **SLDV results are always sound.** Never assume SLDV returns false positives. If SLDV reports a defect, it is a real defect, treat every finding as a true positive and investigate accordingly.

**Requires:** MATLAB R2023b+, Simulink Design Verifier, Simulink Check / Model Slicer.

## Prerequisites

All script functions live in the skill's `scripts/` directory. Use `evaluate_matlab_code` with `project_path` set to that folder so MATLAB can find them.

---

## Workflow

The rest: https://github.com/matlab/simulink-agentic-toolkit/blob/HEAD/skills-catalog/verification-validation-and-test/resolve-design-errors/SKILL.md
