metabase-data-app-setup

Installation
SKILL.md

Create a Metabase Data App

A Metabase data-app is a single JS bundle that the host loads inside a Near Membrane sandbox and renders inside its own React tree. The scaffold is a Vite + React + TypeScript project: source under src/, a dev server that previews the app against a real Metabase through the same Near Membrane sandbox + distortion rules Metabase uses in production — so npm run dev behaves like production, including for third-party libraries the app bundles — and npm run build producing a single dist/index.js. (Because the sandbox runs a built bundle, a change rebuilds it and does a soft reload — re-evaluates the bundle in the sandbox and remounts the app, keeping auth/SDK loaded — rather than hot-swapping modules; component state resets, but there's no full browser refresh.) The dev preview also shows a corner ⚠ Diagnostics toolbar that captures runtime errors — including the sandbox's otherwise-opaque blocked-API messages — so failures surface instead of being swallowed. The same data is served as JSON at http://localhost:5174/__data-app/diagnostics, which is how you read it (see "Reading the diagnostics feed" below) — you have a shell, not a browser, and these failures are invisible from the terminal otherwise.

Data apps are served from Git (they can also be created and updated through /api/apps). A single repository is connected to Metabase via remote-sync (Admin → Settings → Remote sync). Each app lives in its own directory data_apps/<slug>/ inside that repo — its source, a data_app.yaml (slug/name/path/collection), and the committed built bundle at the path its data_app.yaml declares (dist/index.js by default). Its collection, with its saved questions and the copies of the metrics and actions it uses, is YAML under the repo's collections/data_apps/, like every collection of the data-apps namespace. On each remote-sync import Metabase materializes each app and serves it at /apps/<slug>, where the slug is the slug its data_app.yaml declares. So this skill always scaffolds into the connected repo's data_apps/<slug>/ directory, never as a standalone project.

The scaffold ships inside this skill at ./template/ — a Vite + React + TypeScript project that was installed alongside the skill. Step 3 just copies it into the app directory; the skill then guides you through the customization + first-app-content steps — it never generates project files from scratch. If you find yourself writing package.json, vite.config.ts, tsconfig.json, or src/index.tsx by hand, stop — copy the template instead.

When to invoke this skill

  • "scaffold a new data app" / "create a Metabase data app" / "set up a data-app project"
  • "I want to build a data app" / any vague intent to author a data app
  • Starting a fresh agent task that will produce a data-app bundle.
  • "remove the data app" / "delete a data app" — only Removing an app below applies.
  • Do not use this skill for an existing data-app project when the task is to build screens, use Metabase data, generate or refresh schema files, wire saved questions / tables / metrics / actions, add filters, or author data hooks. Treat those as existing-data-app editing tasks and use the agent's normal skill-discovery flow from the user's wording.
Installs
804
GitHub Stars
50.2K
First Seen
Jul 20, 2026