Loading...
Loading...
Understands the Metabase Representation Format — a YAML-based serialization format for Metabase content (collections, cards, dashboards, documents, segments, measures, snippets, transforms). Use when the user needs to create, edit, understand, or validate Metabase representation YAML files, or when working with Metabase serialization/deserialization (serdes). Covers entity schemas, MBQL and native queries, visualization settings, parameters, and folder structure.
npx skill4agent add metabase/agent-skills metabase-representation-formatspec.md@metabase/representationsnpx @metabase/representations validate-schema| Entity | SerDes Model | Description |
|---|---|---|
| Collection | | Folder-like container for organizing content. Hierarchy via |
| Card | | Question, model, or metric. Holds an MBQL or native |
| Dashboard | | Grid layout (24 columns) of cards with filter parameters and optional tabs. Contains |
| Document | | Rich text page using ProseMirror AST. Can embed cards via |
| Segment | | Saved filter definition scoped to a table. Definition is a pMBQL query with a single stage containing only |
| Measure | | Saved aggregation definition scoped to a table. Definition is a pMBQL query with a single stage containing only |
| Snippet | | Reusable SQL fragment referenced in native queries via |
| Transform | | Materializes query or Python script results into a database table. Source is either MBQL/native query or Python script. |
| TransformTag | | Label for categorizing transforms. Built-in types: |
| TransformJob | | Scheduled job (cron) that executes transforms matching specific tags. |
| PythonLibrary | | Shared Python source file available to Python-based transforms. |
Critical — folder layout is decorative. Where an entity lands in Metabase is decided entirely by its fields, not by where its YAML file sits in the tree. Moving a file without updating the fields changes nothing. Updating the fields without moving the file still works correctly. Always treat the fields below as the source of truth.
collection_idnullparent_idparent_idparent_id: nullparent_identity_iddashboard_iddocument_idcollection_idcollection_idmy_dashboard/card.yamlmy_dashboard.yamlcollections/main/snippets/transforms/databases/segments/measures/python_libraries/python-libraries/transforms/transform_jobs/transform_tags/serdes/metaserdes/meta{id, model, label?}labelserdes/meta:
- id: NDzkGoTCdRcaRyt7GOepg
label: my_entity_name
model: Cardvalidate-schemaserdes/metaspec.mdspec.mdSKILL.mdspec.mdtextnumberdatebooleandimensiontemporal-unitcardsnippettablespec.mdspec.mdREADME.mdextract-specnpx @metabase/representations validate-schema --folder <path>serdes/metaentity_idnpx @metabase/representations generate-entity-id
# → LZfXLFzPPR4NNrgjlWDxn
npx @metabase/representations generate-entity-id --count 5lib/uuidorder-byidnpx @metabase/representations generate-uuid
# → 1d4e9fdf-49ae-4fbe-ae27-05e7c6a5cfe8
npx @metabase/representations generate-uuid --count 3