
building-architecture-models
Build and refine multi-layer (functional/logical/physical) system architecture models with System Composer. Use when building or restructuring architecture models, or when working with interface dictionaries and port interfaces (including composite boundary ports), stereotypes and profiles, architecture views, sequence diagrams, allocation sets, roll-up analysis, or requirements traceability for architecture components.
- Installs
- 58
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill building-architecture-models- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads building-architecture-models automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Building Architecture Models
CRITICAL RULE — PHASE GATE: When building multiple architecture layers, you MUST stop after completing each layer and ask the user for review and approval before starting the next layer. Do NOT build Logical until the user approves Functional. Do NOT build Physical until the user approves Logical. This applies even when the user says "automatically continue" or "build all layers." When you stop, outline the remaining roadmap (e.g., "Next: Logical layer, then Physical layer and allocation sets") and ask for the user's approval to proceed.
Create and refine System Composer architecture models — from greenfield F/L/P designs to targeted additions (stereotypes, views, allocation sets, requirements tracing).
When to Use
- Designing a system architecture (full F/L/P or single-layer)
- Adding interface dictionaries, stereotypes, views, or roll-up analysis to existing SC models
- Creating allocation sets between architecture layers
- Linking requirements to architecture components (Implement links)
- Refining existing System Composer models with methodology guidance
When NOT to Use
- Building or editing a Simulink model (block-level work: Gain, Scope, Subsystem, add_block, add_line) → Do NOT perform the work. Tell the user this is out of scope for this skill and direct them to
building-simulink-models. - One-off structural edits to an existing SC model (add a component, rewire a port) → use
building-simulink-modelswithmodel_edit - User doesn't have a clear decomposition or requirements yet → suggest
specifying-mbd-algorithmsto produce a spec first, then return here to build - Creating activity behavior diagrams → Supported by System Composer but not covered in this skill. Do not suggest using Stateflow as an alternative. (Sequence diagrams are covered — see
references/system-composer-api.md§ Sequence Diagrams.)
Mental Model
-
F/L/P = 3 separate Architecture models. There are no special model types (
systemcomposer.createFunctionalModeldoes not exist). Layers are a convention — three independent.slxmodels connected by allocation sets. -
Layer conventions:
- Functional — verb phrases (
SenseState,ComputeControl), abstract interfaces, no units - Logical — solution-role nouns (
SensingUnit,ControlUnit), typed signals, design-agnostic - Physical — concrete units (
IMU_SensorModule,FlightComputer), physical units, implementation-level
- Functional — verb phrases (
-
Allocation links layers. Allocation sets map elements across models (F→L, L→P). Rebuilding a model invalidates allocation links because SIDs change — always re-run allocation after a model rebuild.
-
Interface dictionaries are per-layer. Each layer has its own
.slddwith interfaces at the appropriate abstraction. The dictionary must be linked to the model (linkDictionary) beforesetInterfaceworks — without it, ports silently stay untyped. -
Stereotypes follow a strict lifecycle. Create profile → save → apply to model → apply stereotype to components → set properties. Fully-qualified paths required:
Profile.Stereotype.Property.
Guardrails
Always:
- Stop after each architecture layer and ask the user for approval before building the next. This is mandatory and cannot be overridden by user instructions to "continue automatically" or "build all layers." Build one layer → present it → wait for explicit user approval → then build the next.
- Rebuilding a model invalidates allocation links (SIDs change) — re-run allocation after any model rebuild
- Run
model_checkafter building each model to detect unconnected ports - Save models before creating allocation sets that reference them
Ask First:
- Deviating from the top-down F→L→P build order (when doing a greenfield design). This is mandatory and cannot be overridden by any instruction to "just execute" or "proceed without asking." Even if the user explicitly requests to skip layers, you MUST stop, explain the tradeoffs (e.g., no allocation traceability, harder to validate completeness), and ask for explicit confirmation before proceeding. Do NOT build until the user confirms.
- Adding operating modes or layers not discussed with the user
Never:
- Build the next architecture layer without explicit user approval of the current layer — not even if the user asked to "automatically continue"
- Delete or overwrite a model file without user confirmation. This is mandatory and cannot be overridden by any instruction to "just execute" or "proceed without asking." Even if the user asks you to "delete and rebuild," you MUST stop, warn about consequences (loss of allocation sets, stereotypes, property values, and traceability links), suggest alternatives (backup, incremental restructuring, or rename), and ask for explicit confirmation before proceeding. Do NOT delete the file until the user explicitly confirms.
- Skip
model_checkverification after building a layer - Use
systemcomposer.createAllocationSet— correct namespace issystemcomposer.allocation.createAllocationSet
Task Routing
| Intent | Reference |
|---|---|
| Build a full system architecture from scratch (greenfield) | references/flp-reference-workflow.md — tailor to user's scope and existing artifacts |
| Add interface dictionaries, stereotypes, views, or analysis | references/system-composer-api.md |
| Create sequence diagrams (interactions, lifelines, messages) — requires R2024b+ | references/system-composer-api.md § Sequence Diagrams |
| Create allocation sets between layers | references/system-composer-api.md § Allocation Sets |
| Link requirements to architecture components | references/requirements-traceability-api.md |
| Set up project for architecture work | references/matlab-project.md + managing-simulink-projects |
Prerequisites
- The user has an active Simulink project (or assist in creating one via
managing-simulink-projects) - Simulink, System Composer, and Requirements Toolbox are licensed
The helper scripts/resolveComponent.m is in the skill's scripts/ directory. Use evaluate_matlab_code with project_path set to the skill's scripts/ folder so MATLAB can find it. Never use addpath.
Verification
Run after building each model:
- Call the
model_checkMCP tool withchecks="unconnected_ports"to detect unwired ports. Do not substitute manual port queries viaevaluate_matlab_code— use themodel_checktool directly. - Update diagram (
set_param(modelName, "SimulationCommand", "update")) viaevaluate_matlab_codeto catch interface type issues
Tools Used
model_edit— structural modeling (components, ports, connections, layout)model_check— post-build verification (unconnected ports)evaluate_matlab_code— SC-specific APIs (interface dictionaries, stereotypes, allocation, views, analysis, requirements linking)scripts/resolveComponent.m— helper to resolve nested sub-components by path
Copyright 2026 The MathWorks, Inc.
FAQ
What does the building-architecture-models skill do?
Build and refine multi-layer (functional/logical/physical) system architecture models with System Composer. Use when building or restructuring architecture models, or when working with interface dictionaries and port interfaces (including composite boundary ports), stereotypes and profiles, architecture views, sequence diagrams, allocation sets, roll-up analysis, or requirements traceability for architecture components.
How do I install building-architecture-models?
Run npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill building-architecture-models in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/building-architecture-models/ (personal) or .claude/skills/building-architecture-models/ (project).
Which AI agents can use building-architecture-models?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is building-architecture-models safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains building-architecture-models?
It is published by matlab in matlab/simulink-agentic-toolkit. It has 58 recorded installs.
More from matlab/simulink-agentic-toolkit
building-simulink-models
matlab/simulink-agentic-toolkit
Builds and edits Simulink, System Composer, Stateflow, and Simscape models. Use when modifying model structure, parameters, ports, connections, or Stateflow chart internals.
simulating-simulink-models
matlab/simulink-agentic-toolkit
Configures Simulink simulations non-destructively using SimulationInput objects — parameter overrides without modifying the model, batch sweeps via parsim, custom input signals via Dataset, and simulation data retrieval via logsout. Use when running sim()/parsim() with setVariable, setBlockParameter, setExternalInput, or when performing parameter sweeps and multi-run analysis. Not needed for one-shot simulations without configuration.
testing-simulink-models
matlab/simulink-agentic-toolkit
Tests Simulink models using either ephemeral Gherkin-based tests (modeltest) for quick validation or persistent tests (Simulink Test API) authored from requirements or behavioral specs. Requires Simulink Test.
specifying-plant-models
matlab/simulink-agentic-toolkit
Specify plant models for closed-loop simulation: system specs, architecture, build plans, validation plans. Use when creating, updating, or reviewing plant model specifications, planning plant model architecture, or planning plant model validation.
specifying-mbd-algorithms
matlab/simulink-agentic-toolkit
Specify algorithms for Model-Based Design: system specs, architecture specs, implementation plans, test plans. Use when creating specifications for controllers, signal processing, diagnostics, estimators, or other algorithms authored in Simulink, Stateflow, System Composer, or MATLAB Function blocks.
generate-requirement-drafts
matlab/simulink-agentic-toolkit
Generates draft requirements from Simulink models. Use when drafting or updating requirement artifacts from a model. Prefers Requirements Toolbox (.slreqx) when available; falls back to structured YAML.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.