clojure-review
БесплатноБез исполняемых скриптовНе проверенReview Clojure and ClojureScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing…
Об этом скилле
Clojure Code Review Skill
@./../_shared/clojure-style-guide.md @./../_shared/clojure-commands.md
Review guidelines
What to flag:
- Check compliance with the Metabase Clojure style guide (included above)
- If
CLOJURE_STYLE_GUIDE.adocexists in the working directory, also check compliance with the community Clojure style guide - Flag all style guide violations
What NOT to post:
- Do not post comments congratulating someone for trivial changes or for following style guidelines
- Do not post comments confirming things "look good" or telling them they did something correctly
- Only post comments about style violations or potential issues
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:
- Do not post comments about missing parentheses (these will be caught by the linter)
Quick review checklist
Use this to scan through changes efficiently:
Naming
- Descriptive names (no
tbl,zs') - Pure functions named as nouns describing their return value
-
kebab-casefor all variables and functions - Functions that mutate shared global state (not thread-safe) end with
!, and no others: a function that only validates and throws has no! - No namespace-alias repetition in function names
- No
inner-query,outer-queryorpmbqlin names in code that works with MBQL 5: usestage,queryandmbql5
Documentation
- Public vars in
srcorenterprise/backend/srchave useful docstrings - Docstrings use Markdown conventions
- References use
other-varnot backticks -
TODOcomments include author and date:;; TODO (Name 2025-01-01) -- description
Docstring content — check every new or rewritten docstring against the anti-pattern table in the style guide above. Read the diff's docstrings on their own, separately from the code: prose is where review attention slides off, and a long docstring reads as diligence rather than as the liability it usually is.
Code Organization
- Everything
^:privateunless used elsewhere - No
declarewhen avoidable (public functions near end) - Functions under 20 lines when possible
- No blank, non-comment lines within definition forms (except pairwise constructs in
let/cond) - Lines ≤ 120 characters
Tests
- Separate
deftestforms for distinct test cases - Pure tests marked
^:parallel - Test names end in
-testor-test-<number> - Test queries, fixtures included, built with
lib/(lib/query,lib/native-query), never hand-written maps (except a deliberately non-MBQL-5 query in a test that checks it is refused or converted) - New tests do not use
mt/mbql-query,mt/query,mt/native-queryormt/run-mbql-query - New tests that need no real app DB objects use
meta/metadata-providerandlib.tu/mock-metadata-provider, not(mt/metadata-provider)andmt/with-temp
Modules
- Correct module patterns (OSS:
metabase.<module>.*, EE:metabase-enterprise.<module>.*) - API endpoints in
<module>.apinamespaces - Public API in
<module>.corewith Potemkin - No cheating module linters with
:clj-kondo/ignore [:metabase/modules]
Models
See the backend-model-rules skill.
- Hooks run no app-DB statement: only defaults, derived columns, and checks on the row and its stored version
- A rule that needs another row is in the model's write function (
Writessection), which every writer calls - Write functions are bulk: no statement count grows with the number of rows, shown by a call-count test at two sizes
- No Toucan write on a model of another module; callers use that model's write functions
- Write functions publish their events by hand, inside their transaction, after their last statement
- Hooks and write functions read no current user and do not depend on who the writer is
- Derived columns are absent from request schemas
- Per-user rules are in
:can_read/:can_writehydrations,mi/can-create?ormi/can-update? - Uniqueness rules have a unique index
REST API
- Response schemas present (
:- <schema>) - Query params use kebab-case, bodies use
snake_case - Routes use singular nouns (e.g.,
/api/dashboard/:id) -
GEThas no side effects (except analytics) - Malli schemas detailed and complete
- All new endpoints have tests
MBQL
- No raw MBQL manipulation outside
lib,lib-be, orquery-processormodules - Uses Lib and MBQL 5, not legacy MBQL
- No new call to
lib/->legacy-MBQL, in source or tests: it is about to be removed - No additions or changes to
Установить clojure-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepBashGlobFAQ
Что делает скилл 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.
Как установить скилл clojure-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл clojure-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic