What problem does it solve?
Building React data apps on top of Metabase often leads to hand-written MBQL queries, hardcoded IDs, invented KPI values, and filters that silently break. This Skill enforces a strict separation between the semantic layer and the presentation layer so every query, filter, and chart is grounded in a generated schema file (metabase.data.ts) that reflects real Metabase tables, metrics, segments, and saved questions.
Core Features & Use Cases
- Typed schema generation: Fetches a scoped TypeScript schema from the Metabase typed-schemas API using credentials sourced from a repo-root .env.local file, with explicit library, collection, database, and model scoping options.
- Semantic query recipes: Provides patterns for table queries, metric aggregations, and saved-question queries using useMetabaseQuery, useMetabaseQueryObject, and helpers like filter, breakout, orderBy, and aggregations.
- SDK rendering guidance: Shows how to render charts with InteractiveQuestion and StaticQuestion via the card prop, including visualization and visualizationSettings typed against the installed SDK declarations.
- Filter UI patterns: Reference guides cover runtime categorical options, searchable entity comboboxes, date range pickers with react-datepicker, and filter state rules that default to showing data.
- Use Case: A developer asked to build a revenue dashboard app generates a scoped schema, writes typed queries against schema.tables.orders and schema.metrics.revenue, and renders SDK charts with dashboard-level filters that visibly affect every card.
Quick Start
Ask the AI to build a data app that queries your Metabase tables and metrics through the generated metabase.data.ts schema, starting by confirming which library scope the schema should include.