
slci-compatibility-analysis
Use when you need to verify a Simulink model is compatible with SLCI code inspection, or to apply fixes for identified incompatibilities. Checks model configuration, identifies incompatibilities, and explains why each constraint is required for verification. Also invoked by slci-inspection-incompatibility-analysis to fix constraints and obtain compatibility results. Trigger keywords: checkCompatibility, SLCI compatibility, code inspection readiness, Model Advisor compatibility report.
- Installs
- 0
- 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 slci-compatibility-analysis- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads slci-compatibility-analysis automatically when relevant.
- 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.
SLCI Compatibility Analysis
Determine whether a Simulink model's configuration and structure meet the requirements for SLCI (Simulink Code Inspector) code inspection.
When to Use
- User asks to check model compatibility for SLCI / Simulink Code Inspector
- User asks to run
checkCompatibilityor analyze compatibility results - User wants to know why a model is incompatible with code inspection
- User wants to understand what must be fixed before inspection can succeed
- Delegated from
slci-inspection-incompatibility-analysisto apply fixes or obtain compatibility results
When NOT to Use
- User already has inspection results (from
c.inspect()) and needs to trace failures to root causes — useslci-inspection-incompatibility-analysisinstead - User wants general Simulink model building or testing — use the core MBD skills
Boundary 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.
Guardrails
- Never modify the original model. Copy to
<model_name>_fixed.slxfirst. Also copy any associated data dictionary (.sldd) or.matfiles if fixes require modifying them. All fixes are applied to the copy only. After copying, runfileattrib('<copy>', '+w')to ensure the copy is writable. - Always produce a Post-Fix Change Report after fixes are applied, so the user knows exactly what was changed.
Domain Model: What SLCI Compatibility Means
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.
The slci.Configuration API
Running the Check
c = slci.Configuration('<model_name>');
results = c.checkCompatibility();
Prefer this API over parsing the HTML report — it returns structured results.
Querying Results Programmatically
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, withDescription(what is checked) andRecAction(recommended fix)
Fixing Incompatibilities
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 callingfixIncompatibilities():set_param('<model>', 'SystemTargetFile', 'ert.tlc');- Structural issues (unsupported blocks, multi-rate enable signal crossings)
- Block-level parameter violations (data type mismatches, rounding modes)
- Model architecture problems (model reference parameter behavior)
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.
Handling Remaining Issues After 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:
- Map the failing check to its reference file using the Check Title Keywords column in incompatibility-guide.md.
- Follow the suggested fix from the reference file. Each constraint entry
documents the required value or model change needed. Always use the exact
parameter name from the reference file — check titles may differ from parameter
names (e.g., Stateflow diagnostics use an
SFprefix andDiagsuffix likeSFTransitionOutsideNaturalParentDiagthat the check title omits). - Apply fixes. See fixing-incompatibilities.md for the bulk-set procedure for code generation parameters.
- Re-run
checkCompatibility()after applying manual fixes to confirm they resolved the issues.
Post-Fix Change Report
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:
- Count of issues fixed vs. issues remaining
- Whether the model is now ready for inspection or still has outstanding issues
Save the change report as <model_name>_fix_report_YYYY-MM-DD.md in the model
directory.
Model Reference Hierarchies
checkCompatibility on a top model does NOT automatically check referenced models.
For models with model references:
- Identify referenced models: Use
model_overviewto discover the model reference hierarchy and store the referenced model names in a cell arrayrefs(excluding the top model). Ifmodel_overviewis unavailable, fall back to:refs = find_mdlrefs('<top_model>'); refs = refs(1:end-1); % Top model is last; it is already checked - Check each referenced model individually and keep every result:
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 - Aggregation considerations:
- Each referenced model must independently pass compatibility
DefaultParameterBehaviorat the reference boundary affects how parameters are resolved —'Inlined'is required for SLCI traceability- Protected model references cannot be inspected (SLCI cannot see inside them)
Workflow
1. Run the Compatibility Check
Use 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.
2. Interpret Results
For each non-passing check:
- Identify the constraint category from the check title
- Look up the constraint in the appropriate reference file
- Note its severity (FATAL vs. Nonfatal) from the reference file
- Determine whether
fixIncompatibilities()can resolve it (config param) or whether manual model changes are needed (structural)
3. Present Results
Provide the user with:
- A summary: counts of passed and non-passing checks, and of FATAL and Nonfatal issues
- Category breakdown (e.g., "3 Code Generation, 2 Solver, 1 Structural")
- For each incompatibility: the parameter name, current vs. required value, and why SLCI needs it (from reference files)
- A clear distinction between issues fixable by
fixIncompatibilities()and those requiring manual intervention
Scale 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.
4. Fix and Report Changes
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.
5. Save Results
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.
Explaining Individual Constraints
When asked to explain a specific constraint, read the relevant reference file and present:
- What SLCI requires — the parameter/setting and its required value
- Why — what breaks in structural equivalence verification if violated
- Fix — the parameter value or model change needed
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.
Error Recovery
See incompatibility-guide.md for the full error recovery table.
Copyright 2026 The MathWorks, Inc.
FAQ
What does the slci-compatibility-analysis skill do?
Use when you need to verify a Simulink model is compatible with SLCI code inspection, or to apply fixes for identified incompatibilities. Checks model configuration, identifies incompatibilities, and explains why each constraint is required for verification. Also invoked by slci-inspection-incompatibility-analysis to fix constraints and obtain compatibility results. Trigger keywords: checkCompatibility, SLCI compatibility, code inspection readiness, Model Advisor compatibility report.
How do I install slci-compatibility-analysis?
Run npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill slci-compatibility-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/slci-compatibility-analysis/ (personal) or .claude/skills/slci-compatibility-analysis/ (project).
Which AI agents can use slci-compatibility-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 slci-compatibility-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 slci-compatibility-analysis?
It is published by matlab in matlab/simulink-agentic-toolkit. It has 0 recorded installs.
More from matlab/simulink-agentic-toolkit
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.
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.
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.
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.
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.
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.
Popular ai & agents skills
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).
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).
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.
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.
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.
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