clojure-review
Checks Clojure code for compliance with Metabase and community style guides.
Install
mkdir -p .claude/skills/clojure-review && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/126" && unzip -o skill.zip -d .claude/skills/clojure-review && rm skill.zipInstalls to .claude/skills/clojure-review
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
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.Key capabilities
- →Check compliance with the Metabase Clojure style guide
- →Flag style guide violations in Clojure code
- →Identify improper naming conventions in ClojureScript
- →Verify documentation for public Clojure variables
- →Review Clojure code for organization issues
- →Scan for common issues using a pattern matching table
How it works
This skill reviews Clojure and ClojureScript code changes against Metabase coding standards and a community style guide, flagging specific style violations and potential issues.
Inputs & outputs
When to use clojure-review
- →Reviewing Clojure PRs
- →Checking ClojureScript style compliance
- →Validating public function documentation
- →Ensuring correct function naming
About this skill
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 - Side-effect functions end with
! - No namespace-alias repetition in function names
Documentation
- Public vars in
srcorenterprise/backend/srchave useful docstrings - Docstrings use Markdown conventions
- References use
[[other-var]]not 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>
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]
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
Database
- Model and table names are singular nouns
- Uses
t2/select-one-fninstead of selecting full rows for one column - Logic in Toucan methods, not helper functions
Drivers
- New multimethods documented in
docs/developers-guide/driver-changelog.md - Passes
driverargument to other driver methods (no hardcoded driver names) - Minimal logic in
read-column-thunk
Miscellaneous
- Example data is bird-themed when possible
- Kondo linter suppressions use proper format (not
#_:clj-kondo/ignorekeyword form)
Pattern matching table
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 |
Feedback format examples
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 docstrings documenting code they don't own:
This describes how
libdecides binning strategies internally. Nothing here fails when that changes, so it will go stale silently — drop it and letavailable-binning-strategiesanswer for its own behavior.
For docstring content that belongs in the body:
This paragraph explains why the branches are ordered this way, which is what someone editing the
condneeds — but a caller can't act on it. Move it to an inline comment above thecond.
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.
When not to use it
- →When the changes are trivial or already follow style guidelines
- →When confirming that something 'looks good' or was done correctly
- →When the issue is a missing parenthesis, as linters catch these
Limitations
- →It does not post comments for trivial changes or adherence to guidelines
- →It does not post comments for missing parentheses
- →It only posts comments about style violations or potential issues
How it compares
This skill automates the identification of specific Clojure/ClojureScript style and quality issues, unlike a manual review that might miss subtle violations or require extensive memorization of guidelines.
Compared to similar skills
clojure-review side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| clojure-review (this skill) | 14 | 6mo | Review | Beginner |
| python-testing-patterns | 77 | 2mo | Review | Intermediate |
| dependency-upgrade | 26 | 5mo | Review | Intermediate |
| test-cases | 57 | 7mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by metabase
View all by metabase →You might also like
python-testing-patterns
wshobson
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
test-cases
cexll
This skill should be used when generating comprehensive test cases from PRD documents or user requirements. Triggers when users request test case generation, QA planning, test scenario creation, or need structured test documentation. Produces detailed test cases covering functional, edge case, error handling, and state transition scenarios.
reviewing-code
CaptainCrouton89
Systematically evaluate code changes for security, correctness, performance, and spec alignment. Use when reviewing PRs, assessing code quality, or verifying implementation against requirements.
wcag-audit-patterns
wshobson
Conduct WCAG 2.2 accessibility audits with automated testing, manual verification, and remediation guidance. Use when auditing websites for accessibility, fixing WCAG violations, or implementing accessible design patterns.
code-coverage-with-gcov
gadievron
Add gcov code coverage instrumentation to C/C++ projects