stateflow-apply-layout

Installation
SKILL.md

Apply Stateflow Layout

Apply auto-layout to Stateflow subviewers using applySFAutolayout. Use after API edits to arrange overlapping elements, or to reorganize an existing messy diagram — no edit needs to have happened.

Layout is repeatable, not a one-shot step. Expect more than one call in a single task: once per subviewer when a diagram is too large for one pass, again with a different type or orientation when the first result reads poorly, and once per edit round when working incrementally. Calling it again is normal use, not a sign something failed.

When to Use

  • After adding states, transitions, or junctions via the Stateflow API (elements default to overlapping positions)
  • User asks to "arrange", "layout", "auto-layout", or "clean up" any Stateflow subviewer
  • User wants to reorganize a messy existing Stateflow diagram
  • User asks to layout all Stateflow subviewers in a model
  • User asks to layout only what they just added, or to keep the existing arrangement intact (incremental) — they will usually say "states", but this covers any new object
  • User asks to layout a specific chart, subchart state, subchart box, subchart function, atomic subchart, or atomic box
  • A previous layout ran but reads poorly, and the user wants a different arrangement

"Chart" in a user's request rarely means "top-level chart only." People say chart, diagram, or state machine for whatever is open in front of them — which may be a subchart several levels down, an atomic subchart, or a subchart box or function. Identify the actual subviewer before choosing a target; laying out the whole enclosing chart when the user meant one subchart rearranges work they did not ask you to touch.

When NOT to Use

Installs
5
GitHub Stars
1.4K
First Seen
7 days ago