Verifies Simulink model compatibility with SLCI code inspection by checking configuration and structure. Identifies incompatibilities, explains constraints, and applies fixes to a copy of the model.
Ships in code-generation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Determine whether a Simulink model's configuration and structure meet the requirements for SLCI (Simulink Code Inspector) code inspection.
checkCompatibility or analyze compatibility resultsslci-inspection-incompatibility-analysis to apply fixes or obtain compatibility resultsc.inspect()) and needs to trace
failures to root causes — use slci-inspection-incompatibility-analysis insteadBoundary note: This skill covers the pre-inspection compatibility check
(checkCompatibility). The slci-inspection-incompatibility-analysis skill covers
post-inspection failure analysis (inspect results) and delegates back to this
skill for applying fixes and obtaining compatibility results. If a user simply asks
"is my model ready for SLCI?", use this skill.
<model_name>_fixed.slx first.
Also copy any associated data dictionary (.sldd) or .mat files if fixes
require modifying them. All fixes are applied to the copy only.
After copying, run fileattrib('<copy>', '+w') to ensure the copy is writable.SLCI verifies structural equivalence between a Simulink model and its generated C code — proving that every signal path, computation, and data flow in the model has a corresponding construct in the code. The compatibility checker identifies model configurations and patterns that would make this verification impossible or unreliable.
For severity levels (FATAL vs. Nonfatal), the full constraint categories table (mapping check titles to reference files), and error recovery procedures, see incompatibility-guide.md. For per-block parameter constraints indexed by block type, see block_support_constraints.md.
slci.Configuration APIc = slci.Configuration('<model_name>');
results = c.checkCompatibility();
Prefer this API over parsing the HTML report — it returns structured results.
checkCompatibility() returns a cell array of ModelAdvisor.SystemResult objects:
results = c.checkCompatibility();
% Strip HTML tags/entities from Description and RecAction text
stripHtml = @(s) strtrim(regexprep(regexprep(char(s), '<[^>]*>', ''), ...
{'>', '<', '&'}, {'>', '<', '&'}));
% Iterate over individual check results
for i = 1:numel(results{1}.CheckResults)
cr = results{1}.CheckResults(i);
if ~strcmp(cr.Status, 'Passed')
fprintf('CHECK: %s\n Status: %s\n', cr.CheckName, cr.Status);
rd = cr.getResultDetails; % struct array: one entry per issue
for k = 1:numel(rd)
fprintf(' - %s\n Fix: %s\n', stripHtml(rd(k).Description), ...
stripHtml(rd(k).RecAction));
end
end
end
If the System target file check fails, fix it first and re-run — many other checks report it as their fix until it is resolved.
Result object properties:
| Property | Type | Description |
|---|---|---|
System | char | Model/system name checked |
Summary | struct | Pass/warn/fail counts |
CheckResults | array | Individual check results (CheckName, Status, getResultDetails().Description) |
VersionInfo | struct | MATLAB/Simulink version info |
Each CheckResults entry has:
CheckName — check name (maps to constraint category)Status — 'Passed', 'Warning', 'Failed', etc. (anything other than
'Passed' needs attention)getResultDetails() — struct array, one entry per issue, with
Description (what is checked) and RecAction (recommended fix)c.fixIncompatibilities();
Scope: This fixes configuration parameter settings only (e.g., setting
TargetLang to 'C', enabling required diagnostics). It does NOT fix:
SystemTargetFile — even though an incorrect value (e.g., grt.tlc) is a FATAL
incompatibility, fixIncompatibilities() will not change it. Set it before
calling fixIncompatibilities():
set_param('<model>', 'SystemTargetFile', 'ert.tlc');
When safe: Call it for batch config-param fixes when you've reviewed the list and
confirmed all flagged items are parameter settings. When unsafe: If FATAL
structural issues exist, fix those manually first — fixIncompatibilities may mask
the real problem by changing settings without addressing the underlying design issue.
Important: fixIncompatibilities() modifies the model in place — see
Guardrails.
fixIncompatibilities()fixIncompatibilities() only resolves configuration parameter issues. After running
it, re-run checkCompatibility() and check for remaining non-passing checks. For any issues
that fixIncompatibilities() did not resolve:
SF prefix and Diag suffix like
SFTransitionOutsideNaturalParentDiag that the check title omits).checkCompatibility() after applying manual fixes to confirm they
resolved the issues.Always produce a change report when fixing incompatibilities so the user knows exactly what was modified. The report compares the before and after states:
| Parameter | Previous Value | New Value | Constraint Category |
|---|---|---|---|
TargetLang | 'C++' | 'C' | Code Generation |
SolverType | 'Variable-step' | 'Fixed-step' | Solver |
Include:
Save the change report as <model_name>_fix_report_YYYY-MM-DD.md in the model
directory.
checkCompatibility on a top model does NOT automatically check referenced models.
For models with model references:
model_overview to discover the model
reference hierarchy and store the referenced model names in a cell array
refs (excluding the top model). If model_overview is unavailable, fall
back to:
refs = find_mdlrefs('<top_model>');
refs = refs(1:end-1); % Top model is last; it is already checked
allResults = struct('model', {}, 'results', {});
for i = 1:numel(refs)
c = slci.Configuration(refs{i});
allResults(end+1) = struct('model', refs{i}, ...
'results', {c.checkCompatibility()}); %#ok<AGROW>
end
DefaultParameterBehavior at the reference boundary affects how parameters
are resolved — 'Inlined' is required for SLCI traceabilityUse the programmatic API above. If no MCP connection exists, run MATLAB in batch mode with a 600-second timeout. For large models, run the check as a background task to avoid blocking.
Important: If reusing an existing report at
slprj/modeladvisor/<model>/report.html, verify the report is not stale — compare
the report timestamp against the model's last-modified time. If the model is newer,
re-run the check.
For each non-passing check:
fixIncompatibilities() can resolve it (config param) or
whether manual model changes are needed (structural)Provide the user with:
fixIncompatibilities() and those
requiring manual interventionScale the detail level to what the user asked for. A quick "is it ready?" gets the summary. A "why is X failing?" gets the full constraint explanation.
If the user requests fixes (or agrees to apply them), follow the Fixing Incompatibilities and Handling Remaining Issues procedures above.
Bulk-set model-root config parameters upfront per fixing-incompatibilities.md to minimize round-trips.
If any warnings or failures are found, always save results to a markdown file in the
model directory (<model_name>_compatibility_results_YYYY-MM-DD.md). Include the
model name, date, results table, and remediation guidance. If all checks pass, no
file is needed — just inform the user.
When asked to explain a specific constraint, read the relevant reference file and present:
For constraints where the failure mode is non-obvious (multi-rate data races, constant folding across blocks, hidden auto-inserted blocks), include a code example showing the problematic generated code pattern. See references/explain-constraint.md for an example of this deeper treatment.
For simple config-param constraints (e.g., TargetLang must be C), a one-line
explanation and fix command is sufficient — don't force unnecessary detail.
See incompatibility-guide.md for the full error recovery table.
Copyright 2026 The MathWorks, Inc.
manifest.yaml (opens in a new tab)references/block_constraints_data_operations.md (opens in a new tab)references/block_constraints_discontinuities.md (opens in a new tab)references/block_constraints_discrete.md (opens in a new tab)references/block_constraints_logic_bits.md (opens in a new tab)references/block_constraints_math_operations.md (opens in a new tab)references/block_constraints_misc.md (opens in a new tab)references/block_constraints_ports_subsystems.md (opens in a new tab)references/block_constraints_signal_routing.md (opens in a new tab)references/block_constraints_sources_sinks.md (opens in a new tab)references/block_constraints_string.md (opens in a new tab)references/block_constraints_tables_functions.md (opens in a new tab)references/block_constraints_universal.md (opens in a new tab)references/block_support_constraints.md (opens in a new tab)references/code_generation_constraints.md (opens in a new tab)references/code_inspection_limitations.md (opens in a new tab)references/code_replacement_libraries_constraints.md (opens in a new tab)references/data_import_export_constraints.md (opens in a new tab)references/diagnostics_constraints.md (opens in a new tab)references/explain-constraint.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
simulink, slci, code-inspection, model-compatibility, mathworks
/code-generation:slci-compatibility-analysisfrom code-generation
npx claudepluginhub matlab/simulink-agentic-toolkit --plugin code-generation8 skills in this plugin
/simulink-author-classic-autosar-swcUse this skill when authoring, reworking, or validating a Classic AUTOSAR software component (SWC) in Simulink, including autosar.api mappings, runnables, timing events, sender-receiver ports, client-server operations, IRVs, BSW service callers, and component ARXML updates.
/simulink-configure-code-interfacesUse the skill to control and verify the code interface configuration of your model — how Simulink® model elements are represented in the generated C or C++ code. This includes — (1) specifying names, types (storage classes), and placement of variables that represent model elements (for example, making a model parameter tunable as a global extern variable); (2) specifying names, types, and placement of functions that represent model algorithms; (3) selecting the deployment type (Component, Subcomponent, or Automatic); (4) selecting the interface configuration type (data or service interface); (5) linking a shared Embedded Coder dictionary to a model; (6) creating Embedded Coder dictionary entries and setting their properties; (7) for service interface configuration — specifying service interface definitions, including sender, receiver, client, and server services. Items 1 and 2 can be set per element or as a category-wide default. Item 1 applies to GRT and ERT models; the rest to ERT models only.Other plugins' skills for the same job