Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use this skill when the user asks to check Simulink model compliance against a standard (MISRA, MAB, JMAAB, ISO 26262, ISO 25119, DO-178C, DO-254, IEC 61508, IEC 62304, EN 50128, CERT C/CWE, AUTOSAR), wants to run Model Advisor checks, or needs a compliance report with fix suggestions. For JMAAB/MAB, supplement deterministic checks with agentic review of uncheckable guidelines.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 61% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 126% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 89% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 315% | 0% |
Runs Model Advisor checks for a named standard (or default configuration) and delivers a prioritized summary with fix suggestions.
building-simulink-modelstesting-simulink-modelsmodel_check tool directly| Standard | Accepted Inputs | |----------|----------------| | MISRA C:2023 | MISRA_C, MISRA C, MISRA | | MISRA Simulink/Stateflow | MISRA_SLSF, MISRA Simulink | | MAB | MAB, MAAB | | JMAAB v5.1 | JMAAB | | JMAAB v6 | JMAAB_V6, JMAAB06 | | ISO 26262 | ISO_26262, ISO 26262 | | ISO 25119 | ISO_25119, ISO 25119 | | DO-178C/DO-331 | DO_178C, DO-178C, DO-178B, DO-331 | | DO-254 | DO_254, DO-254 | | IEC 61508 | IEC_61508, IEC 61508 | | IEC 62304 | IEC_62304, IEC 62304 | | EN 50128/EN 50657 | EN_50128, EN 50128, EN_50657 | | Secure Coding (CERT C, CWE) | SECURITY, CERT_C, CWE, secure coding | | AUTOSAR | AUTOSAR |
Equivalent check sets (run once, report for both):
Users may have custom Model Advisor checks or custom configuration files (.json exported from Model Advisor Configuration Editor). These are not standards — they are handled via:
model_advisor_run with 'configuration' parameter directly (Path B)model_advisor_run with 'checks' parameter directly (skip resolution)All script functions are in the skill's scripts/ directory. Use evaluate_matlab_code with project_path set to the skill's scripts/ folder so MATLAB can find them. Never use addpath.
Tools provided (always use these — never improvise with raw Model Advisor API):
| Function | Inputs | Output | Example | |----------|--------|--------|---------| | model_advisor_resolve_checks | 'standard', '<NAME>' | struct with checks, checks_count, status | model_advisor_resolve_checks('standard', 'JMAAB') | | model_advisor_run | system, 'checks', {ids} or system, 'configuration', path | YAML with findings, status, check_summary | model_advisor_run('MyModel', 'checks', checkIds, 'token_budget', 8000) | | model_advisor_justify | model, checkId, blockPath, text | struct with status | model_advisor_justify('MyModel', 'mathworks.jmaab.db_0032', 'MyModel/Sub', 'Waived per review') | | detect_default_config | modelName | struct with config_path or empty | detect_default_config('MyModel') |
Determine from user request:
MISRA_C. For "JMAAB" without version → ask user (v5.1 or v6).slx file (ask if ambiguous)Model/Controller)Disambiguation rules:
Path A — Standard named: Proceed to step 3.
Path B — No standard, user says "run Model Advisor" / "check my model": Run detect_default_config(modelName). If config found → skip to step 4. If empty → ask which standard (show supported list).
matlabmodel_advisor_resolve_checks('standard', '<STANDARD_NAME>')
status: success → note checks_count, inform userstatus: truncated → use returned config file path in step 4status: error → report and stopGate: If checks_count > 100, confirm with user before proceeding.
Shortcut: If the user already has specific check IDs, call model_advisor_run directly with those IDs and skip to step 5.
matlabmodel_advisor_run('<system>', 'checks', {<check_ids>}) % inline checks model_advisor_run('<system>', 'configuration', '<config_path>') % config file
Use 'token_budget', 8000. If truncated, read full results from full_results path.
Classify from YAML response:
## Compliance Summary: <Standard>
Model: <model> [Scope: <subsystem> if scoped]
Result: X passed, Y warnings, Z failures
### Critical Findings (must fix)
| Check | Blocks | Fix Type | Action |
|-------|--------|----------|--------|
| name | N | param/insert/config/routing/arch | what to change |
### Warnings (should fix)
| Check | Blocks | Fix Type | Action |
|-------|--------|----------|--------|
### Passed
N checks passed.
### Suggested Next Steps
[5-7 prioritized actions max]Fix Type values: param (block parameter), insert (add block), config (model config), routing (reconnect signals), arch (restructure — recommend only)
Conciseness rules:
For JMAAB, JMAAB_V6, or MAB standards → after Step 6, load and follow references/uncheckable-guidelines-review.md.
Skip this step for other standards (MISRA, ISO 26262, DO-178C, etc.).
Ask: "Would you like me to fix these issues?"
references/fix-mode.md workflowIf user wants to justify/waive/suppress violations → load and follow the Justification section in references/fix-mode.md.
.slx files are present or the name is ambiguousparameter field from check outputsavepath)slbuild or code generation without explicit user permission| Error | Action | |-------|--------| | UNKNOWN_STANDARD | Check for typo/alias (e.g., "MAAB" → MAB). If valid but unsupported standard, acknowledge and show supported list. | | LICENSE_FAILED | Simulink Check license required | | MODEL_NOT_FOUND | Ask for correct model path | | CHECK_NOT_FOUND | Release mismatch — tell user which MATLAB release needed | | CONFIG_NOT_FOUND | Stale path — ask for update or fall back to named standard | | EXECUTION_FAILED | Model may have compilation errors — suggest fixing first | | Token budget exceeded | Read full results from full_results field | | HASH_NOT_FOUND (justify) | Model modified since last run — re-run checks for fresh ids | | JUSTIFICATION_FILE_ERROR | Check file permissions and license |
Other measured skills in the registry, with their headline benchmark lift.