add-malli-schemas
Efficiently add Malli schemas to API endpoints in the Metabase codebase with proper patterns, validation timing, and error handling
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.
$ npx -y skills add metabase/metabase --skill serdes-workflow --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/serdes-workflowContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
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.
End-to-end workflow for exporting Metabase content as YAML, validating it, editing it, and importing it back.
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).
clojure -M:run:ee export /path/to/export-dir
Flags:
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
Always run both checkers after any modification. They skip full Metabase startup (~8s each).
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.
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:
See the **serdes-yaml-edit** skill for guidance on editing YAML files. The critical rule: **run both checkers after every edit before proceeding**.
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.
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
Metabase is the easy, open-source way for everyone in your company to ask questions and learn from data.
Repo: metabase/metabase
Efficiently add Malli schemas to API endpoints in the Metabase codebase with proper patterns, validation timing, and error handling
Add OpenTelemetry tracing spans to Clojure code following Metabase tracing conventions. Use when instrumenting backend code with trace coverage.
Add product analytics events to track user interactions in the Metabase frontend
Evaluate Clojure code via nREPL using clj-nrepl-eval. Use this when you need to test code, check if edited files compile, verify function behavior, or interact…
Review Clojure and ClojureScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing pull…
Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions, and best practices. Use when writing, developing, or refactoring…