Builds industrial SCADA/HMI dashboards in MATLAB App Designer following ISA-101 conventions: gray-field philosophy, alarms at source, write safeguards, fixed-range trends, drill-down layout. Wraps OPC UA, Modbus, MQTT, or OSI PI monitoring scripts into live operator apps.
Ships in test-and-measurement. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Build operator-facing SCADA/HMI dashboards in MATLAB App Designer that follow industrial-HMI conventions: gray-field color philosophy, alarms shown at the data source, write safeguards on every setpoint, fixed-range trends with threshold lines, and a drill-down layout (plant overview → area → detail).
opcuageneratedScript.mlx, modbusgeneratedScript.mlx)uigridlayout, callback wiring, lifecycle, matlab.apps.AppBase scaffolding) and serialization to a real App Designer file — this skill delegates those to matlab-build-app. See references/app-designer-handoff.md. Two things stay here and must not be routed away: gray-field theming (never hand color/dark-mode to matlab-apply-theme) and HMI trends (never hand them to matlab-build-chart).matlab-use-opcua-client.[0.78 0.78 0.78]; panels [0.86 0.86 0.86]; 80%+ of the screen neutral. Color is reserved for exception. See references/color-and-layout-rules.md.uifigure with both 'Color', [0.78 0.78 0.78] and 'Theme', 'light'. Neither alone is enough: on a dark-themed desktop child widgets (uigauge, uiaxes, uitable, uieditfield) inherit dark defaults even when the figure colour is set, and 'light' alone yields bright white instead of gray-field. Code + rationale: references/color-and-layout-rules.md; failure mode: references/common-mistakes.md entry 24.uitable — and ≤ 5 saturated-color elements that the design chooses. One gauge's ScaleColors counts as one element however many bands it has; the connection lamp's blue is comms state, not alarm state, and sits outside the budget. Fixed MATLAB chrome does not count (a LinearGauge needle draws saturated red at every value and no public property recolors it). Full rule: assets/hmi-spec-template.md §4.[0.4 0.6 1.0]. Green [0 0.6 0] is reserved for "operator must verify yes this is actively OK" — not for "comms up" or "running".references/color-and-layout-rules.md.[0.78 0.78 0.78]) and reply with a one-sentence justification when the user asks for dark mode. This is not a default — it is a hard constraint.ScaleColors/ScaleColorLimits on every gauge with thresholds (Limits must cover every band — out-of-range bands are silently clipped); persistent top-row banner listing active alarms, color-coded by highest severity; latched state with an Acknowledge button — latching and its ACK control ship together or neither does. The normal band in ScaleColors is neutral gray [0.5 0.5 0.5] — never green. See references/alarm-patterns.md.uialert/uiconfirm/msgbox for live process alarms — alarm-fatigue anti-pattern (ISA-18.2). If a popup is unavoidable, fire once on the rising edge with a non-blocking CloseFcn and an Acknowledge button.YLim matching the node's spec range — never auto-scale by default. Provide a per-trend toggle for exploration. See references/trend-config-reference.md.animatedline('MaximumNumPoints', 300) at 1 s update. Buffer formula = WindowSeconds / UpdatePeriodSeconds.yline (amber dashed for warn, red dashed for alarm, blue dotted for setpoint).writeValue() confirms. uiconfirm showing node + old + new + units; default option is Cancel, not Apply.[0.7 1 0.7] on success, [1 0.7 0.7] on failure, back to the normal face after ~0.4 s (and revert the value too on failure). Do not flash saturated green [0 0.6 0] or alarm red [0.85 0 0]: those are reserved for operator-verified-OK and active alarms, and a control that stays recolored reads as status rather than as an acknowledgement. Operator must never be uncertain whether the write took effect.Limits on the spinner enforces the bound; the uilabel makes it visible.references/write-safeguards-reference.md.subscribe() is the default at any node count and update rate, including 1 Hz with a small node set. Reserve timer for non-node UI work (clock displays, alarm flashing, idle dimming).subscribe(client, nodes, cb, PublishInterval=<s>) — always set PublishInterval to the required rate (seconds; default 1) — invokes cb(sub, notification); data lives at notification.Data.Value / notification.Data.Timestamp; the originating node is notification.Node (struct with Name, Identifier, NamespaceIndex). Don't reference src.Name — that worked in older releases when src was the node, but errors in R2026a.subscribe call, use the 2-arg cb(sub, notification) above. When you paste an OPC UA Explorer–generated dataChangeCallback, it is 3-arg vectorized — cb(subObj, notification, ~) — and notification is a struct array (one entry per node changed this cycle): iterate notification(i).Node.Name / notification(i).Data.Value; never treat it as scalar. Writing a 2-arg @(src, evt) for an Explorer script throws "Too many input arguments"; treating notification as scalar reads only the first node. See references/protocol-cheatsheet.md §OPC UA and references/common-mistakes.md #17.subscribe() — use a polling timer with BusyMode='drop', ExecutionMode='fixedSpacing'. The 6-arg write() order is write(m, target, addr, val, serverId, 'precision') — serverId BEFORE 'precision'. Putting 'precision' in slot 5 (or dropping serverId on a non-default unit) throws "Expected input number 5, serverId, to be one of these types: double, single, …" — the single most common Modbus HMI bug.subscribe(c, topic, Callback=@cb) — the callback is a name-value pair, not positional. Decode message (a string) per the broker's payload schema (str2double, jsondecode).piclient (Industrial Communication Toolbox, R2022a+). Never call NET.addAssembly('OSIsoft.AFSDK') or write OSIsoft.AF.PI.PIServers / OSIsoft.AF.PISystems code in MATLAB — the toolbox client wraps the AFSDK and returns native MATLAB types (timetable, table, datetime); rolling your own .NET interop loses type coercion, throws on permission errors that the toolbox handles, runs slowly because batched reads are bypassed, and breaks the integrated browser app. PI has no subscribe() — drive trends with a polling timer (same shape as Modbus). Writes via write(piClient, tag, value, TimeInstance=datetime("now")) are R2024a+.afclient (Industrial Communication Toolbox, R2026a+). Browse with getRootElements / getChildren / findElementByName / findElementByPath / findElementByTemplate; read with Attribute.read (current → table) and Attribute.readHistory (archive → timetable). The AF hierarchy maps directly onto Level 1 → Level 2 → Level 3 drill-down screens. AF current-value writes are not exposed by the toolbox — there is no Attribute.write; route writes through the underlying Attribute.PITag and the PI client.Attribute.WriteAccess and HasTimeSeriesData, the same way OPC UA uses AccessLevelCurrent. Don't infer writability from the name.tags(c).Name or attribute.Name / attribute.Path. Never invent labels — the HMI must mirror the source script's identifiers so operators can cross-reference with the OPC UA Explorer / OSI PI viewer / AF browser.See references/protocol-cheatsheet.md for OPC UA / Modbus / MQTT API shapes and references/pi-af-cheatsheet.md for PI Data Archive and PI AF; see references/common-mistakes.md for the silent-failure modes.
struct properties: Foo struct = struct(). A bare Foo struct declaration becomes 0×0 struct and app.Foo.Bar = 1 errors with "A dot name structure assignment is illegal when the structure is empty."classdef first. A function block before classdef in the same file is a parse error. Drop the wrapper; the file's first non-comment statement must be classdef, name matching filename.function … end in inline evaluation. Function definitions are legal only inside code files, never in a command-window / inline context. When you sanity-check helper logic (severity bands, alarm math) through evaluate_matlab_code, the transcript is a command-window context — a pasted function … end block errors with "Function definitions are not supported in this context." Verify by exercising the helper from its file, or inline the arithmetic directly.opc.ua.Subscription has no public delete. Drop the handle (app.Subscription = opc.ua.Subscription.empty;) and disconnect(client) — that releases all subscriptions on that client.subscribe() accumulates a channel listener; rebuilds leak.delete(app); CloseRequestFcn only routes to it. Stop and delete timers, drop subscription handles and disconnect clients inside delete(app), then wire app.UIFigure.CloseRequestFcn = @(~,~) delete(app);. Putting the body on CloseRequestFcn instead leaks everything whenever the app is closed programmatically — which is how every test, script and eval closes it. A leaked timer keeps firing after the figure closes with stale handles. See references/common-mistakes.md #32.See references/app-designer-gotchas.md for full reproductions, the release-aware AccessLevelCurrent check, and per-widget subscription patterns.
assets/hmi-spec-template.md into <AppName>-hmi-spec.md beside the app, present a ≤10-line summary, and STOP for review. Build only after the user approves. Corrections go into the spec, never into a built app. That file is the hand-off contract.matlab-build-app skill under the exact name it appears as in your available-skills list — plugin-scoped (<plugin>:matlab-build-app) or bare; only the listed form resolves, so never type a guessed slash command. Hand it the approved spec, which pre-answers its discovery (UIFigure — an HMI is never UIHTML — plus .mlapp, archetype, users, timers). How it builds and what format it emits is its concern..m app yourself from the same approved spec; say it runs identically but won't open in App Designer, and that enabling the matlab-app-building plugin and rebuilding from the same spec produces a .mlapp. Never scan the disk for its skill folder — it ships in a different plugin (matlab-app-building), so a recursive search above this skill runs for tens of minutes and still misses.references/app-designer-handoff.md has the division of labor, the hand-off protocol, and the component/behavior recipes the spec is filled from.When wrapping a monitoring script into an HMI, work through these steps in order. Widget choice depends on data type, layout depends on widget choice, alarms/trends/writes layer on top — and the finished design is written to a spec the user reviews before anything is built.
references/widget-selection-flowchart.md. If the schema isn't given upfront → references/server-agnostic-discovery.md. If wrapping a generated script (OPC UA/Modbus Explorer or MQTT demo) → references/protocol-cheatsheet.md first; if wrapping a PI / PI AF script → references/pi-af-cheatsheet.md, for the exact API shapes.references/widget-selection-flowchart.md.references/color-and-layout-rules.md.subscribe() (self-written callback = 2-arg cb(sub, notification); an Explorer-generated dataChangeCallback = 3-arg vectorized over a struct array), Modbus polling timer, MQTT subscribe(... Callback=...), PI / PI AF polling timer against read() / Attribute.read. → references/protocol-cheatsheet.md and references/pi-af-cheatsheet.md.
Timeout shortens it. Build the gray-field layout, drawnow, show "Connecting to <host>…" in the banner, and only then construct the client inside a try. Measurements: references/protocol-cheatsheet.md §Polling pattern.references/alarm-patterns.md.references/trend-config-reference.md.references/write-safeguards-reference.md.assets/hmi-spec-template.md into <AppName>-hmi-spec.md beside the app: signals, components with ISA-101 values, behaviors and wiring roles, build parameters. Self-audit section 5 first. → assets/hmi-spec-template.md.Review status: APPROVED <date>. Proceed unprompted only on pre-approval, or when the session cannot take a reply (batch/eval run) — then leave it UNREVIEWED and say so before building — summary first, then build. "Seems busy" is not a bypass.references/app-designer-handoff.md.assets/designReportReadback.m beside the app verbatim, keeping its filename — it is a function; do not edit it, do not rename it, and do not re-author your own readback. Call it via mcp__matlab__evaluate_matlab_code: designReportReadback("<AppClass>", "<AppClass>-hmi-spec.md"). It reads the live figure and source, writes design-report.json, deletes the app and reports leaks. Confirm the file's first key is "reportFormat":"hmi-report/1" (self-check: references/common-mistakes.md #33), then compare it with the spec row by row and fix the app where they disagree. Never hand-write or reshape the numbers. If construction fails on a struct or classdef error → references/app-designer-gotchas.md.references/key-functions.md lists every widget, client, and read/write call with its toolbox and
release, plus the four gates that change the design rather than the call — the floor is R2023b
(manifest.yaml), set by OPC UA subscribe(). Check it before writing a call on an unknown
install; mcp__matlab__detect_matlab_toolboxes confirms what's present.
references/common-mistakes.md is a grep-first lookup table of 33 documented anti-patterns — App Designer gotchas, ISA-101 violations, and protocol-specific silent failures — each a Symptom → Wrong → Right → Why block. Don't load it whole: Grep it for the user's error string, or find the anti-pattern in its index table, and read only the matching ### N. entry.
Each file carries executable patterns for its topic — calling conventions, constructor arguments, property names, full callback handlers. Load the relevant one before writing code.
| Load when... | Reference |
|---|---|
| Writing the HMI spec for review and hand-off | assets/hmi-spec-template.md — fill it; it's a form, not a source of domain rules |
| Verifying a built HMI against its spec (workflow step 11) | assets/designReportReadback.m (copy verbatim; see step 11); key contract in assets/design-report-schema.json |
| Picking widgets for a list of nodes | references/widget-selection-flowchart.md |
| Designing screen structure or choosing colors | references/color-and-layout-rules.md |
| Wiring alarm bands at source or the persistent banner | references/alarm-patterns.md |
| Configuring a trend (window, YLim, threshold lines) | references/trend-config-reference.md |
| Adding a writable setpoint with confirm + flash feedback | references/write-safeguards-reference.md |
| Wrapping an OPC UA Explorer / Modbus Explorer / MQTT script — invoking OPC UA method nodes — or hitting protocol-specific bugs | references/protocol-cheatsheet.md |
Wrapping an OSI / AVEVA PI Data Archive script (piclient, tags, read) or a PI AF script (afclient, getRootElements, getAttributes, Attribute.read/readHistory) | references/pi-af-cheatsheet.md |
| Browsing an unknown server and inferring widgets at runtime | references/server-agnostic-discovery.md |
| Hard-wiring a known node-to-widget schema | references/known-schema-patterns.md |
Construction errors (struct props, classdef ordering, listener leaks, AccessLevelCurrent) | references/app-designer-gotchas.md |
Handing the approved spec to matlab-build-app, picking components/behaviors to fill it, or editing an existing app | references/app-designer-handoff.md |
| Debugging a specific error, silent failure, or anti-pattern | Grep references/common-mistakes.md for the error text or anti-pattern (it has an index table) — read only the matching entry, not the whole file |
| Checking whether a function exists in the user's release, or which toolbox ships it | references/key-functions.md — manifest.yaml carries the product requirement |
Copyright 2026 The MathWorks, Inc.
assets/design-report-schema.json (opens in a new tab)assets/designReportReadback.m (opens in a new tab)assets/hmi-spec-template.md (opens in a new tab)manifest.yaml (opens in a new tab)references/alarm-patterns.md (opens in a new tab)references/app-designer-gotchas.md (opens in a new tab)references/app-designer-handoff.md (opens in a new tab)references/color-and-layout-rules.md (opens in a new tab)references/common-mistakes.md (opens in a new tab)references/key-functions.md (opens in a new tab)references/known-schema-patterns.md (opens in a new tab)references/pi-af-cheatsheet.md (opens in a new tab)references/protocol-cheatsheet.md (opens in a new tab)references/server-agnostic-discovery.md (opens in a new tab)references/trend-config-reference.md (opens in a new tab)references/widget-selection-flowchart.md (opens in a new tab)references/write-safeguards-reference.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
13 skills in this plugin
/matlab-call-nidaqmxTranslate NI-DAQmx C function signatures into correct calldaqlib MATLAB calls. Use when the user mentions calldaqlib, any DAQmx* C function name (DAQmxCfgSampClkTiming, DAQmxExportSignal, DAQmxSetStartTrigRetriggerable, DAQmxGetSampClkRate, etc.), or needs NI-DAQmx functionality not exposed by the daq object. Covers: projection rules (taskHandle implicit, output pointers become return values, buffer-size args, enum-as-string), multi-task semantics, start() clobber, device-level empty-daq workaround, dictionary returns, string getter placeholder, array getter placeholder. Trigger contexts: low-level DAQ, escape hatch, retriggerable acquisition, shared timebase, export signal, connect terminals, external sample clock, trigger configuration, NI driver, C function translation.
/matlab-connect-arduinoDiscover, configure, and connect to Arduino boards from MATLAB using the Arduino Support Package. Use this skill when the user wants to set up an Arduino board, connect to Arduino hardware, find connected boards, scan serial ports, configure Arduino libraries, or any task that requires an Arduino connection as a prerequisite (e.g., blink LED, read sensor, read digital pin, read analog pin, write pin, plot sensor data, scan I2C, use ultrasonic sensor, control servo, read temperature, read voltage, data logging from hardware). Triggers on: arduino, board setup, COM port, serial port, hardware connection, Arduino Nano, Arduino Uno, Arduino Mega, Arduino Micro, Grove, sensor setup, I2C scan, ultrasonic, servo, readDigitalPin, writeDigitalPin, readVoltage, writePWMVoltage, temperature sensor, air pressure, pin read, pin write, analog input.
/matlab-connect-bluetooth-low-energy-deviceDiscover and connect to Bluetooth Low Energy (BLE) peripheral devices from MATLAB. Use this skill when the user wants to scan for BLE devices, connect to a BLE peripheral, read or write BLE characteristics, subscribe to notifications, or any task that requires a BLE connection as a prerequisite (e.g., read sensor data over BLE, monitor heart rate, log accelerometer, stream data from wearable, IoT device communication). Triggers on: BLE, Bluetooth Low Energy, blelist, ble device, BLE characteristic, GATT, service UUID, scan for devices, BLE sensor, subscribe notify, BLE read, BLE write, peripheral device, BLE connect, wireless sensor.
/matlab-create-custom-arduino-libraryUse when the user wants to use Arduino sensors or peripherals from MATLAB that are not directly supported by the MATLAB Support Package for Arduino Hardware. Triggers on requests to create, wrap, or expose a custom Arduino library to MATLAB. Also triggers on indirect questions like "How do I read humidity in MATLAB?" or "How do I display text on an LCD from MATLAB?" where the answer requires a custom Arduino add-on library. Covers: custom addon creation, third-party Arduino library integration, LibraryBase class, C++ header files, DependentLibraries, arduinoioaddons namespace, I2C/SPI/GPIO peripheral wrappers.
/matlab-discover-hardwareDiscovers connected MATLAB-supported hardware devices, searches by capability, and checks required support packages and add-ons. Use when the user asks what hardware is connected, finds a device that supports a capability (e.g., CAN, analog input), or checks if required support packages or add-ons are installed. Does NOT connect to, configure, or acquire data from devices — defers to device-specific skills for usage workflows./matlab-enhance-camera-imageRead BEFORE troubleshooting or enhancing camera image quality. Diagnoses and enhances image quality from cameras connected via Image Acquisition Toolbox or USB Webcams support package. Discovers camera capabilities at runtime, analyzes captured images for quality issues (brightness, contrast, sharpness, noise, color balance, backlighting), suggests hardware setting adjustments tailored to the specific camera, and applies Image Processing Toolbox enhancement functions. Use when a user wants to improve camera image quality, troubleshoot dark/blurry/noisy/grainy/ overexposed/washed out/color cast images, or optimize camera settings.
/test-and-measurement:matlab-build-industrial-hmifrom test-and-measurement
npx claudepluginhub matlab/matlab-agentic-toolkit --plugin test-and-measurementOther plugins' skills for the same job