Skills

Building Simulink Models

Builds and edits Simulink, System Composer, Stateflow, and Simscape models.

Install

npx skills add matlab/simulink-agentic-toolkit --skill building-simulink-models -g -a claude-code -y
Category
Engineering
Updated
6d ago
License
See repository
Context cost
Mediumabout 2,289 tokens
Runs scripts
No, instructions only

What it does

Builds and edits Simulink, System Composer, Stateflow, and Simscape models. Use when modifying model structure, parameters, ports, connections, or Stateflow chart internals.

Building Models

Use model_edit for all structural changes, Simulink, System Composer, Simscape, and Stateflow chart internals

When to Use

  • Adding, connecting, deleting, or replacing blocks in a model
  • Configuring block parameters, signal properties, or model settings
  • Creating or editing Stateflow chart internals (states, transitions, junctions, data, events, messages, functions)
  • Building System Composer architecture models
  • Wiring Simscape physical connections

When NOT to Use

  • Querying parameter values → use model_query_params
  • Resolving variable references to numeric values → use model_resolve_params

Library & Policy Prerequisites, BLOCKING GATE

Do 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 configured
  • gatePass, whether the gate is satisfied (can proceed to build)
  • kgIndexPath, absolute path to library-kg/index.md
  • librariesPath, absolute path to the libraries file
  • policyPath, absolute path to block-policy.json
  • dataRoot, 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.

Workflow

Read the whole SKILL.md on GitHub

More in Engineering