
simulink-check-rapid-accelerator-compatibility
Statically analyze a Simulink model for Rapid Accelerator (raccel) mode incompatibilities. Identifies unsupported blocks (Interpreted MATLAB Function, Level-2 S-Functions without TLC), configuration issues, and data type restrictions that prevent code generation. Classifies each issue as BLOCKER (build error) or WARNING (build warning). Use BEFORE calling sim() in rapid-accelerator mode, when buildRapidAcceleratorTarget fails, or when the user asks "why won't my model run in raccel?" TRIGGER: any request explicitly involving rapid accelerator mode, raccel, raccel build errors, or buildRapidAcceleratorTarget failures.
- 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 simulink-check-rapid-accelerator-compatibility- 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 simulink-check-rapid-accelerator-compatibility 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.
Checking Rapid Accelerator Compatibility
Statically analyze a Simulink model for all raccel incompatibilities in one pass — without iterative build-fail-fix cycles.
When to Use
- User wants to simulate a model in Rapid Accelerator mode
buildRapidAcceleratorTargetfails with errors- User asks "why won't my model run in raccel?"
When NOT to Use
- Model is only intended for Normal or Accelerator mode — use
simulating-simulink-modelsinstead - User is debugging a runtime error (model builds fine but crashes) — exception: if the model crashes in raccel, run this check anyway; the root cause may be a static incompatibility that manifests as a runtime crash
- Issue is purely a compiler/toolchain problem (not model content)
- General code generation for GRT/ERT targets (not raccel-specific)
- Model Advisor checks (separate workflow)
- SIL/PIL/HIL or Simulink Real-Time deployment
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.
Diagnostic Workflow
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.
Step 1: Static Inspection (primarily MCP tools)
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.
Step 2: Deep Analysis (requires 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 |
Step 3: Report and Iterative Fix
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:
- For the first blocker (highest severity first):
a. Explain what will change and why
b. STOP — your response MUST END here with a question like "Shall I apply this fix?"
c. Do NOT call
model_editorevaluate_matlab_codein the same response as step (b) d. Only after the user replies with confirmation, apply the fix e. Re-runmodel_readto verify the issue is resolved f. Report: issue fixed, remaining issues count - Repeat for next blocker until all resolved
- Then address warnings (same confirm-fix-verify cycle)
See references/fix-recipes.md for fix procedures and validated alternative blocks — consult when applying fixes in Step 3c.
Step 4: Verification Build (REQUIRES user permission)
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');
Script Interface
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:
ProfileandRTWInlineParametersparameter valuesSaveFormat=DatasetwithSaveState=oncross-check- TLC/source file existence for S-Functions (M-S-Function and S-Function blocks)
- Half-precision, variable-size, and >64-bit fixed-point data types (via model compile)
- Bus elements with unbounded dynamic arrays
- S-Function bus I/O struct padding (no TLC + bus-typed ports)
- Stateflow signal logging
- TransportDelay inside ForEach subsystems
- ToFile blocks with SaveOperatingPoint enabled
- ModelReference inside ForEach subsystems
Example:
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 vs. Build-Based Detection
Static analysis finds all issues in one pass. This is superior to build-based detection because:
- All issues reported at once —
buildRapidAcceleratorTargetonly reports the first fatal error then stops - Faster — static analysis takes seconds; each build takes 10-60+ seconds
- No code generation artifacts — no
slprjfolders - Simulink Coder required only for verify-build — static analysis (Steps 1-3) uses model compile which needs only Simulink. The verify-build step (Step 4) calls
buildRapidAcceleratorTargetwhich 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.
Incompatibility Reference
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.
Guardrails
- NEVER AUTO-FIX. The compatibility report and the first
model_editcall 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. - Always save a backup before applying the first fix:
copyfile(get_param('ModelName','FileName'), 'ModelName_raccel_backup.slx'). Include the backup path and revert instructions in the report — see Step 3b. - Never delete user logic — only change configurations or replace incompatible blocks with functional equivalents
- Always explain WHY a change is needed before applying it
- Preserve signal names and logging when restructuring
- One fix at a time — apply, verify, then proceed to next issue
- Use
replace_blockinstead of delete+add when swapping block types — it preserves connections - Check working directory before build — must not be inside
matlabroot
Copyright 2026 The MathWorks, Inc.
FAQ
What does the simulink-check-rapid-accelerator-compatibility skill do?
Statically analyze a Simulink model for Rapid Accelerator (raccel) mode incompatibilities. Identifies unsupported blocks (Interpreted MATLAB Function, Level-2 S-Functions without TLC), configuration issues, and data type restrictions that prevent code generation. Classifies each issue as BLOCKER (build error) or WARNING (build warning). Use BEFORE calling sim() in rapid-accelerator mode, when buildRapidAcceleratorTarget fails, or when the user asks "why won't my model run in raccel?" TRIGGER: any request explicitly involving rapid accelerator mode, raccel, raccel build errors, or buildRapidAcceleratorTarget failures.
How do I install simulink-check-rapid-accelerator-compatibility?
Run npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill simulink-check-rapid-accelerator-compatibility 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/simulink-check-rapid-accelerator-compatibility/ (personal) or .claude/skills/simulink-check-rapid-accelerator-compatibility/ (project).
Which AI agents can use simulink-check-rapid-accelerator-compatibility?
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 simulink-check-rapid-accelerator-compatibility 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 simulink-check-rapid-accelerator-compatibility?
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