Back to skills
SKILL.md
Clojure
ASecurityUse when writing Clojure or ClojureScript, editing deps.edn, using the REPL, specs, macros, or Clojure tests.
- 2 stars
- 0 votes
- 0 copies
- 10 views
- Added November 14, 2026
Works with
Security analysis
100/100Pro scans all 7 files and shows the line behind each finding
npx -y skills add anntnzrb/agents --skill clojure --agent claude-codeAre you the author of Clojure?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anntnzrb-clojure)---
disable-model-invocation: true
name: clojure
description: "Use when writing Clojure or ClojureScript, editing deps.edn, using the REPL, specs, macros, or Clojure tests."
license: AGPL-3.0-or-later
metadata:
author: anntnzrb
---
# Clojure Development
Focus: functional Clojure; `deps.edn`, `tools.deps`, immutability.
## Workflow
```
1. MODEL -> Define data with maps, records, specs
2. COMPOSE -> Build with pure functions, ->> threading
3. TEST -> Write tests first (clojure.test or Kaocha)
4. VALIDATE -> clojure -M:test/run && clj-kondo --lint src
5. ITERATE -> Refactor in REPL, keep functions pure
```
## CLI
```bash
# Project setup
clojure -Tnew app :name myuser/myapp # New app project
clojure -Tnew lib :name myuser/mylib # New library
# Run
clojure -M -m myapp.core # Run -main
clojure -M:run # Via alias
clojure -X:run # Exec function
# REPL
clj # Basic REPL
clojure -M:repl/rebel # Rebel readline
# Test
clojure -X:test/run # Run tests (Kaocha)
clojure -M:test -m kaocha.runner # Alternative
# Build
clojure -T:build uber # Uberjar
clojure -T:build jar # Library jar
# Dependencies
clojure -X:deps tree # Dependency tree
clojure -X:deps find-versions :lib clojure.java-time/clojure.java-time
clojure -M:search/outdated # Find outdated deps
```
## Notes
Project layout, deps.edn templates, core patterns, naming conventions, anti-patterns: `reference.md`.
## Engineering checks
- Normalize untrusted input once at the boundary; use `clojure.spec` only when validation or generation pays for itself.
- Preserve error context with `ex-info` and structured `ex-data`; NEVER catch-and-forget failures.
- Keep side effects, resource ownership, cancellation, and cleanup at the edge; keep core transformations pure.
- Test observable behavior and failure paths with deterministic values; avoid pinning private implementation shape.
- Introduce helpers, protocols, or abstractions only for concrete reuse or boundary needs.
## Research Tools
```
# gh search code for real-world Clojure patterns
gh search code "(go-loop [" --language=clojure
gh search code "(comp (map" --language=clojure
gh search code "(s/def ::" --language=clojure
```
## Required follow-up reads
|Need|Read|When|
|---|---|---|
|Core language/project reference|`reference.md`|For data structures, idioms, errors, layout, or `deps.edn`|
|Functional patterns|`cookbook/patterns.md`|For sequences, transducers, maps, reducers, or zippers|
|Concurrency|`cookbook/concurrency.md`|For atoms, refs, agents, dynamic vars, `core.async`, futures, or promises|
|Specs|`cookbook/spec.md`|For validation, conforming, generators, or function instrumentation|
|Testing|`cookbook/testing.md`|For `clojure.test`, Kaocha, fixtures, async tests, or test.check|
|Macros|`cookbook/macros.md`|Only when a function cannot express the required compile-time transformation|
Files in this skill
- SKILL.md
- cookbook/concurrency.md
- cookbook/macros.md
- cookbook/patterns.md
- cookbook/spec.md
- cookbook/testing.md
- reference.md
Attribution
Related skills
View all in tools →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.