matlab/matlab-agentic-toolkit / skills-catalog/matlab-app-building/matlab-build-app
matlab-build-app
UnverifiedBuild 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.
references/uihtml/mvvm-observable-classes.md
View on GitHub# Observable Classes
Complete implementations of the Observable and Computed classes used for reactive state management in JavaScript MVVM apps.
Place both classes in `viewmodels/observable.js`.
## Observable
A reactive value wrapper. When the value changes, all subscribers are notified.
```javascript
export class Observable {
constructor(initialValue) {
this._value = initialValue;
this._listeners = new Set();
}
get value() {
return this._value;
}
set value(newValue) {
if (this._value !== newValue) {
this._value = newValue;
this._notify();
}
}
subscribe(callback) {
this._listeners.add(callback);
callback(this._value); // Immediate call with current value
return () => this._listeners.delete(callback); // Unsubscribe function
}
_notify() {
this._listeners.forEach(cb => cb(this._value));
}
}
```
### Key behaviors
- `set value()` uses strict inequality (`!==`) to avoid redundant notifications
- `subscribe()` calls the callback immediately with the current value — no need for manual initial sync
- Returns an unsubscribe function — store it and call it in `destroy()` to prevent leaks
## Computed
A derived observable that recalculates when its dependencies change:
```javascript
export class Computed {
constructor(computeFn, dependencies) {
this._computeFn = computeFn;
this._listeners = new Set();
this._value = computeFn();
// Re-compute when any dependency changes
dependencies.forEach(dep => {
dep.subscribe(() => {
const newValue = this._computeFn();
if (this._value !== newValue) {
this._value = newValue;
this._notify();
}
});
});
}
get value() {
return this._value;
}
subscribe(callback) {
this._listeners.add(callback);
callback(this._value);
return () => this._listeners.delete(callback);
}
_notify() {
this._listeners.forEach(cb => cb(this._value));
}
}
```
### Key behaviors
- Read-only: no `set value()` — the value is always derived from the compute function
- Automatically re-evaluates when any dependency Observable changes
- Only notifies subscribers if the computed result actually changed
- Pass ALL source Observables in the `dependencies` array — missing one means stale values
### Usage example
```javascript
const firstName = new Observable('Jane');
const lastName = new Observable('Doe');
const fullName = new Computed(
() => `${firstName.value} ${lastName.value}`,
[firstName, lastName]
);
fullName.subscribe(name => console.log(name));
// Logs: "Jane Doe" immediately
firstName.value = 'John';
// Logs: "John Doe" (auto-recomputed)
```
----
Copyright 2026 The MathWorks, Inc.
----
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 321k | Updated | Claude CodeCodex | Verified | Install |
| 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: 197k | Updated | Claude CodeCodex | Verified | Install |
| 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: 197k | Updated | Claude CodeCodex | Verified | Install |
| 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: 197k | Updated | Claude CodeCodex | Verified | Install |