Architecture and structuring guidance for Wolfram System Modeler / Modelica (.mo) models and libraries. Use this skill BEFORE writing equations whenever creating, implementing, structuring, or refactoring a model or library, to decide component decomposition, connectors, component reuse, file/folder layout, units, and naming. Triggers on phrases like 'create/build a Modelica model', 'implement this model/paper in Modelica', 'make a WSM model', 'write a Modelica library', 'structure/architect this model', 'single .mo file vs directory', 'split this into components', 'refactor this model/library', or any decomposition / connector / component-reuse / file-layout decision. Whenever you are about to write a multi-class library, consult this skill first to choose directory-form (one class per file) storage rather than a single monolithic .mo. Complements the validate/simulate/diagnose/annotate Modelica skills; for assembling a specific component library (e.g. create-hydraulic-model) defer to that domain skill.
Use this when creating or restructuring a WSM/Modelica model or library —
before writing equations. This skill covers the architecture and structuring
decisions that come first (sections 1-7), then the library conventions —
naming, plots, documentation HTML, testing, icons, library shape — that a model
or library must meet before it is "done" (sections 8-9). Read sections 8-9
before declaring a library done.
The default in Modelica is object-oriented decomposition into reusable
components. Reach for a flat all-in-one model only under the explicit
exception in section 5.
Working method
Propose a step-by-step plan and wait for explicit approval before any edit.
Present it as numbered steps.
Offer the user a "one-shot" option: they may approve the whole sequence at
once and have you execute it end to end without stopping between steps.
If the user takes the one-shot option, first state the choices you will make
autonomously — the decisions you would otherwise have stopped to ask about
(e.g. authoring GettingStarted/Introduction, storing example result plots,
adding icons, how far to decompose). One-shot suppresses the questions, not the
decisions; surfacing the defaults up front lets the user veto before you build.
When creating a library, recommend a parallel test library from the start.
Add a unit test for each component as you build it — not at the end.
Never delete the user's model files to "start clean." When the toolchain
errors, fix the code forward — a validate/simulate failure is almost always a
wrong name or missing load, not a reason to throw the work away. Deleting files
to reset loses work and is rarely what the user wants.
1. Reuse before building (priority order)
When you need a component (or a connector), look in this order and only build
new if nothing fits:
MSL — the Modelica Standard Library.
The user's own Git-repo libraries (e.g. what lives in their repo).
The same order applies to connectors: reuse a standard connector
(Modelica.Blocks.Interfaces, mechanical Flange, electrical Pin,
Thermal.HeatPort, Fluid ports, ...) before inventing one.
Ground every MSL name in the docs — do not recall paths from memory. MSL
component paths are easy to misremember: there is no Modelica.Blocks.Math.Sine
(sine is Modelica.Blocks.Sources.Sine), no Math.Subtract (use
Math.Feedback for u1 - u2, or Math.Add with k2 = -1), and no
Nonlinear.Saturation (the saturation block is Nonlinear.Limiter). Before you
write an MSL class name, confirm it with the search-modelica-docs skill. If a
later validate reports Element not found ... in Modelica..., the path is wrong
— look the correct one up with search-modelica-docs; do not grep or walk
the System Modeler install tree hunting for it.
2. Components by default; design the connector first
Whether something should be a component hinges on the interface, not the
part. Componentize where you can draw a clean connector:
a small, stable set of physically-conjugate effort/flow pairs
(v/i, p/m_flow, f/v, T/Q_flow);
regime-independent — the variables crossing don't change meaning with
global state;
low-bandwidth — you're not smuggling a neighbour's internal state across.
If a cut would force a wide or regime-dependent connector, or would break a
global constraint that no single component owns, the boundary is in the
wrong place: move it, or keep just that coupled residue together.
Use flow for conserved quantities and stream for transported fluid
properties.
3. Composition vs inheritance (two reuse axes - don't conflate)
Composition (instantiate + connect): "is made of" — distinct physical
parts wired in the diagram.
Inheritance (partial base + extends): "is a kind of" — variants that
share equation structure (e.g. two heat exchangers sharing the same balance
and wall equations).
4. Granularity
Decompose at real engineering joints — the parts an engineer would name
(pump, valve, wall, zone). Avoid trivial one-variable wrappers, and do not merge
genuinely simultaneous physics that has no clean internal interface.
5. Monolith exception
A single all-equations model is acceptable only as a first correctness pass
on a numerically hard model. When you do it:
say so explicitly, and
end with a concrete written decomposition proposal — name the components
and the connector or partial base each would become — not an open-ended offer
to "refactor later".
Even when no clean connector exists (a tightly coupled DAE — shared pressure
state, regime-dependent coupling), still factor the reusable equation
structure into partial base classes and functions (see section 3). A model
that derives a generic control volume, then specialises it, is decomposed even if
its zones cannot be cut into separately-connected components.
Never present a monolith as the finished structure.
6. One class per file (for version control)
One-off model vs library. If the user just wants a single throwaway model
(not a reusable library), write one self-contained .mo file holding that
model — it is simpler to author, validate, and simulate. Reach for the
directory form below only when building a library or a genuinely multi-class
model.
Store libraries in directory form:
package.mo + package.order at each level,
subpackages as folders,
each model / block / function / record / connector in its own
Name.mo.
This makes version handling far easier: granular diffs, fewer merge conflicts,
per-component blame and review. Exception: a few tiny, tightly-coupled leaf
classes (e.g. some Types) may share a file.
Names must be valid Modelica identifiers. A package/class name — and the
directory or file that holds it — is letters, digits, and underscores only, and
must not start with a digit: no hyphens or spaces (inverted-pendulum is
illegal; use InvertedPendulum). A directory-form library's folder name must
equal its package name, and the dotted --name you pass the launcher (e.g.
InvertedPendulum.Controller) is built from these identifiers.
7. Units - always declare
Every variable/parameter that has a unit must declare it, in this priority:
An SI type from Modelica.Units.SI (e.g. SI.Pressure p).
Else a NonSI type from Modelica.Units.NonSI.
Else the unit= attribute (e.g. Real areaPerLength(unit="m2/m")).
Signals flowing through connectors are SI; use displayUnit for friendly
labels (note a displayUnit default needs a literal value).
Use the MSL 4.x names — this toolchain ships MSL 4.x, and the old 3.2 names
flatten with confusing "not found" errors. Write Modelica.Units.SI.* (not
Modelica.SIunits.*), and source frequency is f= (not freqHz=). Declare the
dependency as annotation(uses(Modelica(version = "4.1.0"))).
8. Conventions
These are the library conventions every WSM/Modelica model and library must
follow. Sections 8a-8h are the detail behind the section 9 checklist.
8a. Naming and code
camelCase, no underscores for parameters and variables, starting lower
case (heatSource), following the
MSL naming conventions.
Use meaningful names — enthalpy, not h.
Avoid any tool-dependent code, so the library stays tool-independent.
Store all external resources (images, CAD, PDFs) in a Resources folder in
the library directory, referenced via Modelica URIs (never raw paths); use
only resources you have the rights to use.
Review experiment settings (time unit, solver, tolerance, step) so they are
relevant for each example.
8b. Units
Covered in section 7 — every variable/parameter with a unit declares it (SI type
→ NonSI type → unit= attribute). Signals through connectors are SI; use
displayUnit for friendly labels.
8c. Documentation text
All classes documented; all parameters and variables, including
protected, have a one-line description.
First character uppercase; for one-line descriptions of params, variables,
and classes, no trailing period.
Spelling and grammar must be correct.
Do not set custom font style/size styling.
Write library names spaced ("Rotating Machinery", not "RotatingMachinery").
Wrap component, class, variable, and instance names in the text with <code>.
8d. HTML documentation
Use only <h4> and <h5> headings — never <h1>-<h3> (those are used by
the auto-generated docs). Headings must not end with a :.
Each component's doc, in this order: general information (how the class
works, no subsections) → References (relevant articles) → optionally
Implementation, Limitations, Notes, Examples, Acknowledgments
(in that order).
Put any revision history in annotation(Documentation(revisions="..."));
"what's new" goes in the revisions, e.g.:
<h4>New in Version 1.2.0</h4>
<ul>
<li>Library is now available for free for Wolfram System Modeler users</li>
</ul>
8e. Plot styling
Add model plots to the library examples; set at least one as the default
plot.
Plot titles and legends should be meaningful. Raw component paths are fine
when already clear (e.g. R1.v, R2.v); replace them only when the default is
ambiguous or unwieldy (deep nesting, generic names like .y).
Plot titles: sentence case, no trailing period (e.g. "Fuel consumption of
an aircraft"). Legends: start uppercase, no trailing period.
Explores are optional (prefer them for faster simulations); control-panel names
and explore parameter descriptions start uppercase.
8f. Appearance / icons and availability
Every class has an icon. Follow the
MSL icon conventions,
except the %name text uses color {64, 64, 64}.
State which platforms (Mac, Windows, Linux) the library supports, with good
reasons for any exclusion.
Declare all dependencies with uses annotations, including the MSL version
(e.g. uses(Modelica(version = "4.1.0"))). State any additional software
needed.
8g. Library structure and documentation shape
Every library's top-level package.order starts with the same three nodes, in
this order, then the library-specific components/subpackages:
GettingStarted ← always present, info-only model
Conventions ← encouraged; omit only when no cross-cutting reference exists
Examples ← always present, runnable models
...Components (with Utilities, Types), other subpackages...
GettingStarted and Conventions are info-only models (not packages):
preferredView = "info", DocumentationClass = true. Fold any existing
Introduction / Troubleshooting into Conventions (or, if substantial, keep
Troubleshooting as a sibling with a consistent shape).
The top-level package.mo doc is the library elevator pitch: a one/two-
paragraph summary, a short linked list of 4-8 core abstractions, three "where to
go next" links (GettingStarted / Conventions / Examples), and a
<h4>References</h4> section if applicable. It must not duplicate
GettingStarted or Conventions.
GettingStarted skeleton (same sections, same order): one-paragraph summary
→ Building Blocks (linked core components) → Worked example (diagram
screenshots + a simulation plot) → Next steps (links to Conventions and
Examples).
Conventions skeleton (always these <h5> sections, in order): Symbols &
Notation → Units & Display Units → Connectors & Sign Conventions → Styling →
References. Keep a heading even when its content is one line.
Examples is a package (subpackage it by category past ~8 examples). Each
example documents its purpose and what to observe after simulating, and
should preferably cover all main components in the library.
Cross-link with Modelica URIs (modelica://Library.Path.Class), never raw
HTML paths. Every GettingStarted ends with Next steps; every Conventions
opens with a one-line link to GettingStarted; link components to confusable
siblings.
8h. Testing
Create a parallel test library named <Library>Tests (e.g. Hydraulic ->
HydraulicTests). Every component gets its corresponding unit test(s) there as
it is created, not at the end.
If the example models do not cover every component, the test library must
exercise the remaining ones.
9. Definition of done
A model or library is not "done" — and success must not be reported — until these
hold:
Each class validates, and examples build/simulate, without warnings
(justify any exception).
Every class has an icon (invoke the annotate-modelica-graphics skill)
and a one-line description; every parameter/variable, including protected,
has a description and — where it has one — a unit.
Every example documents its purpose and what to observe, and carries
stored result-plot annotations (figures=, at least one default plot) —
invoke the annotate-modelica-plots skill once it simulates. Give each figure
an identifiable title and a one-line caption; if the model replicates a
published reference, name figures to match it (e.g. "Fig. 6 - …") and note
the correspondence in the caption. (Pure pass/fail assertion tests need no
figure; anything meant to be simulated and inspected does.)
Every component has a unit test in the parallel <Library>Tests.
The library follows the three-slot top-level shape — GettingStarted,
Conventions, Examples first in package.order (section 8g).
If a monolith was used, a concrete decomposition proposal is on the
table (section 5).
Treat this as a checklist to run through and report against, not a list to skim.
1---2name: modelica-model-architecture3description: Architecture and structuring guidance for Wolfram System Modeler / Modelica (.mo) models and libraries. Use this skill BEFORE writing equations whenever creating, implementing, structuring, or refactoring a model or library, to decide component decomposition, connectors, component reuse, file/folder layout, units, and naming. Triggers on phrases like 'create/build a Modelica model', 'implement this model/paper in Modelica', 'make a WSM model', 'write a Modelica library', 'structure/architect this model', 'single .mo file vs directory', 'split this into components', 'refactor this model/library', or any decomposition / connector / component-reuse / file-layout decision. Whenever you are about to write a multi-class library, consult this skill first to choose directory-form (one class per file) storage rather than a single monolithic .mo. Complements the validate/simulate/diagnose/annotate Modelica skills; for assembling a specific component library (e.g. create-hydraulic-model) defer to that domain skill.4---56# WSM / Modelica model architecture78Use this when creating or restructuring a WSM/Modelica model or library —9**before** writing equations. This skill covers the architecture and structuring10decisions that come first (sections 1-7), then the library conventions —11naming, plots, documentation HTML, testing, icons, library shape — that a model12or library must meet before it is "done" (sections 8-9). Read sections 8-913before declaring a library done.1415The default in Modelica is **object-oriented decomposition into reusable16components**. Reach for a flat all-in-one model only under the explicit17exception in section 5.1819## Working method2021- Propose a **step-by-step** plan and wait for explicit approval before any edit.22 Present it as numbered steps.23- Offer the user a **"one-shot"** option: they may approve the whole sequence at24 once and have you execute it end to end without stopping between steps.25- If the user takes the one-shot option, **first state the choices you will make26 autonomously** — the decisions you would otherwise have stopped to ask about27 (e.g. authoring `GettingStarted`/`Introduction`, storing example result plots,28 adding icons, how far to decompose). One-shot suppresses the questions, not the29 decisions; surfacing the defaults up front lets the user veto before you build.30- When creating a library, recommend a **parallel test library** from the start.31 Add a unit test for each component as you build it — not at the end.32- **Never delete the user's model files to "start clean."** When the toolchain33 errors, fix the code forward — a validate/simulate failure is almost always a34 wrong name or missing load, not a reason to throw the work away. Deleting files35 to reset loses work and is rarely what the user wants.3637## 1. Reuse before building (priority order)3839When you need a component (or a connector), look in this order and only build40new if nothing fits:41421. **MSL** — the Modelica Standard Library.432. **The user's own Git-repo libraries** (e.g. what lives in their repo).443. **Wolfram libraries** — bundled / add-on WSM libraries.454. **Your own component** — last resort.4647The same order applies to connectors: reuse a standard connector48(`Modelica.Blocks.Interfaces`, mechanical `Flange`, electrical `Pin`,49`Thermal.HeatPort`, `Fluid` ports, ...) before inventing one.5051**Ground every MSL name in the docs — do not recall paths from memory.** MSL52component paths are easy to misremember: there is no `Modelica.Blocks.Math.Sine`53(sine is `Modelica.Blocks.Sources.Sine`), no `Math.Subtract` (use54`Math.Feedback` for `u1 - u2`, or `Math.Add` with `k2 = -1`), and no55`Nonlinear.Saturation` (the saturation block is `Nonlinear.Limiter`). Before you56write an MSL class name, confirm it with the **search-modelica-docs** skill. If a57later validate reports `Element not found ... in Modelica...`, the path is wrong58— look the correct one up with **search-modelica-docs**; **do not** grep or walk59the System Modeler install tree hunting for it.6061## 2. Components by default; design the connector first6263Whether something should be a component hinges on the **interface**, not the64part. Componentize where you can draw a clean connector:6566- a **small, stable set of physically-conjugate effort/flow pairs**67 (`v`/`i`, `p`/`m_flow`, `f`/`v`, `T`/`Q_flow`);68- **regime-independent** — the variables crossing don't change meaning with69 global state;70- **low-bandwidth** — you're not smuggling a neighbour's internal state across.7172If a cut would force a wide or regime-dependent connector, or would break a73**global constraint** that no single component owns, the boundary is in the74wrong place: move it, or keep just that coupled residue together.7576Use `flow` for conserved quantities and `stream` for transported fluid77properties.7879## 3. Composition vs inheritance (two reuse axes - don't conflate)8081- **Composition** (instantiate + connect): *"is made of"* — distinct physical82 parts wired in the diagram.83- **Inheritance** (`partial` base + `extends`): *"is a kind of"* — variants that84 share equation structure (e.g. two heat exchangers sharing the same balance85 and wall equations).8687## 4. Granularity8889Decompose at **real engineering joints** — the parts an engineer would name90(pump, valve, wall, zone). Avoid trivial one-variable wrappers, and do not merge91genuinely simultaneous physics that has no clean internal interface.9293## 5. Monolith exception9495A single all-equations model is acceptable **only** as a first correctness pass96on a numerically hard model. When you do it:9798- say so explicitly, and99- end with a **concrete written decomposition proposal** — name the components100 and the connector or `partial` base each would become — not an open-ended offer101 to "refactor later".102103Even when no clean connector exists (a tightly coupled DAE — shared pressure104state, regime-dependent coupling), still factor the reusable **equation105structure** into `partial` base classes and functions (see section 3). A model106that derives a generic control volume, then specialises it, is decomposed even if107its zones cannot be cut into separately-connected components.108109Never present a monolith as the finished structure.110111## 6. One class per file (for version control)112113**One-off model vs library.** If the user just wants a single throwaway model114(not a reusable library), write **one self-contained `.mo` file** holding that115model — it is simpler to author, validate, and simulate. Reach for the116directory form below only when building a library or a genuinely multi-class117model.118119Store libraries in **directory form**:120121- `package.mo` + `package.order` at each level,122- subpackages as folders,123- **each `model` / `block` / `function` / `record` / `connector` in its own124 `Name.mo`**.125126This makes version handling far easier: granular diffs, fewer merge conflicts,127per-component blame and review. Exception: a few tiny, tightly-coupled leaf128classes (e.g. some `Types`) may share a file.129130**Names must be valid Modelica identifiers.** A package/class name — and the131directory or file that holds it — is letters, digits, and underscores only, and132must not start with a digit: **no hyphens or spaces** (`inverted-pendulum` is133illegal; use `InvertedPendulum`). A directory-form library's folder name must134equal its package name, and the dotted `--name` you pass the launcher (e.g.135`InvertedPendulum.Controller`) is built from these identifiers.136137## 7. Units - always declare138139Every variable/parameter that has a unit **must** declare it, in this priority:1401411. An **SI type** from `Modelica.Units.SI` (e.g. `SI.Pressure p`).1422. Else a **NonSI type** from `Modelica.Units.NonSI`.1433. Else the **`unit=` attribute** (e.g. `Real areaPerLength(unit="m2/m")`).144145Signals flowing through connectors are SI; use `displayUnit` for friendly146labels (note a `displayUnit` default needs a literal value).147148Use the **MSL 4.x** names — this toolchain ships MSL 4.x, and the old 3.2 names149flatten with confusing "not found" errors. Write `Modelica.Units.SI.*` (not150`Modelica.SIunits.*`), and source frequency is `f=` (not `freqHz=`). Declare the151dependency as `annotation(uses(Modelica(version = "4.1.0")))`.152153## 8. Conventions154155These are the library conventions every WSM/Modelica model and library must156follow. Sections 8a-8h are the detail behind the section 9 checklist.157158### 8a. Naming and code159160- **camelCase, no underscores** for parameters and variables, starting lower161 case (`heatSource`), following the162 [MSL naming conventions](https://reference.wolfram.com/system-modeler/libraries/Modelica/Modelica.UsersGuide.Conventions.ModelicaCode.Naming.html).163- Use **meaningful names** — `enthalpy`, not `h`.164- Avoid any **tool-dependent** code, so the library stays tool-independent.165- Store all external resources (images, CAD, PDFs) in a **`Resources`** folder in166 the library directory, referenced via **Modelica URIs** (never raw paths); use167 only resources you have the rights to use.168- Review **experiment settings** (time unit, solver, tolerance, step) so they are169 relevant for each example.170171### 8b. Units172173Covered in section 7 — every variable/parameter with a unit declares it (SI type174→ NonSI type → `unit=` attribute). Signals through connectors are SI; use175`displayUnit` for friendly labels.176177### 8c. Documentation text178179- **All classes documented**; **all parameters and variables, including180 `protected`,** have a one-line description.181- First character **uppercase**; for one-line descriptions of params, variables,182 and classes, **no trailing period**.183- Spelling and grammar must be correct.184- **Do not** set custom font style/size styling.185- Write library names **spaced** ("Rotating Machinery", not "RotatingMachinery").186- Wrap component, class, variable, and instance names in the text with `<code>`.187188### 8d. HTML documentation189190- Use only `<h4>` and `<h5>` headings — **never `<h1>`-`<h3>`** (those are used by191 the auto-generated docs). Headings must **not** end with a `:`.192- Each component's doc, in this order: **general information** (how the class193 works, no subsections) → **References** (relevant articles) → optionally194 **Implementation**, **Limitations**, **Notes**, **Examples**, **Acknowledgments**195 (in that order).196- Put any **revision history** in `annotation(Documentation(revisions="..."))`;197 "what's new" goes in the revisions, e.g.:198 ```199 <h4>New in Version 1.2.0</h4>200 <ul>201 <li>Library is now available for free for Wolfram System Modeler users</li>202 </ul>203 ```204205### 8e. Plot styling206207- Add model plots to the library examples; set **at least one as the default208 plot**.209- Plot titles and legends should be **meaningful**. Raw component paths are fine210 when already clear (e.g. `R1.v`, `R2.v`); replace them only when the default is211 ambiguous or unwieldy (deep nesting, generic names like `.y`).212- Plot titles: **sentence case, no trailing period** (e.g. "Fuel consumption of213 an aircraft"). Legends: start **uppercase**, no trailing period.214- Explores are optional (prefer them for faster simulations); control-panel names215 and explore parameter descriptions start uppercase.216217### 8f. Appearance / icons and availability218219- **Every class has an icon.** Follow the220 [MSL icon conventions](https://reference.wolfram.com/system-modeler/libraries/Modelica/Modelica.UsersGuide.Conventions.Icons.html),221 except the `%name` text uses color `{64, 64, 64}`.222- State which **platforms** (Mac, Windows, Linux) the library supports, with good223 reasons for any exclusion.224- Declare **all dependencies with `uses` annotations**, including the MSL version225 (e.g. `uses(Modelica(version = "4.1.0"))`). State any additional software226 needed.227228### 8g. Library structure and documentation shape229230Every library's top-level `package.order` starts with the same three nodes, in231this order, then the library-specific components/subpackages:232233```234GettingStarted ← always present, info-only model235Conventions ← encouraged; omit only when no cross-cutting reference exists236Examples ← always present, runnable models237...Components (with Utilities, Types), other subpackages...238```239240- `GettingStarted` and `Conventions` are **info-only models** (not packages):241 `preferredView = "info"`, `DocumentationClass = true`. Fold any existing242 `Introduction` / `Troubleshooting` into `Conventions` (or, if substantial, keep243 `Troubleshooting` as a sibling with a consistent shape).244- The top-level `package.mo` doc is the **library elevator pitch**: a one/two-245 paragraph summary, a short linked list of 4-8 core abstractions, three "where to246 go next" links (`GettingStarted` / `Conventions` / `Examples`), and a247 `<h4>References</h4>` section if applicable. It must not duplicate248 `GettingStarted` or `Conventions`.249- **`GettingStarted` skeleton** (same sections, same order): one-paragraph summary250 → **Building Blocks** (linked core components) → **Worked example** (diagram251 screenshots + a simulation plot) → **Next steps** (links to `Conventions` and252 `Examples`).253- **`Conventions` skeleton** (always these `<h5>` sections, in order): Symbols &254 Notation → Units & Display Units → Connectors & Sign Conventions → Styling →255 References. Keep a heading even when its content is one line.256- `Examples` is a `package` (subpackage it by category past ~8 examples). Each257 example documents its **purpose** and **what to observe** after simulating, and258 should preferably cover all main components in the library.259- **Cross-link with Modelica URIs** (`modelica://Library.Path.Class`), never raw260 HTML paths. Every `GettingStarted` ends with Next steps; every `Conventions`261 opens with a one-line link to `GettingStarted`; link components to confusable262 siblings.263264### 8h. Testing265266- Create a **parallel test library** named `<Library>Tests` (e.g. `Hydraulic` ->267 `HydraulicTests`). Every component gets its corresponding unit test(s) there **as268 it is created**, not at the end.269- If the example models do not cover every component, the test library must270 exercise the remaining ones.271272## 9. Definition of done273274A model or library is not "done" — and success must not be reported — until these275hold:276277- [ ] Each class **validates**, and examples **build/simulate**, without warnings278 (justify any exception).279- [ ] Every class has an **icon** (invoke the `annotate-modelica-graphics` skill)280 and a one-line description; every parameter/variable, including `protected`,281 has a description and — where it has one — a unit.282- [ ] Every **example** documents its purpose and what to observe, and carries283 **stored result-plot annotations** (`figures=`, at least one default plot) —284 invoke the `annotate-modelica-plots` skill once it simulates. Give each figure285 an identifiable **title** and a one-line **`caption`**; if the model replicates a286 published reference, **name figures to match it** (e.g. `"Fig. 6 - …"`) and note287 the correspondence in the caption. (Pure pass/fail assertion tests need no288 figure; anything meant to be simulated and *inspected* does.)289- [ ] Every component has a **unit test** in the parallel `<Library>Tests`.290- [ ] The library follows the three-slot top-level shape — **`GettingStarted`**,291 **`Conventions`**, **`Examples`** first in `package.order` (section 8g).292- [ ] If a monolith was used, a concrete **decomposition proposal** is on the293 table (section 5).294295Treat this as a checklist to run through and report against, not a list to skim.
Run npx skillmds@latest add wolframresearch/modelica-model-architecture in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Architecture and structuring guidance for Wolfram System Modeler / Modelica (.mo) models and libraries. Use this skill BEFORE writing equations whenever creating, implementing, structuring, or refactoring a model or library, to decide component decomposition, connectors, component reuse, file/folder layout, units, and naming. Triggers on phrases like 'create/build a Modelica model', 'implement this model/paper in Modelica', 'make a WSM model', 'write a Modelica library', 'structure/architect this model', 'single .mo file vs directory', 'split this into components', 'refactor this model/library', or any decomposition / connector / component-reuse / file-layout decision. Whenever you are about to write a multi-class library, consult this skill first to choose directory-form (one class per file) storage rather than a single monolithic .mo. Complements the validate/simulate/diagnose/annotate Modelica skills; for assembling a specific component library (e.g. create-hydraulic-model) defer to that domain skill. It is listed under Web & Frontend on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
WolframResearch (@wolframresearch) published this skill. Their other Agent Skills are listed on their SkillMD profile.