Skip to content

matlab/matlab-agentic-toolkit / skills-catalog/matlab-app-building/matlab-build-app

matlab-build-app

Unverified

Build MATLAB apps from requirements to working code. Asks discovery questions (or skips them when the path is known), recommends UIFigure or UIHTML architecture, identifies layout archetype (Dashboard, Explorer, Tabbed, Wizard, Canvas), produces an implementation plan, and executes the build. For UIFigure apps, optionally serializes as App Designer (.mlapp or plain-text .m + .xml). Use when a user wants to build a MATLAB app, create a GUI, make an interactive tool, build a uifigure app, build a uihtml app, build an App Designer app, build a .mlapp app, build a plain-text App Designer app, or asks which approach to use. Also use when user describes spatial layout needs: dashboard, control panel, sidebar, tabs, wizard, stepper, canvas, workspace.

FileKindSize
SKILL.mdskill md20.9 KB
assets/colors_and_type.cssother12.8 KB
assets/minimal-bridge.htmlother1.3 KB
assets/minimal-bridge.mother1.2 KB
assets/standalone-chart-template.htmlother11.5 KB
manifest.yamlconfig672 B
references/app-designer/agent-guide-mlapp.mdmarkdown15.7 KB
references/app-designer/agent-guide-plaintext.mdmarkdown14.7 KB
references/app-designer/agent-guide-shared.mdmarkdown27.1 KB
references/app-designer/background-tasks.mdmarkdown4.8 KB
references/app-designer/plaintext/classdef-template.mdmarkdown11.3 KB
references/app-designer/plaintext/matlabAppSchema.xsdother16.8 KB
references/app-designer/plaintext/property-reference.mdmarkdown45.1 KB
references/app-designer/plaintext/xml-template.mdmarkdown12.3 KB
references/archetypes/canvas.mdmarkdown8.0 KB
references/archetypes/dashboard.mdmarkdown6.4 KB
references/archetypes/explorer.mdmarkdown5.7 KB
references/archetypes/tabbed.mdmarkdown6.6 KB
references/archetypes/wizard.mdmarkdown9.7 KB
references/background-tasks.mdmarkdown6.9 KB
references/editing-guide.mdmarkdown3.3 KB
references/timers.mdmarkdown2.1 KB
references/uifigure/callbacks.mdmarkdown3.0 KB
references/uifigure/components.mdmarkdown1.7 KB
references/uifigure/containers.mdmarkdown1.3 KB
references/uifigure/grid-layout.mdmarkdown4.9 KB
references/uifigure/guide.mdmarkdown5.3 KB
references/uifigure/layout-patterns.mdmarkdown1.5 KB
references/uifigure/mvvm-background-tasks.mdmarkdown3.9 KB
references/uifigure/mvvm-guide.mdmarkdown11.1 KB
references/uifigure/mvvm-testing.mdmarkdown2.8 KB
references/uifigure/mvvm-view-binding.mdmarkdown5.4 KB
references/uihtml/brand-design-tokens.mdmarkdown5.6 KB
references/uihtml/bridge-guide.mdmarkdown7.0 KB
references/uihtml/chart-bridge-integration.mdmarkdown7.5 KB
references/uihtml/chart-performance.mdmarkdown5.0 KB
references/uihtml/chart-type-selection.mdmarkdown3.1 KB
references/uihtml/chart-updates.mdmarkdown4.7 KB
references/uihtml/charting-guide.mdmarkdown3.9 KB
references/uihtml/chartjs-setup.mdmarkdown4.0 KB
references/uihtml/communication-patterns.mdmarkdown4.2 KB
references/uihtml/component-styles.mdmarkdown4.3 KB
references/uihtml/css-layout-patterns.mdmarkdown5.0 KB
references/uihtml/dark-mode.mdmarkdown3.8 KB
references/uihtml/data-types.mdmarkdown2.7 KB
references/uihtml/doughnut-scatter-charts.mdmarkdown6.0 KB
references/uihtml/error-handling.mdmarkdown4.6 KB
references/uihtml/external-color-schemes.mdmarkdown2.6 KB
references/uihtml/js-coding-guide.mdmarkdown11.2 KB
references/uihtml/js-testing-debugging.mdmarkdown2.9 KB
references/uihtml/line-bar-charts.mdmarkdown5.2 KB
references/uihtml/mvvm-guide.mdmarkdown11.0 KB
references/uihtml/mvvm-observable-classes.mdmarkdown2.9 KB
references/uihtml/mvvm-view-binding.mdmarkdown5.3 KB
references/uihtml/platform-limitations.mdmarkdown2.5 KB
references/uihtml/setup.mdmarkdown3.9 KB
references/uihtml/styling-guide.mdmarkdown8.1 KB
scripts/+module/+backgroundtask/BackgroundTaskModule.pbinary2.5 KB
scripts/+module/+backgroundtask/templates/cancelBackground.mother357 B
scripts/+module/+backgroundtask/templates/handleBackgroundComplete.mother1.4 KB
scripts/+module/+backgroundtask/templates/safeProgress.mother734 B
scripts/+module/+backgroundtask/templates/startBackground.mother1.2 KB
scripts/+module/AppBuilderModule.pbinary242 B
scripts/AppDesignerAgentInterface.pbinary12.6 KB
scripts/MlappBackend.pbinary9.4 KB
scripts/PlainTextBackend.pbinary10.2 KB

