with one click
clojure-review
Review Clojure and ClojureScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing pull requests or diffs containing Clojure/ClojureScript code.
Review Clojure and ClojureScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing pull requests or diffs containing Clojure/ClojureScript code.
Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions, and best practices. Use when writing, developing, or refactoring Clojure/ClojureScript code.
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.
Drive Metabase's UI with the Playwright MCP browser tools (mcp__playwright__browser_*). Covers the snapshot/act/check pattern, Mantine component pitfalls (Menu race, Select/MultiSelect, the Escape-closes-modal trap, portal scoping), and Metabase-specific login flows. Use whenever a session needs to interact with the Metabase UI through Playwright MCP.
Review Cypress E2E spec files for Metabase conventions, common gotchas, and flakiness/performance issues. Use when reviewing pull requests or diffs containing Cypress spec files in e2e/test/scenarios/.
Run Cypress E2E tests, analyze failures including screenshots, and stress test for flakiness
Analyze React component source code to understand UI structure, then generate idiomatic Cypress E2E tests following Metabase conventions. Falls back to Playwright MCP browser exploration only when code reading and screenshot debugging are insufficient.
| name | clojure-review |
| description | Review Clojure and ClojureScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing pull requests or diffs containing Clojure/ClojureScript code. |
| allowed-tools | Read, Grep, Bash, Glob |
@./../_shared/clojure-style-guide.md @./../_shared/clojure-commands.md
What to flag:
CLOJURE_STYLE_GUIDE.adoc exists in the working directory, also check compliance with the community Clojure style guideWhat NOT to post:
Example bad code review comments to avoid:
This TODO comment is properly formatted with author and date - nice work!
Good addition of limit 1 to the query - this makes the test more efficient without changing its behavior.
The kondo ignore comment is appropriately placed here
Test name properly ends with -test as required by the style guide.
Special cases:
Use this to scan through changes efficiently:
tbl, zs')kebab-case for all variables and functions!src or enterprise/backend/src have useful docstrings[[other-var]] not backticksTODO comments include author and date: ;; TODO (Name 2025-01-01) -- description^:private unless used elsewheredeclare when avoidable (public functions near end)let/cond)deftest forms for distinct test cases^:parallel-test or -test-<number>metabase.<module>.*, EE: metabase-enterprise.<module>.*)<module>.api namespaces<module>.core with Potemkin:clj-kondo/ignore [:metabase/modules]:- <schema>)snake_case/api/dashboard/:id)GET has no side effects (except analytics)lib, lib-be, or query-processor modulest2/select-one-fn instead of selecting full rows for one columndocs/developers-guide/driver-changelog.mddriver argument to other driver methods (no hardcoded driver names)read-column-thunk#_:clj-kondo/ignore keyword form)Quick scan for common issues:
| Pattern | Issue |
|---|---|
calculate-age, get-user | Pure functions should be nouns: age, user |
update-db, save-model | Missing ! for side effects: update-db!, save-model! |
snake_case_var | Should use kebab-case |
| Public var without docstring | Add docstring explaining purpose |
;; TODO fix this | Missing author/date: ;; TODO (Name 2025-01-01) -- description |
(defn foo ...) in namespace used elsewhere | Should be (defn ^:private foo ...) |
| Function > 20 lines | Consider breaking up into smaller functions |
/api/dashboards/:id | Use singular: /api/dashboard/:id |
Query params with snake_case | Use kebab-case for query params |
| New API endpoint without tests | Add tests for the endpoint |
For style violations:
This pure function should be named as a noun describing its return value. Consider
userinstead ofget-user.
For missing documentation:
This public var needs a docstring explaining its purpose, inputs, and outputs.
For organization issues:
This function is only used in this namespace, so it should be marked
^:private.
For API conventions:
Query parameters should use kebab-case. Change
user_idtouser-id.