# Write Better Clojure with REPL Workflow

Clojure work can become fragile when changes are made without fast feedback. This skill guides Claude, Codex, and Claude Code through REPL-first development, style checks, and careful refactoring.

## Install

```bash
npx skillstore add metabase/clojure-write
```

## Metadata

- Status: approved
- Slug: metabase-clojure-write
- Skillstore revision: r1
- Version status: missing
- Tree hash: 753882543ec60f74f9a94b32dbe8f182aedb7a74faabff83a504c0a180f88637
- Author: metabase
- GitHub username: metabase
- License: MIT
- Repository: https://github.com/metabase/metabase/tree/master/.claude/skills/clojure-write
- Ref: 1ffa7643651792ccb4bd3b15d924d2c97edff755
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, filesystem
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/metabase-clojure-write
- Manifest: https://skillstore.pages.dev/api/skills/metabase-clojure-write/manifest

## Capabilities

- Prefers clojure-mcp tools for REPL evaluation and structural editing when available.
- Guides bottom-up development from small functions to composed features.
- Explains how to evaluate namespaces and test functions with REPL inputs.
- Provides docstring guidance focused on caller-facing contracts and constraints.
- Reminds agents to verify Clojure readability after code changes.
- Encourages moving REPL trials into durable tests with assertions.

## Use Cases

- Build a Clojure feature incrementally: Break a feature into small functions, evaluate each part in the REPL, then compose them into production code.
- Refactor ClojureScript safely: Use structural editing and repeated evaluation to reduce syntax errors during frontend or shared-code refactors.
- Improve function documentation: Rewrite docstrings so they describe caller-facing contracts, inputs, outputs, and non-obvious constraints.

## Prompt Templates

### Start a REPL-first implementation

```
Help me implement this Clojure feature using a REPL-driven workflow. Start with the smallest functions, evaluate them, and then compose them.
```

### Verify a namespace change

```
I changed this namespace. Load it, evaluate the affected functions with representative inputs, and tell me what still needs testing.
```

### Refactor with functional style

```
Refactor this Clojure code into smaller composable functions. Preserve behavior, verify each step, and keep the code idiomatic.
```

### Audit docstrings and tests

```
Review these Clojure functions for docstring quality and missing tests. Move implementation details out of docstrings and suggest test cases for key invariants.
```

## Limitations

- Requires a Clojure or ClojureScript project context to be useful.
- Does not provide standalone Clojure tooling or dependencies.
- May rely on clojure-mcp tools or project-specific mage commands being available.
- Does not replace full test suites, code review, or production validation.

## Best Practices

- Use clojure-mcp tools for evaluation and structural edits when they are available.
- Test small functions in the REPL before composing them into larger behavior.
- Document caller-facing contracts and move implementation context near the relevant code.

## Anti Patterns

- Writing a large feature before evaluating any smaller function.
- Using docstrings to explain current implementation details instead of public behavior.
- Skipping readability checks after changing Clojure syntax or parentheses.

## Security Audit

- Audited at: 2026-07-09T04:14:20.511\+00:00
- Summary: The static findings are false positives caused by Markdown inline code, code fences, example commands, and static shared-document include paths. No prompt injection, malicious intent, secret access, network access, or unsafe dynamic command construction was found in SKILL.md.

## Stats

- Views: 349
- Downloads: 10
- Favorites: 0
- Popularity score: 0
