serdes-yaml-edit

Edit Metabase serdes YAML exports with correct portable references and validation.

49.0k|6.8k|Updated Feb 2, 2015
One-click install
npx skills add https://github.com/metabase/metabase --skill serdes-yaml-edit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: serdes-yaml-edit
Source: https://github.com/metabase/metabase/tree/main/.claude/skills/serdes-yaml-edit
Command: npx skills add https://github.com/metabase/metabase --skill serdes-yaml-edit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Editing exported Metabase serdes YAML files (cards, dashboards, databases) is error-prone because portable references must exactly match exported databases, tables, and fields, and mistakes break imports. This Skill provides the structural conventions, safe-edit rules, and a mandatory validation loop to keep edits consistent.

Core Features & Use Cases

  • Portable Reference Guidance: Explains how databases, tables, fields, and cards are referenced by name paths and entity IDs instead of integer IDs.
  • Safe vs Structural Edits: Distinguishes low-risk changes (name, display, visualization_settings) from schema-bound changes (dataset_query, result_metadata, table_id).
  • Validation Loop: Requires running the structural and cards checkers after every edit and provides a self-healing workflow for resolving checker errors.
  • Use Case: When changing a card's source table from ACCOUNTS to ORDERS in an exported instance, update table_id, source-table, and every result_metadata entry consistently, then verify with both checkers.

Quick Start

Ask the AI to rename a card and change its visualization to a bar chart in the exported serdes YAML, then run both checkers to confirm the edits are valid.

Frequently Asked Questions about serdes-yaml-edit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I edit Metabase serdes YAML files safely?

Edit only documented fields, use portable name-based references for databases, tables, and fields, and run both the structural and cards checkers after every edit. Fix any reported errors before making further changes.

How do I change a card's source table in exported YAML?

Update three places consistently: the top-level table_id, dataset_query.query.source-table, and every result_metadata entry's id, field_ref, and table_id. Then run both checkers to confirm the references resolve.

What are portable references in Metabase serdes exports?

Portable references replace integer IDs with name paths: databases are strings, tables are [database, schema, table] arrays, fields are [database, schema, table, field] arrays, and cards use 21-character entity IDs.

Why does the cards checker report unresolved references?

Unresolved references mean a database, table, or field name in the YAML does not exist in the export. Look up the correct name by listing the databases/, schemas/, tables/, and fields/ directories in the export.

Which fields should not be edited in serdes YAML?

Do not edit entity_id, serdes/meta, created_at, creator_id, or metabase_version. Changing entity_id creates a new object on import, and the other fields are internal metadata that should remain untouched.