Simscape Write Ssc logo

Simscape Write Ssc

OrganizationPopular
matlab
simscape-write-ssc

Use when writing or editing Simscape Language (.ssc) source files — components, domains, or functions. Triggers include: model a physical component in .ssc; write physical equations for a Simscape block; add or modify physics or parameterization options in a Simscape component; build a composite component. Also use for validating .ssc syntax, fixing Simscape Language errors, or converting governing equations into working Simscape component code. Do NOT use for configuring or connecting existing Simscape blocks in a Simulink model — that is model building, not language authoring.

Overview

Publishermatlab
Repositorysimulink-agentic-toolkit
Skill namesimscape-write-ssc
Stars
1.2K
Forks
112
Bundled files
32
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 32 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by matlab on GitHub. Read the source before you install it.

Installation

Install the Simscape Write Ssc AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/physical-modeling/simscape-write-ssc
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/matlab/simulink-agentic-toolkit.git /tmp/simulink-agentic-toolkit
mkdir -p .claude/skills
cp -r /tmp/simulink-agentic-toolkit/skills-catalog/physical-modeling/simscape-write-ssc .claude/skills/simscape-write-ssc
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Simscape Write Ssc in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Simscape Write Ssc on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Simscape Write Ssc is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Simscape Language Authoring

Write .ssc files (components, domains, functions) that pass validation and are physically correct.

When to Use

  • Writing a new .ssc component, domain, or function from scratch
  • Adding or modifying physics, equations, or parameterization in an existing .ssc file
  • Converting governing equations into a working Simscape component
  • Adding mode charts, events, or switching logic to a component
  • Building a composite component that connects subcomponents together
  • Fixing Simscape Language syntax or validation errors

When NOT to Use

  • Configuring or connecting existing Simscape blocks in a Simulink model — use building-simulink-models instead
  • Simulating a model or inspecting results — use simulating-simulink-models
  • Setting block parameters from MATLAB or a script without editing .ssc source

Workflow

Designing a component

Below are the sections that make up a Simscape component. Include only what is needed.

nodes, inputs, outputs

  • nodes — quantity participates in bilateral energy exchange (the network enforces Across equalization + Through summation).
  • inputs — physical signal imposed from outside (control signal, environment).
  • outputs — physical signal for a measurement or computed result.

Node ports have a domain. Reuse an existing one, especially foundation; author a custom domain only when none covers the physics.

PhysicsDomain path
Electrical (single-phase)foundation.electrical.electrical
Rotational mechanicalfoundation.mechanical.rotational.rotational
Translational mechanicalfoundation.mechanical.translational.translational
Thermal (heat transfer)foundation.thermal.thermal

For fluid domains, polyphase electrical, position/angle-based mechanical variants, or any domain not in the table, you must read: references/foundation/domain-selection.md.

parameters, variables

Parameters — user-configurable inputs; part of the interface.

  • Expose as parameters for physical quantities the engineer sets (resistances, dimensions, thresholds).
  • Use parameters(Access=private) for quantities computed from other parameters. Use intermediates when the value depends on a runtime value.
  • Defaults: physically typical values, so the component works out of the box.

Variables — differential, algebraic, or event.

  • Differential (appear in der(x)): set priority.high; use an initial equation only when the start depends on another variable rather than a fixed/parameter value — never both.
  • Event: declare (Event = true)

Visibility (both): default Access = public, ExternalAccess = modify for user-facing items. Access = private + ExternalAccess = none for pure implementation detail; protected + observe for internal quantities that subclasses or logging should see.

Units — declare everywhere. Every parameter and variable carries a unit ({value, 'unit'}, or '1' for dimensionless). Simscape validates commensurability at compile time and auto-converts across the network. Declare in the unit the engineer naturally uses (mm, deg, bar). A bare number is a silent mismatch waiting to happen.

Compile-time vs. runtime conditionals (if)

  • Interface items (ports, variables the user sees): declared unconditionally (public). Use conditional annotations + ExternalAccess to hide/show them based on a parameter — they remain part of the interface but become invisible in inactive variants.
  • Internal items (hidden variables, internal equations): prefer compile-time if (top-level, parameter-guarded) to eliminate them entirely — reduces states, logging, and solver work.
  • Runtime if (inside equations): use when the governing equation changes at runtime. Must have an else branch. Equation count/dimensionality must be identical in every branch.

