Skip to content
Development
Skill

/serdes-workflow

Export content from a running Metabase instance, validate with checkers, edit YAML, and import back. Use when the user wants to export, import, or run the full serdes round-trip workflow.

From plugin
metabase
50k30 skills11 agents23 commands

Claude Code

$ npx -y skills add metabase/metabase --skill serdes-workflow --agent claude-code

SKILL.md

serdes-workflow.SKILL.md
name: serdes-workflow
description: Export content from a running Metabase instance, validate with checkers, edit YAML, and import back. Use when the user wants to export, import, or run the full serdes round-trip workflow.

Serdes Workflow Skill

End-to-end workflow for exporting Metabase content as YAML, validating it, editing it, and importing it back.

Prerequisites

All commands require the `:ee` alias since export, import, and checkers live in enterprise code.

You need `MB_DB_CONNECTION_URI` set to point at the target Metabase Postgres database when importing. The running dev instance's connection string is in the worktree environment (check the nREPL or startup output).

Export

clojure -M:run:ee export /path/to/export-dir

Flags:

  • `-c 123,456` - export only specific collection IDs
  • `-f` - include field values
  • `-e` - continue on error

This writes YAML files in the serdes directory layout:

databases/<db-name>/<db-name>.yaml
databases/<db-name>/schemas/<schema>/tables/<table>/<table>.yaml
databases/<db-name>/schemas/<schema>/tables/<table>/fields/<field>.yaml
collections/<eid>_<slug>/cards/<eid>_<slug>.yaml

Validate

Always run both checkers after any modification. They skip full Metabase startup (~8s each).

Structural checker (fast, schema-based)

clojure -M:run:ee --mode checker --checker structural --export /path/to/export-dir

Validates YAML shapes against Malli schemas. Catches typos, missing required fields, wrong types.

Cards checker (query validation)

clojure -M:run:ee --mode checker --checker cards --export /path/to/export-dir

Validates that card queries resolve correctly against exported metadata (tables, fields, FKs). Uses Lib under the hood.

Additional cards checker flags:

  • `--lenient` - fabricate metadata on demand (when no database schema files exist)
  • `--manifest /path/to/manifest.yaml` - write manifest of all referenced entities (lenient mode only)
  • `--output /path/to/results.edn` - write detailed results to file

Edit YAML

See the **serdes-yaml-edit** skill for guidance on editing YAML files. The critical rule: **run both checkers after every edit before proceeding**.

Import

MB_DB_CONNECTION_URI="postgres://user:pass@localhost:5432/metabase_dbname" \
  clojure -M:run:ee import /path/to/export-dir -e

The `-e` flag continues on error. The `MB_DB_CONNECTION_URI` must point at the same Postgres database the running Metabase instance uses - without it, import defaults to H2 which is wrong.

Full Demo Sequence

1. Export: `clojure -M:run:ee export /tmp/metabase-export` 2. Validate baseline: run both checkers 3. Edit YAML files (see serdes-yaml-edit skill) 4. Re-validate: run both checkers again 5. Import: `MB_DB_CONNECTION_URI=... clojure -M:run:ee import /tmp/metabase-export -e` 6. Verify in browser

Read more
@metabase
Ships withmetabase

Metabase is the easy, open-source way for everyone in your company to ask questions and learn from data.

50k30 skills11 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
50.3k
Star history of metabase/metabase on GitHub, a chart by star-history.com

Other skills on metabase.

add-malli-schemas

add-malli-schemas

Efficiently add Malli schemas to API endpoints in the Metabase codebase with proper patterns, validation timing, and error…

@metabase@metabaseInstall Skill
add-tracing

add-tracing

Add OpenTelemetry tracing spans to Clojure code following Metabase tracing conventions. Use when instrumenting backend code with…

@metabase@metabaseInstall Skill
api-changelog

api-changelog

Draft or audit the REST API changelog (docs/developers-guide/api-changelog.md) by semantically diffing the checked-in OpenAPI…

@metabase@metabaseInstall Skill
app-db-migrations

app-db-migrations

Add, test, run and roll back application-database (Liquibase) migrations. Use when adding a changeset, changing a table or column…

@metabase@metabaseInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about serdes-workflow.

Which coding agents can use serdes-workflow?
serdes-workflow installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.