simulink-layout-tidy

simulink-layout-tidy is a skill for Claude Code from calebzu/pmsm-control-claude-skills-for-matlab. It costs 190 tokens per session (1,181 once invoked), scanned A, original, Apache-2.0.

A tool for rearranging an existing Simulink model, a block-diagram program used to model and simulate systems, so its blocks and connecting lines are easier to read.

In plain words
What is it for?
Tidying block positions and line routes, measuring overlaps and line crossings, and reporting remaining crossings honestly. An optional mode can replace some wires or group blocks, followed by a smoke simulation.
Why use it?
It reduces visual clutter such as overlapping blocks and wires running through blocks while preserving the model’s connections by default.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Tidying block positions and line routes, measuring overlaps and line crossings, and reporting remaining crossings honestly. An optional mode can replace some wires or group blocks, followed by a smoke simulation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/calebzu/pmsm-control-claude-skills-for-matlab/simulink-layout-tidy
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add calebzu/pmsm-control-claude-skills-for-matlab --skill simulink-layout-tidy
Clone the repo
git clone --depth 1 https://github.com/calebzu/pmsm-control-claude-skills-for-matlab

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for simulink-layout-tidy

README.md
[![agentmods](https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/simulink-layout-tidy/github.svg)](https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/simulink-layout-tidy)
Your own site
<a href="https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/simulink-layout-tidy"><img src="https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/simulink-layout-tidy/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for simulink-layout-tidy

Your own site · 80×15
<a href="https://agentmods.dev/skills/calebzu/pmsm-control-claude-skills-for-matlab/simulink-layout-tidy"><img src="https://agentmods.dev/badge/skills/calebzu/pmsm-control-claude-skills-for-matlab/simulink-layout-tidy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 190 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,181 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00190 $0.01181
Opus 5 $0.00095 $0.00590
Sonnet 5 $0.00038 $0.00236
Haiku 4.5 $0.00019 $0.00118

Measured 12d ago against content hash f7cdd82f57c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

simulink-layout-tidy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/planarity_check.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/simulink-layout-tidy/SKILL.md · 67 lines

How it starts

The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Make an already-built Simulink model compact, readable, and overlap-free — and report line crossings honestly, never promising a zero that the graph's topology forbids.

Safety invariants (read first)

In Simulink a block's Position and a line's Points are purely cosmetic and orthogonal to the port connections. That fact is the whole basis for this skill being safe.

  • L1 contract (default, zero-risk). This skill MUST only modify block Position and line Points. It MUST NOT add or remove blocks and MUST NOT change any port connection. Why: the compiled model is then byte-for-byte identical, so simulation results cannot change and no functional re-test is needed.
  • L2 contract (opt-in, explicit only). L2 additionally allows (a) replacing long-range / multi-consumer wires with Goto/From and (b) wrapping a functional cluster into a Subsystem. These are logically equivalent but change the block set, so after enabling L2 you MUST run one smoke simulation and confirm no NaN/Inf and unchanged behavior. See references/l2_contract.md.
  • NEVER hard-gate "zero line crossings." A non-planar graph (one containing a K3,3 or K5 minor) cannot be drawn crossing-free on a plane (Kuratowski). Forcing zero would reject mathematically-valid models. Use the tiered gates below instead.

Quick start (L1)

addpath('scripts');
load_system('my_model');
rpt = tidy_layout('my_model');          % diagnose -> arrange -> de-overlap -> re-measure -> screenshot
% rpt.before / rpt.after hold the metric structs; rpt.screenshot is the PNG path.

Diagnose planarity (decides whether zero crossings is even reachable):

extract_graph('my_model', 'graph.json');           % blocks=nodes, lines=edges
% then, from a venv/env with networkx:
% python3 scripts/planarity_check.py graph.json     (exit 2 == proven non-planar)

Workflow

Step Action Where
1 Measure BEFORE: overlaps, line-block hits, crossings, extent layout_metrics.m
2 Diagnose planarity → is zero-crossing reachable at all? extract_graph.m + planarity_check.py
3 Build two candidates: minimal-move (de-overlap only) and arrange tidy_layout.m
4 Keep whichever has fewer crossings; NEVER accept an arrange regression tidy_layout.m
5 Measure AFTER + assert hard gates + export PNG for human sign-off tidy_layout.m

Read the full file on GitHub · 67 lines

Files

What ships with it

9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 67 lines · 190 tokens per session scan A f7cdd82f57c4

Subscribe to this mod's changes

simulink-layout-tidy is a skill published in the GitHub repository calebzu/pmsm-control-claude-skills-for-matlab (13 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 190 tokens to every session and 1,181 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

matlab-use-scenario-builder

Generate driving scenes, scenarios, road surfaces, and 3D content from scenariobuilder. sensor data (GPS, camera, lidar, actor tracks) using Scenario Builder for Automated Driving Toolbox. BUILD, EXPORT, or AUGMENT a virtual scenario/scene/map: ego or actor trajectories, trajectory smoothing, OpenCRG road-surface…

matlab/matlab-agentic-toolkit · 231 tokens

matlab-simulate-radar-detections

Configure, simulate, debug, and analyze radarDataGenerator within radarScenario. Use for: interactively building radar detection scenarios from datasheets or performance requirements; diagnosing missed detections and configuration errors; interpreting sensor spherical, body, and scenario-frame outputs; deriving…

matlab/matlab-agentic-toolkit · 92 tokens

matlab-fit-curve

Fit curves and surfaces interactively with the Curve Fitter app for a complete no-code fitting workflow. Invoke this skill when the Curve Fitter app, cftool, curveFitter, or "curve fitting tool/app" is mentioned in any way. Also use when exploring or comparing fit types (regression, interpolation, smoothing, splines…

matlab/matlab-agentic-toolkit · 121 tokens

roadrunner-build-scenario-from-osc

Build a RoadRunner Scenario programmatically from an OpenSCENARIO 1.x (.xosc) file using the roadrunner-scenario-authoring skill. Use when the user wants to recreate a scenario from a .xosc file, interpret an OpenSCENARIO file and build it programmatically, reconstruct a .xosc as a RoadRunner scenario, generate a…

matlab/matlab-agentic-toolkit · 176 tokens

roadrunner-rrhd-authoring

Build RoadRunner HD Map entities in MATLAB — lanes, boundaries, markings, junctions, signs, signals, barriers, parking. Use when creating driving scenes from scratch, authoring road networks for simulation and testing automated driving systems, or assembling RRHD maps from Lanelet2 or other HD map sources.

matlab/matlab-agentic-toolkit · 70 tokens

roadrunner-scenario-simulating

Expert guidance for simulating RoadRunner scenarios via the MATLAB programmatic API and Simulink co-simulation. Use when the user wants to run a simulation, step through a simulation, control actors during co-simulation, add observers, attach sensors, retrieve simulation logs, or read/write scenario variables. Covers…

matlab/matlab-agentic-toolkit · 123 tokens