equations, intermediates, components, connections, for, modecharts, events, annotations

SectionInclude when
equationscontinuous relationships (== is symmetric equality), assert for parameter validation, equations (Initial=true) for init-only constraints
intermediatesfactor a reused subexpression or want it logged
components / connectionsassembling from existing subcomponents (composite)
forarrays of components or nodes
modechartsthe component has discrete operating states, each with a structurally different equation set (different equation counts, or der terms that come/go) — and transitions between them, possibly with hysteresis. Overkill when a smooth approximation (tanh, tablelookup) or runtime if with identical equation counts fits.
eventsupdate variables(Event=true) (latches, sample-hold, one-shot triggers) at discrete instants via edge() / initialevent. Prefer modecharts when suitable.
annotationsconditional visibility (ExternalAccess overrides), icons (Icon), dialog tabs (UILayout), port sides (Side), logging units (LoggingUnit), fault modeling (Faults), or unit dropdowns (UnitDropdown)
setupnever — deprecated; use assert in equations instead

Write the .ssc file

Write for textbook readability — equations should read as physics. Match the surrounding library's conventions when editing an existing file.

Validate

simscape.agentic.sscIssues (in scripts/+simscape/+agentic/) takes the fully qualified name of a Simscape component, domain, or function and prints diagnostics or "No issues found." Run it with evaluate_matlab_code, project_path set to the skill's scripts/ folder so MATLAB can find the package. Fix reported issues and re-validate until clean.

matlab
simscape.agentic.sscIssues("mylib.components.MyComponent")

Pass the fully qualified name — dot-separated namespaces, not a file path. A file at +mylib/+components/MyComponent.ssc on the MATLAB path is named mylib.components.MyComponent. The function errors if the name is not on the path or does not resolve to a .ssc/.sscp file.

Setting project_path changes the current folder, so the working folder and the files the component references may drop off the path. A not found on the MATLAB search path error, or a Validation failed: diagnostic naming a missing referenced file, is a path problem — not a bug in the .ssc. Add necessary folders to the path before treating diagnostics as real.

Reference files (references/)

Each file is self-contained. Read only what you need.

references/
  composition/
    arrays-of-nodes.md
    composite-components-and-connections.md
    composites-member-variable-initialization.md
    for-loop-component-arrays.md
    inheritance-and-subclassing.md
    optional-and-variant-members.md
  equations-and-variables/
    assertions-and-bounds.md
    intermediates-and-let.md
    variables-derivatives-initialization.md
  foundation/
    domain-selection.md
    gas.md
    isothermal-liquid.md
    moist-air.md
    thermal-liquid.md
    two-phase-fluid.md
  language-functions/
    matlab-declaration-functions.md
    tablelookup.md
    writing-simscape-functions.md
  modecharts-and-events/
    events-and-event-variables.md
    modecharts.md
  parameters-and-conditionals/
    access-and-visibility-attributes.md
    conditional-sections-and-hiding-members.md
    enumerations.md
    parameter-declaration.md
  ports-and-nodes/
    branches.md
    nodes-conserving-ports.md
    physical-signal-inputs-and-outputs.md
  presentation/
    block-appearance-and-ports.md
    uilayout-and-dialog-tabs.md

Copyright 2026 The MathWorks, Inc.


Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Simscape Write Ssc AI skill do?

Use when writing or editing Simscape Language (.ssc) source files — components, domains, or functions. Triggers include: model a physical component in .ssc; write physical equations for a Simscape block; add or modify physics or parameterization options in a Simscape component; build a composite component. Also use for validating .ssc syntax, fixing Simscape Language errors, or converting governing equations into working Simscape component code. Do NOT use for configuring or connecting existing Simscape blocks in a Simulink model — that is model building, not language authoring.

Why use Simscape Write Ssc on TypingMind?

Because you install it once and use it with any model. Simscape Write Ssc is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Simscape Write Ssc in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/physical-modeling/simscape-write-ssc. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Simscape Write Ssc?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Simscape Write Ssc?

As many as you like. As long as a model supports skills, you can use Simscape Write Ssc with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Simscape Write Ssc AI skill free?

It is published on GitHub by matlab. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