Builds and edits Simulink, System Composer, Stateflow, and Simscape models. Use when modifying model structure, parameters, ports, connections, or Stateflow chart internals.
Ships in model-based-design-core. 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.
Use model_edit for all structural changes — Simulink, System Composer, Simscape, and Stateflow chart internals
model_query_paramsmodel_resolve_paramsDo this FIRST — evaluate the result before any other tool call. Do not narrate the gate check to the user; proceed silently based on the result.
Call library.settingsLookup() to check for custom library configuration. It returns a struct with resolved absolute paths:
found — whether a libraries file was located (satk-libraries.json or legacy reuse-libraries.json)enabled — whether custom libraries are configuredgatePass — whether the gate is satisfied (can proceed to build)kgIndexPath — absolute path to library-kg/index.mdlibrariesPath — absolute path to the libraries filepolicyPath — absolute path to block-policy.jsondataRoot — absolute path to the directory containing .satk/Interpret the result:
found: false → no custom libraries configured. Proceed with standard Simulink blocks.gatePass: true, found: true → read kgIndexPath for block lookup, then plan and edit.gatePass: false → invoke setup-custom-libraries to populate the Knowledge Index.Display meaningful description of each check and result instead of stating gate Pass/fail.
No model reading, planning, or editing begins until the gate passes.
.satk/library-kg/index.md, then custom/<lib>/index.md or toolboxes/<kb>/index.md, then the relevant category pages to find each of the library blocks that match.model_read on the target scope to get block IDs and understand existing topology.model_edit with operations scoped to one subsystem level at a time.model_read on the scope to confirm the structure matches your intent.model_check to catch unconnected ports or dangling lines. Fix any error-severity issues.If model_edit returns status: partial: Run both model_read and model_check immediately — don't wait until all edits are complete.
refUse ref to name a block and #ref to reference it in later operations within the same call:
[{"op": "add_block", "type": "Gain", "name": "MyGain", "ref": "g1"},
{"op": "connect", "target": "blk_5.y1 -> #g1.u1"}]
In SF scope, #ref references are portless — no .y1/.u1 suffixes (see references/stateflow.md).
The response created map shows ref → blk_id (or ref → sf_X in SF scope). In subsequent calls, use the returned ID — #ref only works within a single call.
model_overview or model_read. Block names can contain invisible newlines and trailing whitespace that cause hilite_system, open_system, and get_param to fail. Instead, resolve paths from blk_X IDs:
% blk_42 → use the number after "blk_" as the SID
blockPath = Simulink.ID.getFullName('<ModelName>:42');
hilite_system(blockPath)
open_system(blockPath)
get_param(blockPath, 'BlockType')
Simulink.BlockDiagram.arrangeSystem or use set_param for block positioning unless the user explicitly requests it. model_edit has a built-in autolayout engine that runs automatically after each call.layout_mode to model_edit. Use "full" when populating an empty scope (new model root, or a newly-created subsystem) for optimal block arrangement. Use "incremental" when adding blocks to a scope that already has existing blocks (preserves existing positions).arranging-simulink-layouts skill.model_edit call operates in exactly one domain (Simulink, System Composer, or Stateflow) determined by the scope. To add a Chart block and then populate it, use two calls: SL scope for the Chart block, then SF scope for internals. Use model_read between calls to discover the chart's sf_X scope ID.Kp_SpeedController) instead of hardcoded numeric values. Define variables in model workspace or a .m init script.evaluate_matlab_code with set_param/add_block to bypass model_edit — it skips autolayout, undo tracking, and error recoveryopen_system rather than load_system to open models that are not already open, or when creating new models, unless the user explicitly asks otherwise or the model is a library. This ensures the user can see live edits as they happen.Prefer code-generation-safe names for blocks, signals, and variables:
a-z, A-Z, 0-9, underscore (_)Use the block's display name in the type field. Do not construct or guess library paths.
Custom library blocks (from satk-libraries.json): pass both type AND ReferenceBlock fields. Set type to the block's display name and ReferenceBlock to the full library path from the library KB.
Toolbox KB blocks (from activeToolboxes): Use them exactly like custom library blocks — reference the type and ReferenceBlock fields from the toolbox category page under toolboxes/<kb>/ in the library KB.
Built-in Simulink blocks: Use the BlockType directly: Gain, Sum, Constant, Integrator, SubSystem, Scope
Other library blocks (Simscape, Aerospace, DSP, Communications, etc.): If you have the block's library path from the library KB, pass it as ReferenceBlock together with type. Otherwise use the display name as it appears in the Simulink Library Browser (Voltage Source, Solver Configuration).
If model_edit returns INVALID_TYPE: Fall back to the full library path from MATLAB documentation (e.g., ee_lib/Sources/Voltage Source)
[{"op": "add_block", "type": "In", "ReferenceBlock": "customLib_Portsandsubsystems/In", "name": "Voltage", "ref": "v1"},
{"op": "add_block", "type": "Gain", "ReferenceBlock": "customLib_Mathoperations/Gain", "name": "Kp", "ref": "g1"},
{"op": "add_block", "type": "Add", "ReferenceBlock": "customLib_Mathoperations/Add", "name": "SumErr", "ref": "s1"},
{"op": "add_block", "type": "Out", "ReferenceBlock": "customLib_Portsandsubsystems/Out", "name": "Output", "ref": "o1"}]
[{"op": "add_block", "type": "Voltage Source", "name": "V1", "ref": "v1"},
{"op": "add_block", "type": "Resistor", "name": "R1", "ref": "r1"},
{"op": "add_block", "type": "Electrical Reference", "name": "Gnd", "ref": "gnd"},
{"op": "add_block", "type": "Solver Configuration", "name": "Solver", "ref": "sc"}]
After completing all edits for a scope, verify:
error-severity issues from model_check (unconnected ports, dangling lines)ref names resolved to blk_id in the created map — no dangling #ref references in subsequent callsmodel_check with checks='["stateflow_lint"]') before layout is appliedmodel_edit returned status: partial at any point, confirm the scope is now structurally complete via model_readWhen working with these domains, read the corresponding reference file before editing:
references/stateflow.md — model_edit edits chart internals natively. Scope to a chart (sf_X or chart blk_X) and use the same operations: add_block for SF elements, portless connect for transitions, configure for properties. The reference covers SF-specific syntax, scoping, LabelString patterns, and the two-call SL+SF workflow.references/system-composer.md — Create models with systemcomposer.createModel, then use model_edit. Components use type: "SubSystem", ports use Bus Element blocks. The reference covers component creation, port wiring, and behavior model generation.references/simscape.md — Physical connections use bidirectional <-> syntax. The reference covers connection semantics, port patterns, and initial target variables.Copyright 2026 The MathWorks, Inc.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
simulink, system-composer, stateflow, simscape, model-editing
/model-based-design-core:building-simulink-modelsfrom model-based-design-core
npx claudepluginhub matlab/simulink-agentic-toolkit --plugin model-based-design-core12 skills in this plugin
/arranging-simulink-layoutsArranges Simulink block diagram layout to improve readability using the model_edit layout engine. Use when the user asks to fix, clean up, tidy, straighten, or rearrange a layout, or to run Simulink's Auto Arrange, when blocks overlap or lines cross, when specific blocks need repositioning, or when grouping blocks into or expanding a subsystem./filing-bug-reportsGenerate a standalone bug report that another developer can use to reproduce, investigate, and fix an issue. Use when the user says 'file a bug', 'write a bug report', 'report this issue', or asks to document a defect for handoff./generate-requirement-draftsGenerates 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./managing-simulink-projectsManages MATLAB projects for Simulink workflows: path management, file registration, labels, source control configuration, and project lifecycle. Use when creating projects, adding models/dictionaries/requirements to projects, configuring labels for automation, fixing broken model references, or setting up source control for Simulink artifacts./setup-custom-librariesRegister, add, or update existing custom Simulink block libraries and configure block policy and knowledge index. Use when a user wants to register, set up, configure, or add existing .slx library files for agent-assisted model building. Do NOT use when the user wants to create or author a new library from scratch — that requires building-simulink-models./simulating-simulink-modelsConfigures 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.Other plugins' skills for the same job