Statically analyzes Simulink models for Rapid Accelerator mode incompatibilities, identifying unsupported blocks, configuration issues, and data type restrictions that prevent code generation.
Ships in simulink-simulation. 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; scripts run unread.
Statically analyze a Simulink model for all raccel incompatibilities in one pass — without iterative build-fail-fix cycles.
buildRapidAcceleratorTarget fails with errorssimulating-simulink-models insteadAll 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.
Detect all incompatibilities statically — by parsing model structure, block parameters, data types, and configuration — without calling buildRapidAcceleratorTarget. This finds all issues in one pass.
Two-phase workflow: Phase 1 (Steps 1–3a) produces the compatibility report — your response MUST END there. Phase 2 (Steps 3b–3c) applies fixes one at a time, each requiring a separate user confirmation. Never combine both phases in one response.
Gather model information using MCP tools in parallel:
1a. Read block topology via model_read:
model_read(model: "ModelName", scope: "root", depth: "inf")
From the output, immediately flag blocks with these BlockType values:
| BlockType | Severity | Action |
|---|---|---|
MATLABFcn | BLOCKER | Not supported by Simulink Coder |
M-S-Function | Investigate | Query FunctionName → check TLC in Step 2 |
S-Function | Investigate | Query FunctionName → check MEX/source/TLC in Step 2 |
FromWorkspace | Investigate | Query Interpolate + OutDataTypeStr |
ToFile | Investigate | Query Filename vs model name |
FromSpreadsheet | Investigate | Check against SaveOperatingPoint |
DataStoreMemory | Investigate | Check OutDataTypeStr for >64-bit fixed-point (Step 2) |
TransportDelay | Investigate | Check if inside ForEach subsystem (Step 2) |
ModelReference | Investigate | Check if inside ForEach with parallel execution |
Do NOT flag these block types — they are raccel-compatible:
| BlockType | Why it is compatible |
|---|---|
MATLABFunction | Stateflow-based, supports code generation (NOT the same as MATLABFcn) |
MATLABSystem | System object with code generation support — fully raccel-compatible |
ModelReference (standalone) | Compatible unless inside ForEach with parallel execution |
SubSystem | Compatible (virtual or atomic) |
Scope, Display | Viewer blocks — ignored during code generation |
RateTransition | Compatible — handles rate changes in code generation |
Dashboard blocks (LampBlock, CircularGaugeBlock, LinearGaugeBlock, etc.) | UI-only — ignored during code generation |
1b. Query configuration parameters via model_query_params:
model_query_params(
model: "ModelName",
targets: ["config:ModelName"],
params: ["SaveFormat", "SaveState", "SaveOperatingPoint",
"LoadExternalInput", "LoadInitialState", "ArrayLayout",
"SignalLogging", "SaveFinalState"],
compile: "false"
)
1c. Query block-level parameters via model_query_params (for flagged blocks):
model_query_params(
model: "ModelName",
targets: ["blk_X", "blk_Y"],
params: ["FunctionName", "Interpolate", "OutDataTypeStr", "Filename"],
compile: "false"
)
Configuration rules (evaluate from 1b results):
| Parameter Combination | Severity | Issue |
|---|---|---|
SaveFormat='Dataset' AND SaveState='on' | WARNING | State logging to Dataset not supported — build continues but state logging silently produces no results |
SaveOperatingPoint='on' + DataStoreMemory/FromSpreadsheet blocks | WARNING | Prevents OP save/restore |
LoadInitialState='on' | WARNING | Must be structure format; variable must exist |
LoadExternalInput='on' | Check | Validate input format (must be double arrays/structs) |
ArrayLayout='Row-major' + S-Function blocks | WARNING | RTPs may not upload correctly |
IMPORTANT — SaveFormat+SaveState cross-check: The
model_query_paramsMCP tool can return stale values forSaveStatebecause it reads cached configuration parameters rather than querying the model directly. This cross-check usesevaluate_matlab_codeto callget_paramwhich always reads the live model state. WhenSaveFormat='Dataset', you MUST verifySaveStatewith a directevaluate_matlab_codecall:get_param('ModelName', 'SaveState')If the result is
'on', flag it as a WARNING (DatasetRapidAccelNoSupported) — even ifmodel_query_paramsreportedSaveState='off'. This is the most commonly missed incompatibility.
FromWorkspace rule: Flag as BLOCKER if Interpolate='on' AND OutDataTypeStr contains int64 or uint64.
ToFile rule: Flag as BLOCKER if filename (without extension) matches the model name — causes rapidAccelBuildFailed.
evaluate_matlab_code)For checks that need MATLAB runtime APIs. Only run checks relevant to blocks found in Step 1.
Run the deep analysis script via evaluate_matlab_code with project_path set to the skill's scripts/ folder:
raccel_deep_analysis('ModelName')
It checks: TLC/source file existence for S-Functions, model compile for data type resolution (half-precision, variable-size, >64-bit fixed-point), Stateflow signal logging, ForEach structural patterns, and parameters not available via model_query_params (Profile, RTWInlineParameters).
Output is printed as BLOCKER: or WARNING: lines — parse these into your findings list.
Additional configuration rules from Step 2:
| Parameter | Severity | Issue |
|---|---|---|
Profile='on' | WARNING | Profiling data not collected in raccel |
RTWInlineParameters='off' + workspace variables | WARNING | Parameter tuning restrictions |
3a. Present the compatibility report with ALL findings in priority order:
## Compatibility Report for <ModelName>
### Blockers (must fix before raccel simulation)
1. [Block Path] — Issue description
- Why: Explanation
- Fix: Recommended action
### Warnings (should fix for correct behavior)
1. [Config/Block] — Issue description
- Why: Explanation
- Fix: Recommended action
If no blockers are found, the model is raccel-compatible — skip to Step 4.
STOP HERE. Your response MUST END after the compatibility report. Do not save a backup, do not propose fixes, do not call
model_editorevaluate_matlab_codeto modify the model. End your response with: (1) a note that you will save a backup before making any changes, and (2) a question like: "Would you like me to fix these issues one at a time? I'll save a backup first, then start with [first blocker]." Then WAIT for the user to reply before continuing to Step 3b.
3b. Back up the original model before any fixes (only after user confirms)
Before applying the first fix, save a backup so the user can revert. Use copyfile — not save_system with a second argument, which renames the in-memory model:
copyfile(get_param('ModelName','FileName'), 'ModelName_raccel_backup.slx');
Include the backup path in the report:
Backup saved to: ModelName_raccel_backup.slx
To revert all changes: open_system('ModelName_raccel_backup')
3c. Fix issues iteratively (MANDATORY user confirmation for EACH fix)
CRITICAL: Never auto-fix. This is a HARD CONSTRAINT — no exceptions.
The phrases "fix everything", "make it compatible", or "go ahead" are permission to start the process — NOT permission to apply all fixes. You MUST still present each fix individually and end your response to wait for explicit per-fix confirmation.
The rule: Every
model_editorevaluate_matlab_codecall that modifies the model requires a separate, preceding "yes" from the user. If you have not received a user message confirming a specific fix, you do not have permission to apply it.Forbidden pattern — do NOT do this:
- Present report → "Now saving a backup and applying all fixes" → call model_edit
- Present report → "I'll start with the first fix" → call model_edit
- Present report → call save_system → call model_edit
Any response that contains BOTH the compatibility report AND a
model_editcall is WRONG.Required pattern:
- Response 1: Present report → "Shall I fix these one at a time?" → response ends, no tool calls after this point
- Response 2 (after user says yes): Save backup → apply first fix → verify → "Shall I proceed to the next fix?"
Fix issues one at a time, re-running static analysis after each fix:
model_edit or evaluate_matlab_code in the same response as step (b)
d. Only after the user replies with confirmation, apply the fix
e. Re-run model_read to verify the issue is resolved
f. Report: issue fixed, remaining issues countSee references/fix-recipes.md for fix procedures and validated alternative blocks — consult when applying fixes in Step 3c.
After all static issues are resolved, ask permission to build:
All static incompatibilities have been resolved.
Would you like me to run buildRapidAcceleratorTarget to confirm
the model builds successfully for Rapid Accelerator mode?
Only proceed after explicit confirmation. Then run via evaluate_matlab_code with project_path set to the skill's scripts/ folder:
raccel_verify_build('ModelName')
It handles working directory checks, builds the target, and reports success or detailed failure information.
If the build fails despite static analysis passing, analyze the error and loop back to Step 3.
After a successful build, offer to clean up the backup:
Build succeeded. A backup of the original model is at ModelName_raccel_backup.slx.
Would you like to keep it or delete it?
If the user wants it deleted, run:
delete('ModelName_raccel_backup.slx');
Both scripts are in the skill's scripts/ directory. Call via evaluate_matlab_code with project_path set to the skill's scripts/ folder. Never use addpath.
raccel_deep_analysis(mdl)Runs runtime checks that require MATLAB APIs: filesystem lookups, model compile, Stateflow introspection, and ForEach detection. Only run after Step 1 static inspection flags relevant blocks.
Input:
| Parameter | Description |
|---|---|
mdl | Name of a loaded Simulink model (string) |
Output: Printed lines to stdout. Each finding is prefixed with severity:
| Prefix | Meaning |
|---|---|
BLOCKER: | Build-blocking incompatibility — prevents raccel code generation |
WARNING: | Non-blocking issue — build succeeds but runtime behavior is degraded |
Line format: BLOCKER: <block_path> — <description> or WARNING: <block_path> — <description>. The final line is --- Deep analysis complete for <mdl> --- (with skipped check count if any checks failed).
What it checks:
Profile and RTWInlineParameters parameter valuesSaveFormat=Dataset with SaveState=on cross-checkExample:
raccel_deep_analysis('MyModel')
raccel_verify_build(mdl)Builds the rapid accelerator target and reports success or detailed failure. Requires Simulink Coder.
Input:
| Parameter | Description |
|---|---|
mdl | Name of a loaded Simulink model (string) |
Output: Returns a struct and prints a summary to stdout.
| Field | Type | Description |
|---|---|---|
status | string | 'success' or 'failed' |
identifier | string | '' on success, MException identifier on failure |
message | string | '' on success, error message on failure |
causes | cell array | {} on success, cell array of structs with identifier and message fields on failure |
On success, prints: Build SUCCEEDED — <mdl> is confirmed raccel-compatible.
On failure, prints: Build failed: <identifier> followed by the message and each cause.
Example:
result = raccel_verify_build('MyModel')
Static analysis finds all issues in one pass. This is superior to build-based detection because:
buildRapidAcceleratorTarget only reports the first fatal error then stopsslprj foldersbuildRapidAcceleratorTarget which requires Simulink Coder. Users checking raccel compatibility will have Coder since running in rapid accelerator mode requires it.Fall back to build when static analysis reports no issues but the build still fails, or for complex S-Function interactions not covered by the catalog.
See references/incompatibility-catalog.md for all 13 categories with diagnostic error IDs, severity classifications, and fix pointers — consult when classifying issues found in Steps 1-2.
model_edit call must NEVER appear in the same response. Present the report, end your response, wait for user confirmation. This applies even when the user says "fix everything" — see Step 3c.copyfile(get_param('ModelName','FileName'), 'ModelName_raccel_backup.slx'). Include the backup path and revert instructions in the report — see Step 3b.replace_block instead of delete+add when swapping block types — it preserves connectionsmatlabrootCopyright 2026 The MathWorks, Inc.
What SKILL.md sets; muted values are Claude Code's defaults
/simulink-simulation:simulink-check-rapid-accelerator-compatibilityfrom simulink-simulation
npx claudepluginhub matlab/simulink-agentic-toolkit --plugin simulink-simulation4 skills in this plugin
/authoring-simulink-inputsSynthesize new waveforms from scratch for Simulink inports using createInputDataset. Use ONLY when the user asks to generate, create, or synthesize signals (step, ramp, sine, chirp, pulse, noise) to populate a Dataset for External Inputs or Signal Editor. Covers timeseries and timetable formats with correct data type, interpolation, units, and dimensions. Also covers function-call and trigger inport timing setup. Do NOT use when the user wants to load, import, or read existing data from files (MAT, CSV, spreadsheet) — even if that data will be used as model input. Do NOT use for running simulations or plotting outputs.
/create-sdi-runImport data into the Simulation Data Inspector (SDI) from MAT, CSV, or Excel files, from workspace variables, or from a Simulink simulation. Use when the user wants to view a logged file in SDI, load a bench-test log, or verify what a just-completed `Simulink.sdi.createRun` or `sim(model)` produced. Covers the `'file'`, `'vars'`, and `'namevalue'` sources of `createRun`, the auto-populate behavior after `sim()`, and post-import verification. Not for comparing existing runs (use `Simulink.sdi.compareRuns`); not for streaming data live during a running simulation (use `Simulink.sdi.createRunOrAddToStreamedRun` — a separate API); and not for authoring Gherkin or Simulink Test test cases, assertions, or regression tests (use `testing-simulink-models`). Do not activate on test-authoring or verification prompts even when no test-authoring skill is available — say so and stop.
/simulink-run-parallel-simulationsUse this skill to run multiple Simulink simulations in parallel with parsim, batchsim, and DesignStudy. TRIGGER when: user asks for parameter sweep, sweeping/varying parameters across simulations, Monte Carlo study, batch simulation, running multiple simulations, parallel simulations, large-scale multiple simulations, any task involving repeated simulations with different parameter values, user mentions having an existing script/function for parameter sweeps, or user wants to migrate from parfor/set_param/for-loop patterns to recommended workflows.2 plugins in one repository ship this exact skill · first indexed Oct 15, 2026
Other plugins' skills for the same job