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.
npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill resolve-design-errors
.mat file) and wants analysis without re-running DEDRequires: MATLAB R2023b+, Simulink Design Verifier, Simulink Check / Model Slicer.
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.
This skill provides two functions that automate SLDV-driven analysis the agent otherwise gets
wrong when hand-rolling it, then hands you the facts to classify and fix findings. The workflow
is four steps:
1. Detect errors → sldv_run_defect_checker (use the function; don't hand-roll DED)
2. Root cause errors → sldv_find_de_root_cause (use the function; don't hand-roll slicing)
3. Classify errors → agent step (dead logic: intentional vs. design_error)
4. Fix errors → agent step (propose, get approval, clone-fix-verify)
Steps 1–2 are the two functions. Steps 3–4 are agent judgment based on their output. Full API
detail (return fields, options, caching, sub-functions) is in references/api-reference.md —
load it when you need exact fields or options.
Call sldv_run_defect_checker(model) instead of writing your own SLDV DED invocation or
parsing objectives by hand — it configures the analysis, runs DED, and auto-loads cached
*_sldvdata.mat results when available.
result = sldv_run_defect_checker("my_model", OutputDir="artifacts/ded")
If result.Status == "pass": STOP. Report "No design errors of the checked types were
detected" and end the workflow. Do NOT call sldv_find_de_root_cause or investigate further.
DED is a quick scan, not an exhaustive proof — tell the user no defects of the checked types
were found, not that the model is error-free.
Proceed to Step 2 only when result.Status == "fail".
Call sldv_find_de_root_cause(model, DedResult=result.DedResult) instead of hand-building
slices — it returns backward slices, counterexamples, locality (blast-radius) measures, and
shared-root cascade annotations for every finding.
rca = sldv_find_de_root_cause("my_model", DedResult=result.DedResult, OutputDir="artifacts/ded")
Then trace each finding to its root cause:
rca.SliceBlocks to find which block produces thedefect-triggering value
model_overview / model_read to understand each block's roleLocality blocks (narrow blast radius, safer) and high-FindingCount blocks(fix resolves more defects); check rca.Cascades — a shared-root fix resolves multiple
findings at once
When the slice is shallow (< 3 blocks) or stops at a Stateflow / MATLAB Function block:
the Model Slicer cannot trace through those constructs. Do NOT stop and report only what the
tool returned — fall back to model_read / model_overview to interpret the finding: read
the defect block and its upstream connections, read the Stateflow chart or MATLAB Function
logic the slice stopped at, and cross-reference counterexample values to see which branch is
active.
Classification happens after root cause analysis — you need to see the root cause (which
block, what value) before deciding whether dead logic is intentional.
Findings arrive pre-enriched. For every dead logic finding, sldv_find_de_root_cause
attaches on the finding struct:
finding.ModelContext — a model_read dump of the block's surrounding scope. You do notneed to call model_read again for this. (If empty — model_read was unavailable — fall back
to model_overview / model_read yourself for that block.)
finding.PatternCatalog — the entire dead-logic pattern library (catalog index + everypattern), concatenated. You do not need to open the YAML files yourself.
finding.Classification — "pending", awaiting your decision.How to classify. For each dead logic finding, using ModelContext and PatternCatalog:
PatternCatalog.complementary Stateflow guards) or is it a BUG (wrong parameter, cascading error)?
Set the classification:
"intentional" — defensive logic, enable-as-input, negation guard pairs → no fix needed;report to the user as expected behavior
"design_error" — wrong parameter, cascading dead logic, short-circuit → fix the root cause"unclassified" — unclear → ask the userOnly apply fixes for "design_error" findings.
The functions provide facts; you identify root causes and decide fixes — there is no hardcoded
defect-to-fix mapping.
When you are ready to propose or apply a fix, load and follow references/fix-strategy.md.
It covers root-cause identification, the clone-fix-verify procedure, fix principles, and the
blast-radius discussion required for every proposal.
Two rules that always apply (see Safety Rules): present findings and wait for explicit approval
before applying anything, and propose a fix for every design_error finding — 2–3 ranked
options each when possible — rather than stopping after only some.
| Mistake | Fix |
|---------|-----|
| Continuing after Status == "pass" | STOP. Zero falsified objectives = no defects. Do not call sldv_find_de_root_cause or investigate further. Report "no defects found" and end. |
| Calling sldv_find_de_root_cause without DedResult or DataFile | Pass one of the two — check result.DedResult from the checker |
| Running on an unsaved model | Save first; DED needs a file on disk |
| Applying fixes without presenting findings to user | Always show root cause analysis results first, get approval before fixing |
| Stopping at a shallow slice | Fall back to model_read / model_overview (Step 2) |
| Running on large models without OutputDir | Set OutputDir to avoid temp-dir clutter |
Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
Build and distribute Expo development clients locally or via TestFlight
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Take matlab/resolve-design-errors 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.