Skip to content

Latest commit

 

History

History
63 lines (39 loc) · 3.21 KB

File metadata and controls

63 lines (39 loc) · 3.21 KB

Metabase Development Guide

Skills

For detailed guidance on writing and reviewing code and documentation, see the skills in .claude/skills/:

Clojure

clojure-mcp tools

  • clojure-eval - Always use this to evaluate Clojure code, run tests, and verify edits/compile. Prefer this over shell commands.
  • clojure-write - Clojure/ClojureScript development with REPL-driven workflow and coding conventions
  • clojure-review - Clojure/ClojureScript code review guidelines and style enforcement

clojure-mcp-lite tools

  • clj-nrepl-eval - This is another good mechanism for running Clojure code on an nrepl server.

TypeScript

Documentation

  • docs-write - Documentation writing with Metabase style guide
  • docs-review - Documentation review checklist

Serialization

Frontend

Important: When working with frontend code, read frontend/CLAUDE.md for project-specific guidelines on component preferences, styling, TypeScript migration, testing requirements, and available scripts.

Running Backend Tests

If you do not have clojure-eval available to you or clj-nrepl-eval, do not fall back to clj -X:dev:test directly. Instead, use ./bin/test-agent. It produces clean, plain-text output with no progress bars or ANSI codes.

./bin/test-agent :only '[metabase.foo-test]'              # run a namespace
./bin/test-agent :only '[metabase.foo-test/some-test]'    # run a single test
./bin/test-agent :only '[metabase.foo-test metabase.bar-test]'  # multiple namespaces

For module-scoped runs — useful when validating a branch's blast radius — pass :module (single) or :modules (vector) to scope tests to the module(s) the branch touched. The test runner resolves these to test directories: enterprise/fooenterprise/backend/test/metabase_enterprise/foo, otherwise test/metabase/<name> (see metabase.test-runner/parse-options).

./bin/test-agent :module enterprise/workspaces
./bin/test-agent :modules '[sql-parsing query-processor]'
# Driver tests: --drivers=LIST adds the driver aliases and sets DRIVERS=LIST in one step.
./bin/test-agent --drivers=mysql,h2,postgres :module enterprise/workspaces

Once again, do not use clj -X:dev:test directly — its progress-bar output is hard to parse.

Tool Preferences

If clojure-mcp tools are available, prefer them over shell-based alternatives for Clojure development.