matlab/agent-skills-playground / demos/mbse-with-agentic-ai/skills/mbse-architecture
mbse-architecture
VerifiedUse this skill for the architecture phases of an MBSE workflow in MATLAB, when writing idempotent buildXxx.m scripts that produce a three-layer RFLPV architecture (Functional, Logical, Physical) with interface dictionaries, stereotype profiles, allocation sets, and requirements Implement links. Trigger for defining stereotype properties, functional-to-logical / logical-to-physical allocation, mapping requirements to components via slreq Implement links, or running quantitative roll-up analysis on the architecture. Do NOT trigger for ad-hoc structural edits to an already-built System Composer model (adding one component, rewiring a port) — use `building-simulink-models` with `model_edit` for that. Works alongside the `system-composer` skill for detailed SC API patterns.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 19.5 KB |
| code/buildAllocation.m | other | 4.3 KB |
| code/buildAllocationSet.m | other | 2.7 KB |
| code/buildMyFunctional.m | other | 2.0 KB |
| code/buildMyLogical.m | other | 2.6 KB |
| code/buildMyModel.m | other | 2.1 KB |
| code/myRollupAnalysis.m | other | 2.6 KB |
| code/resolveComponent.m | other | 1.1 KB |
| code/runMyAnalysis.m | other | 5.1 KB |
| references/analysis.md | markdown | 11.1 KB |
code/myRollupAnalysis.m
View on GitHubfunction myRollupAnalysis(instance, varargin)
% Analysis function template for the canonical System Composer roll-up pattern.
% Save this file under the project's `analysis/` folder (not `scripts/`) — it
% is an analysis artifact, not a build step. The project path includes
% `analysis/`, so the driver resolves the function by name.
%
% Invoke from the driver with:
% iterate(instance, 'PostOrder', @myRollupAnalysis);
%
% PostOrder visits children before parents, so by the time this function runs
% on a parent, every child already has its aggregated value set.
%
% Each block follows the same shape: guard on (isComponent + non-empty
% Components + hasValue), loop children with hasValue guard, setValue at the
% end. The only thing that changes across blocks is the aggregation operator.
% Replace 'MyProfile.Stereotype.*' with your actual profile/stereotype paths.
% --- SUM aggregation (mass, power, cost, volume, …) -------------------------
if instance.isComponent() && ~isempty(instance.Components)...
&& instance.hasValue('MyProfile.Stereotype.mass')
total = 0;
for child = instance.Components
if child.hasValue('MyProfile.Stereotype.mass')
v = child.getValue('MyProfile.Stereotype.mass');
total = total + v;
end
end
instance.setValue('MyProfile.Stereotype.mass', total);
end
% --- MIN aggregation, excluding zeros (throughput bottleneck) ---------------
% Zero-throughput children (controllers, sensors) would otherwise short-circuit
% the min; exclude them so the result reflects producing stages only.
if instance.isComponent() && ~isempty(instance.Components)...
&& instance.hasValue('MyProfile.Stereotype.throughput')
bottleneck = inf;
for child = instance.Components
if child.hasValue('MyProfile.Stereotype.throughput')
v = child.getValue('MyProfile.Stereotype.throughput');
if v > 0 && v < bottleneck, bottleneck = v; end
end
end
if isfinite(bottleneck)
instance.setValue('MyProfile.Stereotype.throughput', bottleneck);
end
end
% --- MEAN aggregation (automation level, utilization, efficiency) -----------
if instance.isComponent() && ~isempty(instance.Components)...
&& instance.hasValue('MyProfile.Stereotype.automationLevel')
vals = [];
for child = instance.Components
if child.hasValue('MyProfile.Stereotype.automationLevel')
vals(end+1) = child.getValue('MyProfile.Stereotype.automationLevel'); %#ok<AGROW>
end
end
if ~isempty(vals)
instance.setValue('MyProfile.Stereotype.automationLevel', mean(vals));
end
end
end
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |