Skills

Arranging Simulink Layouts

Arranges and tidies Simulink block diagram layouts with the model_edit layout engine.

Install

npx skills add matlab/simulink-agentic-toolkit --skill arranging-simulink-layouts -g -a claude-code -y
Category
Engineering
Updated
6d ago
License
See repository
Context cost
Lightabout 1,300 tokens
Runs scripts
No, instructions only

What it does

Arranges and tidies Simulink block diagram layouts with the model_edit layout engine. Use when the user asks to fix, clean up, tidy, straighten, or rearrange a layout, when blocks overlap or lines cross, when specific blocks need re-placing, or when grouping blocks into or expanding a subsystem.

Arranging Simulink Layouts

Re-place blocks with the SATK layout engine in model_edit. Move as little of the user's diagram as the request allows.

When to Use

  • "Fix / clean up / tidy / straighten / rearrange the layout", "make it readable"
  • Blocks overlap, lines cross or run through blocks, a few blocks landed in odd places
  • "Move these blocks", "line these up", "sort out the blocks I just added"
  • Grouping blocks into a subsystem, or expanding a subsystem into its parent

When NOT to Use

  • Adding, connecting, deleting, or configuring blocks: use building-simulink-models. Layout already runs automatically after every model_edit call.
  • Stateflow chart layout: the layout op is Simulink-only. A chart scope accepts only a full re-layout (operations [], layout_mode "full"), which moves every element, so ask first.

Set Expectations

  • You drive an automatic layout engine. You don't place blocks pixel by pixel. Say so if the user expects hand-tuned placement.
  • Ctrl+Z is not reliable for agent edits, including layout. Don't offer undo. Before any layout that moves many blocks, recommend that the user saves the model (or a copy) first.
  • The first layout in a MATLAB session can take about 20 s while the engine starts. Later calls take 1, 2 s.

Choose the Method

Selective layout is the default. A full layout of a diagram the user has arranged by hand discards their arrangement, so ask before running one.

SituationMethod
A few blocks are messy, overlapping, or just added{"op":"layout","targets":[...]} with layout_mode "incremental"
The whole scope is a mess and the user agrees that everything movesoperations [] with layout_mode "full"
The user explicitly asks for Simulink's own tidy-upFormat > Auto Arrange / Simulink.BlockDiagram.arrangeSystem, and only on request
The user wants an exact placementconfigure with Position through model_edit
Read the whole SKILL.md on GitHub

More in Engineering