跳到正文
FunCoding

搜索

搜索文档、Skill 和 MCP

building-architecture-models

Common steps for building multi-layer system architecture models using System Composer. Use when implementing architecture models or when interacting with interface dictionaries, allocation sets, stereotypes, and requirements for architecture components.

代码质量与审查1.2kskills-catalog/model-based-system-engineering/building-architecture-models/SKILL.md

安装

把这段话发给 Claude Code、Codex 或 Cursor。智能体会先检查安全性,你确认后才安装。

读取 https://funcoding.ai/skills/matlab/simulink-agentic-toolkit/building-architecture-models/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

Building Architecture Models

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) → use building-simulink-models
  • One-off structural edits to an existing SC model (add a component, rewire a port) → use building-simulink-models with model_edit
  • User doesn't have a clear decomposition or requirements yet → suggest specifying-mbd-algorithms to produce a spec first, then return here to build
  • Creating activity/sequence behavior diagrams → These are supported features of System Composer, but are not covered in this skill. Do not suggest using Stateflow as an alternative.

Mental Model

  1. F/L/P = 3 separate Architecture models. There are no special model types (systemcomposer.createFunctionalModel does not exist). Layers are a convention — three independent .slx models connected by allocation sets.

  2. 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
  3. 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.

  4. Interface dictionaries are per-layer. Each layer has its own .sldd with interfaces at the appropriate abstraction. The dictionary must be linked to the model (linkDictionary) before setInterface works — without it, ports silently stay untyped.

  5. 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:

  • Get user review and approval before moving to the next phase
  • Rebuilding a model invalidates allocation links (SIDs change) — re-run allocation after any model rebuild
  • Run model_check after 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)
  • Adding operating modes or layers not discussed with the user

Never:

  • Delete or overwrite a model file without user confirmation
  • Skip model_check verification after building a layer
  • Use systemcomposer.createAllocationSet — correct namespace is systemcomposer.allocation.createAllocationSet

Task Routing

IntentReference
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 analysisreferences/system-composer-api.md
Create allocation sets between layersreferences/system-composer-api.md § Allocation Sets
Link requirements to architecture componentsreferences/requirements-traceability-api.md
Set up project for architecture workreferences/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:

  • model_check with checks="unconnected_ports" to detect unwired ports
  • Update diagram (set_param(modelName, "SimulationCommand", "update")) to 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.


相似的 Skill

claude-api
anthropics/skills180k

claude-api

Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).

代码质量与审查

ponytail-review
DietrichGebert/ponytail158k

ponytail-review

Quality review of a change: is the logic right, is it safe, does it hold under real load, is risky code tested, is it fast enough, and is every line needed. Reads the connected code, not only the diff. Each finding is explained in plain English. Use for "review this", "code review", "review the last commit", "review my PR", "is this over-engineered", /ponytail-review.

代码质量与审查

code-review-and-quality
addyosmani/agent-skills103k

code-review-and-quality

Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch. Use when asked to review a diff or a pull request, even when the diff is pasted inline.

代码质量与审查

documentation-and-adrs
addyosmani/agent-skills103k

documentation-and-adrs

Records decisions and documentation. Use when you need to document an architecture decision (ADR) or the reasoning behind a design choice, when changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.

代码质量与审查

code-simplification
addyosmani/agent-skills103k

code-simplification

Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

代码质量与审查

understand
Egonex-AI/Understand-Anything86k

understand

Analyze a codebase to produce an interactive knowledge graph for understanding architecture, components, and relationships

代码质量与审查