system-composer

Author and debug idempotent MATLAB scripts for System Composer architecture models.

162|31|Updated Oct 25, 2025
One-click install
npx skills add https://github.com/matlab/agent-skills-playground --skill system-composer-matlab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: system-composer
Source: https://github.com/matlab/agent-skills-playground/tree/main/demos/mbse-with-agentic-ai/skills/system-composer
Command: npx skills add https://github.com/matlab/agent-skills-playground --skill system-composer-matlab

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Building reusable System Composer architecture models in MATLAB often fails due to subtle API patterns, interface dictionary resolution timing, connection direction mismatches, and profile/allocation edge cases.

Core Features & Use Cases

  • Architecture-modeling API correctness: Use the right System Composer calls and ordering for createModel, component/port creation, interface assignment, stereotype/profile handling, and allocation sets.
  • Debugging high-friction failures: Diagnose issues like connections not appearing, interfaces not resolving, profile save errors, and createAllocationSet signature mismatches.
  • Reliably idempotent build scripts: Provide a rebuild-safe approach (recreate artifacts, arrange layouts before saving) for architecture + interface dictionary + profile workflows.

Quick Start

Use the system-composer skill to generate an idempotent MATLAB script that creates a System Composer architecture model with typed ports connected via connect(srcPort, dstPort), including interface dictionaries and profiles, and then saves it after explicit layout arrangement.

Frequently Asked Questions about system-composer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I programmatically build a System Composer architecture model using MATLAB scripting?

Programmatically building a System Composer architecture model requires an idempotent MATLAB script that uses the architecture-modeling API to create components, assign typed ports, apply stereotypes, and establish correct port connection ordering.

Why does the connect function fail to create port connections in my System Composer model?

Port connections fail in System Composer models due to call-order mistakes and connection direction mismatches. Ensuring correct `connect(srcPort, dstPort)` dispatch and resolving interface dictionaries before connecting ports prevents missing connections.

How do I ensure my MATLAB script is idempotent when rebuilding architecture models and interface dictionaries?

To ensure idempotent builds for architecture models, your MATLAB script must recreate artifacts from scratch, arrange layouts explicitly, and save interface dictionaries properly using `dict.save` followed by re-fetching before finalizing the model.

What causes unresolved interface dictionaries when applying stereotypes and profiles in System Composer?

Unresolved interface dictionaries occur when profile save errors and dictionary resolution timing are mishandled. Properly saving the `.sldd` file and re-fetching the interface before applying profiles ensures stereotypes resolve correctly.

Does System Composer architecture modeling support block-diagram edits for Simulink models?

System Composer architecture modeling does not support block-diagram edits, as those are intended for Simulink models. The architecture-modeling API strictly enforces separation from block-diagram edits to maintain structural integrity.

How do I fix createAllocationSet signature mismatches during architecture verification?

Fixing createAllocationSet signature mismatches during architecture verification requires using the correct API call patterns for allocation sets and ensuring sequence and interaction-aware verification parameters match the System Composer schema.