matlab-build-app
The matlab-build-app skill creates interactive MATLAB desktop applications using class-based code, constructing graphical interfaces with uifigure, grid layouts, and UI components like buttons, sliders, and dropdowns. Use this skill when users need to build GUIs, dashboards, data exploration tools, or embed HTML/JavaScript components, but not for simple plots or editing existing binary .mlapp files.
git clone --depth 1 https://github.com/matlab/matlab-agentic-toolkit /tmp/matlab-build-app && cp -r /tmp/matlab-build-app/skills-catalog/matlab-app-building/matlab-build-app ~/.claude/skills/matlab-build-appSKILL.md
# MATLAB Build App
Determine the best architecture for a MATLAB application, produce an implementation plan grounded in internal references, and execute the build. For UIFigure apps, optionally serialize into an App Designer format.
## When to Use This Skill
Use this skill when:
- User wants to build a MATLAB app, GUI, or interactive tool
- User asks "how should I build this app?" or "which approach should I use?"
- User describes an application — with or without specifying an implementation path
- User mentions: MATLAB app, GUI, uifigure, uihtml, interactive tool, dashboard, visualization app, App Designer, .mlapp, plain-text app
- User describes spatial layout needs: dashboard, control panel, sidebar, tabs, wizard, stepper, canvas, workspace
- User has already chosen a path (e.g., "build me a uihtml app") — handle directly
## When Not to Use
- The request is purely about MATLAB computation with no UI component
- The user is asking about an existing app they want to modify → read `references/editing-guide.md`
- The user wants to convert between App Designer formats (e.g., .mlapp to plain-text or vice versa) → tell them to use File > Save As in App Designer. Do NOT attempt the conversion programmatically.
## Critical Rules
- MUST ask discovery questions before recommending a path — unless the user already specified one
- MUST confirm the path choice with the user before producing the implementation plan
- MUST produce an implementation plan grounded in internal references before writing any code
- MUST write the plan to a file (`<app-name>-plan.md`) in the working directory
- NEVER recommend a path without understanding the user's constraints (unless path was pre-specified)
- NEVER apply dark mode, custom colors, or visual themes unless the user explicitly requests them
- ALWAYS present the recommendation as guidance, not a mandate — the user decides
- MUST choose archetype based on the user's primary task, not aesthetics
- NEVER treat two archetypes as equals within one app — one is always the primary container
- UIFigure app: MUST use `uigridlayout` for all structural layout — never `Position`-based sizing
- UIHTML/web app: MUST use CSS Grid or Flexbox for chrome — no absolute positioning for structural panels
- The chrome (header, sidebar, tabs, step indicator) MUST remain spatially stable
- App Designer serialization: MUST read `references/app-designer/agent-guide-shared.md` (covers ownership models, editing discipline, property rules, quoting) plus the format-specific guide (`agent-guide-mlapp.md` or `agent-guide-plaintext.md`) before building. Those docs are the single source of truth; do not attempt to edit app files without reading them first.
## Workflow
```
User request arrives
│
├── Path NOT specified → Full Discovery
│ │
│ ▼
│ Ask Q1-Q4 (purpose, lifespan, polish, team skills)
│ │
│ ▼
│ Identify layout archetype
│ │
│ ▼
│ Recommend UIFigure vs UIHTML based on Q1-Q4
│ │
│ ▼
│ *** STOP: Present recommendation and WAIT for user confirmation ***
│ (Do NOT produce a plan or read references until user says yes)
│ │
│ ▼
│ Ask Q5 (FINAL): Serialization format? (UIFigure apps only)
│ │
│ ├── App Designer → release check, present format choice,
│ │ continue with UIFigure references + add serialization step
│ │
│ └── Standalone programmatic → no extra step
│ │
│ ▼
│ Produce Implementation Plan → write to <app-name>-plan.md
│ │
│ ▼
│ User reviews plan → confirms or adjusts
│ │
│ ▼
│ Begin building (read references per the plan)
│
└── Path IS specified
│
├── Serialization explicit (e.g., ".mlapp app", "plain-text app")
│ → Skip Q5, proceed with stated format
│ → Ask only missing requirements + archetype if unclear
│ → Produce Implementation Plan
│
├── Architecture explicit but serialization not stated
│ (e.g., "build me a uifigure app")
│ → Still ask Q5 (serialization) before planning
│ → Ask missing requirements + archetype if unclear
│ → Produce Implementation Plan
│
└── UIHTML or standalone programmatic explicit
→ Skip Q5 entirely (not applicable)
→ Ask missing requirements + archetype if unclear
→ Produce Implementation Plan
```
## Discovery Questions
Ask these conversationally — not as a rigid checklist. Gather requirements and layout intent first; ask the serialization question **last**, once you understand what the app needs to do.
### Core Questions
**1. What does the app do and who is it for?**
> What will this app do? Who will use it?
Listen for archetype signals: "dashboard", "control panel", "step-by-step", "workspace".
**2. Is this a quick tool or something you'll maintain over time?**
> Is this meant to be maintained and evolved, or is it more of a quick, proof-of-concept tool?
- **Maintained** → proceed to remaining questions; team skills matter
- **Ephemeral** → favor UIHTML app path; can skip team question
**3. How polished does the UI need to look?**
> Are standard MATLAB buttons, sliders, tables, and plots enough? Or do you need custom visuals — branded, animated, or visually richer?
- Standard controls sufficient → UIFigure app signal
- Custom visuals needed → UIHTML app signal
**4. Who will work on this app going forward?**
> Will this be maintained by people comfortable only with MATLAB, or by people also comfortable with>
Analyze AMS waveform data using Mixed-Signal Blockset utilities: phase noise measurement, clock jitter, anti-aliased resampling, timing measurements, lock time, INL/DNL, ADC/DAC calibration, HSpice import. Use when analyzing time-domain voltage from PLL/VCO/clock simulations, measuring phase noise from variable-step solver output, computing jitter, or resampling non-uniform data.
Analyze data using MATLAB. Use when the task involves tables, timetables, time-series data, numeric arrays, sensor matrices, or gridded data — including but not limited to exploring, filtering, sorting, cleaning, transforming, aggregating, smoothing, padding, trimming, and answering questions about data. MATLAB provides extensive, easy-to-use built-in functions for these workflows with no additional products required.
Analyze the effective toolbox file set to produce a Dependency Manifest — classify all transitive dependencies as included, product, add-on, or external-unresolved, then present resolution options with tradeoffs. Use after matlab-define-toolbox-api when the spec is approved.
S-parameters, insertion loss, fields, currents, mesh control, and solver selection for RF PCB performance validation. TRIGGER: user asks to compute S-parameters, analyze insertion/return loss, extract fields or currents, compare MoM vs FEM, or control mesh for any RF PCB component. Invoke BEFORE writing sparameters() or solver code — API is non-obvious. SKIP: designing or creating components (use the specific matlab-design-pcb-* skill), material/stackup setup only (use matlab-manage-pcb-material), optimization sweeps (use matlab-optimize-pcb-design), PDN/IR-drop analysis (use matlab-analyze-pcb-pdn).
Analyze antennas installed on electrically large conducting platforms using MATLAB Antenna Toolbox. Loads platform geometry from STL/STEP/IGES, installs antenna elements, selects electromagnetic solvers (MoM-PO, FMM, MoM), and computes patterns, impedance, coupling, and efficiency. Use when the user wants to model an antenna on a vehicle, aircraft, ship, satellite, or other large structure.
PDN DC voltage/current analysis, IR drop, design rule checking, and multi-net batch analysis on imported PCB layouts. TRIGGER: user asks about power integrity, PDN analysis, IR drop, voltage distribution, current density, power nets, or design rule checking on a PCB. Invoke BEFORE writing code — the PDN API chain is specialized and non-obvious. SKIP: importing a PCB file (use matlab-read-pcb-layout), EM field/S-parameter extraction (use matlab-analyze-em), material/stackup setup only (use matlab-manage-pcb-material), transmission line design (use matlab-design-pcb-txline).
Calculate and visualize monostatic and bistatic radar cross section (RCS) using MATLAB Antenna Toolbox. Computes RCS of platforms, antennas, and arrays with PO, MoM, and FMM solvers, supporting HH/VV/HV/VH polarization, GPU acceleration, and near-field observation. Use when the user wants to compute, plot, or analyze radar cross section.