references/archetypes/canvas.md

View on GitHub
# Canvas / Workspace Layout

**Primary user task:** Create, inspect, edit, or navigate a large spatial or visual artifact — the central area dominates.

```
┌─────────────────────────────────────────────────────────┐
│  [File ▼]  [Edit ▼]  [View ▼]  [Tool A] [Tool B] [▶Run]│  ← toolstrip (fixed ~36px)
├───────────┬─────────────────────────────┬───────────────┤
│           │                             │               │
│  Left     │   Canvas / Main Area        │  Properties   │
│  Sidebar  │   (fills remaining space)   │  Panel        │
│  (files,  │                             │  (optional,   │
│  layers,  │   e.g. uiaxes, custom draw  │  fixed width) │
│  tree)    │   area, image, map          │               │
│           │                             │               │
└───────────┴─────────────────────────────┴───────────────┘
```

**When to choose:** The app IS the central artifact — a figure the user interacts with directly, a spatial editor, a map, an image annotator, or a MATLAB plot that is the product, not just output of controls. The surrounding chrome (toolstrip, sidebars, properties) serves the canvas; the canvas is not a panel inside something else.

**Key rules:**
- The canvas column/row takes all remaining space (`'1x'` / `1fr`) — sidebars and toolstrip are fixed
- Toolstrip height is ~36px; sidebar widths are 160–240px; properties panels are 200–280px
- NEVER put the canvas in a scroll container — it should fill and clip, not grow past the viewport
- Both sidebars and the properties panel are optional — use only what the content requires
- If the toolstrip has many tool groups, add separators (`uilabel('Text','|')` in UIFigure app) between groups

---

## UIFigure app — uigridlayout Skeleton

```matlab
fig = uifigure('Name', 'Workspace');

rootGrid = uigridlayout(fig, [2 3]);
rootGrid.RowHeight    = {36, '1x'};
rootGrid.ColumnWidth  = {180, '1x', 220};
rootGrid.Padding      = [0 0 0 0];
rootGrid.RowSpacing   = 0;
rootGrid.ColumnSpacing = 0;

% ── Toolstrip — spans all 3 columns ──────────────────────
toolstrip = uipanel(rootGrid);
toolstrip.Layout.Row    = 1;
toolstrip.Layout.Column = [1 3];
toolstrip.BorderType    = 'none';

toolGrid = uigridlayout(toolstrip, [1 8]);
toolGrid.ColumnWidth = repmat({'fit'}, 1, 8);
toolGrid.Padding     = [4 2 4 2];
toolGrid.ColumnSpacing = 4;

uibutton(toolGrid, 'Text', 'Open',  'Layout', struct('Column', 1));
uibutton(toolGrid, 'Text', 'Save',  'Layout', struct('Column', 2));
% separator
uilabel(toolGrid, 'Text', '│', 'FontColor', [0.7 0.7 0.7]).Layout.Column = 3;
uibutton(toolGrid, 'Text', 'Run',   'Layout', struct('Column', 4));
% ... more tools

% ── Left sidebar ─────────────────────────────────────────
leftPanel = uipanel(rootGrid);
leftPanel.Layout.Row    = 2;
leftPanel.Layout.Column = 1;
leftPanel.BorderType    = 'line';

leftGrid = uigridlayout(leftPanel, [1 1]);
% e.g. a uitree for file browser or layer list
tree = uitree(leftGrid, 'checkbox');

% ── Canvas (central area) ─────────────────────────────────
canvasPanel = uipanel(rootGrid);
canvasPanel.Layout.Row    = 2;
canvasPanel.Layout.Column = 2;
canvasPanel.BorderType    = 'none';

canvasGrid = uigridlayout(canvasPanel, [1 1]);
canvasGrid.Padding = [0 0 0 0];
ax = uiaxes(canvasGrid);
ax.XTick = [];
ax.YTick = [];
ax.Box   = 'on';
% For a true pixel canvas: use a uiimage or custom drawn axes

% ── Properties panel ─────────────────────────────────────
propsPanel = uipanel(rootGrid);
propsPanel.Layout.Row    = 2;
propsPanel.Layout.Column = 3;
propsPanel.BorderType    = 'line';

propsGrid = uigridlayout(propsPanel, [10 2]);
propsGrid.RowHeight   = repmat({'fit'}, 1, 10);
propsGrid.ColumnWidth = {'fit', '1x'};
propsGrid.Padding     = [8 8 8 8];
% Add property label + value pairs
```

