
Serdes Workflow
FreeStreamline exporting and importing Metabase content.
Free · Opens the source repo
What Serdes Workflow does
The Serdes Workflow skill provides a comprehensive solution for managing content within a Metabase instance. It facilitates the export of Metabase content as YAML files, which can then be validated, edited, and imported back into the system. This skill is particularly useful for developers and data analysts who need to manage and manipulate Metabase configurations and content efficiently. By utilizing this skill, users can ensure that their data configurations are accurate and up-to-date, reducing the risk of errors during the import process.
To get started, users must have the :ee alias configured, as the skill relies on enterprise code for exporting, importing, and validation. The export command allows for selective export of specific collection IDs and includes options for error handling. The exported YAML files follow a structured directory layout, making it easy to navigate and manage the content. After exporting, users can validate the YAML files using structural and cards checkers, which ensure that the files adhere to the expected schemas and that queries resolve correctly against the exported metadata.
Editing YAML files is supported through guidance provided by the associated serdes-yaml-edit skill. It is crucial to run both validation checkers after any modifications to catch potential issues before importing the data back into Metabase. The import process requires the MB_DB_CONNECTION_URI to be set to the target Postgres database, ensuring that the data is imported into the correct environment. This skill effectively streamlines the workflow for exporting, validating, editing, and importing Metabase content, making it an essential tool for users managing complex data environments.
When to use it
Use this skill when you need to manage Metabase content through a structured YAML workflow, particularly for exporting and importing configurations.
When not to use it
This skill is not suitable for users who do not have a Metabase enterprise instance or those who require a GUI-based approach to manage content.
What you can build with it
Exporting Metabase Content
Use the export command to generate YAML files of your Metabase content, allowing for easy management and backup.
Validating YAML Configurations
Run the structural and cards checkers to ensure that your YAML files are correctly formatted and that queries are valid before importing.
Importing Edited Configurations
After editing your YAML files, use the import command to bring the changes back into your Metabase instance, ensuring the connection URI is set correctly.
How to install Serdes Workflow
View source1. Install with the skills CLI
npx skills add metabase/metabase/serdes-workflow --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by metabaseSerdes 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
- Export:
clojure -M:run:ee export /tmp/metabase-export - Validate baseline: run both checkers
- Edit YAML files (see serdes-yaml-edit skill)
- Re-validate: run both checkers again
- Import:
MB_DB_CONNECTION_URI=... clojure -M:run:ee import /tmp/metabase-export -e - Verify in browser
Frequently asked questions about Serdes Workflow
Similar skills
ClickHouse Logs Queries
Efficiently manage Supabase logs with ClickHouse SQL.
EF Core D2 Database Diagram Generator
Visualize your EF Core models as D2 diagrams effortlessly.
Safe SQL Execution
Ensure secure SQL execution in Supabase applications.
Oracle to PostgreSQL Migration
Identify migration risks between Oracle and PostgreSQL.
SSMA Console
Streamline Oracle to SQL Server migrations with ease.
SQL Performance Optimization
Enhance SQL query efficiency across all databases.
