skills/metabase/clojure-write/SKILL.md
Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions, and best practices. Use when writing, developing, or refactoring Clojure/ClojureScript code.
npx skillsauth add aiskillstore/marketplace clojure-writeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When clojure-mcp tools are available (e.g., clojure_eval, clojure_edit), always use them
instead of shell commands like ./bin/mage -repl. The MCP tools provide:
Only fall back to ./bin/mage commands when clojure-mcp is not available.
This guide covers Clojure and ClojureScript coding conventions for Metabase. See also: CLOJURE_STYLE_GUIDE.adoc for the Community Clojure Style Guide.
General Naming:
acc, i, pred, coll, n, s, k, fkebab-case for all variables, functions, and constantsFunction Naming:
age not calculate-age or get-age)!Destructuring:
snake_case keysDocstrings:
src or enterprise/backend/src must have docstring[[other-var]] not backticksComments:
TODO format: ;; TODO (Name M/D/YY) -- descriptionVisibility:
^:private unless it is used elsewheredeclare (put public functions near the end)Size and Structure:
let/cond)Keywords and Metadata:
:query-type/normal not :normal:arglists metadata if they're functions but wouldn't otherwise have itOrganization:
deftest forms for logically separate test cases-test or -test-<number>Performance:
^:parallelOSS Modules:
metabase.<module>.* patternsrc/metabase/<module>/Enterprise Modules:
metabase-enterprise.<module>.* patternenterprise/backend/src/metabase_enterprise/<module>/Module Structure:
<module>.api or <module>.api.* namespaces<module>.core using Potemkin imports<module>.models.*<module>.settings<module>.schemaModule Linters:
:clj-kondo/ignore [:metabase/modules]Required Elements:
:- <schema> after route string)Naming Conventions:
snake_case/api/dashboard/:id)Behavior:
GET endpoints should not have side effects (except analytics)defendpoint forms should be small wrappers around Toucan model codeRestrictions:
lib, lib-be, or query-processor modulesNaming:
snake_case identifiersBest Practices:
t2/select-one-fn instead of fetching entire rows for one columnDocumentation:
docs/developers-guide/driver-changelog.mdImplementation:
driver argument to other driver multimethodsread-column-thunk in JDBC-based driversExamples:
Linter Suppressions:
#_:clj-kondo/ignore (keyword form)Configurable Options:
:internal defsetting instead./bin/mage kondo-updated master (or whatever target branch)
./bin/mage kondo <file or files>
./bin/mage kondo-updated HEAD./bin/mage cljfmt-files [path]./bin/mage run-tests namespace/test-name./bin/mage run-tests namespace./bin/mage run-tests test/metabase/notification Because the module lives in that directory.Note: the ./bin/mage run-tests command accepts multiple args, so you can pass
./bin/mage run-tests namespace/test-name namespace/other-test namespace/third-test
to run 3 tests, or
./bin/mage run-tests test/metabase/module1 test/metabase/module2 to run 2 modules.
./bin/mage -check-readable <file> [line-number]
Note: If you have
clojure-mcptools available (check for tools likeclojure_eval), always prefer those over./bin/mage -repl. The MCP tools provide better integration, richer feedback, and avoid shell escaping issues. Only use./bin/mage -replas a fallback when clojure-mcp is not available.
./bin/mage -repl '<code>'
./bin/mage -repl '(+ 1 1)' where (+ 1 1) is your Clojure code.
./bin/mage -repl -h for more details.To call your.namespace/your-function on arg1 and arg2:
./bin/mage -repl --namespace your.namespace '(your-function arg1 arg2)'
DO NOT use "require", "load-file" etc in the code string argument.
The ./bin/mage -repl command returns three separate, independent outputs:
value: The return value of the last expression (best for data structures)stdout: Any printed output from println etc. (best for messages)stderr: Any error messages (best for warnings and errors)Example call:
./bin/mage -repl '(println "Hello, world!") '\''({0 1, 1 3, 2 0, 3 2} {0 2, 1 0, 2 3, 3 1})'
Example response:
ns: user
session: 32a35206-871c-4553-9bc9-f49491173d1c
value: ({0 1, 1 3, 2 0, 3 2} {0 2, 1 0, 2 3, 3 1})
stdout: Hello, world!
stderr:
For effective REPL usage:
println for human-readable messages./bin/mage -repl --namespace metabase.app-db.connection
deftest and is.-check-readabledevelopment
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.