### Minimal canvas (toolstrip + central only)

```matlab
fig = uifigure('Name', 'Viewer');

rootGrid = uigridlayout(fig, [2 1]);
rootGrid.RowHeight  = {36, '1x'};
rootGrid.Padding    = [0 0 0 0];
rootGrid.RowSpacing = 0;

toolstrip = uipanel(rootGrid);
toolstrip.Layout.Row = 1;

canvasPanel = uipanel(rootGrid);
canvasPanel.Layout.Row = 2;
canvasGrid = uigridlayout(canvasPanel, [1 1]);
canvasGrid.Padding = [0 0 0 0];
ax = uiaxes(canvasGrid);
```

---

## UIHTML/web app — CSS Grid Skeleton

```css
.workspace {
    display: grid;
    grid-template-rows: 36px 1fr;
    grid-template-columns: 180px 1fr 240px;
    grid-template-areas:
        "toolstrip toolstrip toolstrip"
        "sidebar   canvas    props";
    height: 100vh;
    overflow: hidden;  /* prevent canvas from causing page scroll */
}

.toolstrip {
    grid-area: toolstrip;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0 var(--space-3);
    background: var(--toolstrip-bg, var(--bg-secondary));
    border-bottom: 1px solid var(--toolstrip-border, var(--border));
}

.toolstrip-separator {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 var(--space-2);
}

.sidebar {
    grid-area: sidebar;
    overflow-y: auto;
    border-right: 1px solid var(--border);
}

.canvas-area {
    grid-area: canvas;
    position: relative;
    overflow: hidden;   /* clip content to bounds */
    background: var(--bg-canvas, var(--bg-primary));
}

/* For an HTML canvas or SVG workspace */
.canvas-area canvas,
.canvas-area svg {
    display: block;
    width: 100%;
    height: 100%;
}

.props-panel {
    grid-area: props;
    overflow-y: auto;
    border-left: 1px solid var(--border);
    padding: var(--space-3);
}

/* Without left sidebar */
.workspace.no-sidebar {
    grid-template-columns: 1fr 240px;
    grid-template-areas:
        "toolstrip toolstrip"
        "canvas    props";
}

/* Without properties panel */
.workspace.no-props {
    grid-template-columns: 180px 1fr;
    grid-template-areas:
        "toolstrip toolstrip"
        "sidebar   canvas";
}

/* Minimal: just toolstrip + canvas */
.workspace.minimal {
    grid-template-columns: 1fr;
    grid-template-areas:
        "toolstrip"
        "canvas";
}
```

---

## Common Variations

| Variation | Change |
|---|---|
| No left sidebar | Omit left column; canvas starts at column 1 (or use `.no-sidebar` variant) |
| No properties panel | Omit right column; canvas fills to right edge |
| Floating toolbar (overlay) | Position toolstrip absolutely over the canvas; reduce root grid to 1 row |
| Status bar at bottom | Add a 3rd row `{24px}` spanning all columns for zoom level, cursor position, etc. |
| Resizable panels | UIHTML app: use CSS resize handle + JS drag; UIFigure app: there is no built-in drag resize in uigridlayout — use a button to toggle sidebar visibility instead |
| Tool palette (icon grid) | Left sidebar as a compact 2-column icon grid for drawing tools |

---

## Composition

- **UIFigure app:** `matlab-build-chart` for the central `uiaxes` — axes config, interaction (ButtonDownFcn, datatip), and all plot rendering; `references/uifigure/mvvm-guide.md` for selection state and tool state (active tool, selected object, properties)
- **UIHTML/web app:** `references/uihtml/bridge-guide.md` if the canvas is a custom JS component inside MATLAB; `references/uihtml/mvvm-guide.md` for selection/tool state management; `references/uihtml/styling-guide.md` for the toolstrip and panel chrome
- **Toolstrip guidance:** MATLAB's built-in `uitoolbar` is for figures, not uifigure — build toolstrip chrome with `uigridlayout` + `uibutton` (UIFigure app) or CSS tokens (UIHTML/web app)

----

Copyright 2026 The MathWorks, Inc.

----
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: 322kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall