SimulinkやSystem Composerのモデリング規約をガイドライン化し、Model Advisorチェックの仕様作成、実装、テストまで一貫して支援します。
- モデリング規約をチェックにしたいとき
- 独自のModel Advisorチェックを作りたいとき
- 既存チェックをDetailStyleへ移行したいとき
Simulinkのブロック図で重なったブロックや交差する線を整理し、必要な範囲の配置を整えたり、ブロックをサブシステムにまとめたりするスキルです。
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.
実行スコア 未検証
インストール方法を見るSimulinkのブロック図で、重なりや交差した線、配置の乱れを整えます。自動レイアウトエンジンを使い、指定したブロックと接続線を中心に動かす方法が基本です。必要に応じて範囲全体を再配置したり、指定位置への移動や整列を行ったりできます。ブロックをサブシステムにまとめる、またはサブシステムを展開する作業にも対応します。
ブロックを追加した後に図を読みやすく整えたいときや、線がブロックを横切る状態を直したいときに向いています。図全体ではなく、乱れている箇所だけを動かしたい場合にも使えます。
レイアウトは自動で行われ、ピクセル単位の手動配置ではありません。範囲全体の再配置は既存の配置を変えるため、実行前に合意が必要です。多くのブロックを動かす場合は、先にモデルを保存するよう案内します。初回のレイアウト処理には約20秒かかることがあります。MathWorksのライセンスに従います。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Re-place blocks with the SATK layout engine in model_edit. Move as little of the user's diagram as the request allows.
building-simulink-models. Layout already runs automatically after every model_edit call.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.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.
| Situation | Method |
|---|---|
| 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 moves | operations [] with layout_mode "full" |
| The user explicitly asks for Simulink's own tidy-up | Format > Auto Arrange / Simulink.BlockDiagram.arrangeSystem, and only on request |
| The user wants an exact placement | configure with Position through model_edit |
model_edit(model, "root", '[{"op":"layout","targets":["blk_5","blk_7"]}]', "incremental")
scope. Make one call per scope.layout op with edits in the same call. A #ref target names a block that the call adds:
[{"op":"add_block","type":"Gain","ref":"g"},{"op":"connect","target":"blk_3.y1 -> #g.u1"},{"op":"layout","targets":["#g","blk_9"]}]targets.layout_mode "full", the targets are ignored and the whole scope is re-laid out.model_edit(model, "blk_12", "[]", "full")
Use it for a scope that is new or already unreadable, and only with the user's agreement. Prefer the smallest subsystem that contains the mess over root.
model_edit(model, "root", '[{"op":"configure","target":"blk_5","params":{"Position":"[300 100 340 130]"}}]', "incremental")
Later incremental layouts leave the block where you put it, but a full layout of the scope moves it. Use this only when the user names a position or asks for specific alignment.
blk_X IDs with model_read (depth "0") or model_overview on the scope.sel = find_system('<scopePath>', 'SearchDepth', 1, 'Type', 'Block', 'Selected', 'on');
ids = cellfun(@(p) ['blk_' extractAfter(Simulink.ID.getSID(p), ':')], sel, 'UniformOutput', false)
A selection can be stale: earlier operations sometimes leave blocks selected. Read the block names back to the user and confirm before laying out.Position values with model_query_params, or check the model in the editor.layout: block in the response. applied: false comes with a detail that explains why. Report it; don't retry blindly.model_check(model, scope, '["unconnected_lines"]') to confirm that the wiring survived.To group blocks into a new subsystem, or expand a subsystem in place, see references/subsystem-restructuring.md. Don't rebuild the content block by block with model_edit.
set_param(..., 'Position', ...) block by block to "fix" a layout. Use a layout op, or configure Position through model_edit.Simulink.BlockDiagram.arrangeSystem when the user didn't ask for Auto Arrange.Simulink.BlockDiagram.createSubsystem.まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
SimulinkやSystem Composerのモデリング規約をガイドライン化し、Model Advisorチェックの仕様作成、実装、テストまで一貫して支援します。
Simulinkモデルの入力ポート向けに、正弦波やランプなどの新しい信号を作り、型や補間方式を保ったDatasetとして整えます。
System Composerで機能・論理・物理のシステム構成を設計し、インターフェースや割り当て、要件との対応をモデル上で管理します。
Simulink、System Composer、Stateflow、Simscape のモデル構造やブロック、接続、設定を編集し、変更後の構成や接続状態を確認するスキルです。
SimulinkモデルをMISRAやJMAABなどの規格に照らして検査し、優先度付きの指摘と修正案をまとめられます。
プロジェクトの `.satk/block-policy.json` を整え、エージェントが使えるブロックや除外対象、変更を禁止するパラメーターを設定するスキルです。