Skip to content
Back to skills

Clojure

ASecurity

Use 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
toolsrustgojavabashexpresstesting

Works with

  • cli

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned November 14, 2026

npx -y skills add anntnzrb/agents --skill clojure --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Clojure?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Clojure
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anntnzrb-clojure/badge)](https://www.skillsdirectory.com/skills/anntnzrb-clojure)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.md3 KB
  • cookbook/concurrency.md10.5 KB
  • cookbook/macros.md10.2 KB
  • cookbook/patterns.md8.7 KB
  • cookbook/spec.md9.2 KB
  • cookbook/testing.md8 KB
  • reference.md8.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.