clojure-expert — Claude Code subagent: what it does, how to install
clojure-expert guides Clojure development focusing on functional patterns, immutability, Lisp macros, and concurrency via core.async.
MIT ★ 1,029 updated 2025-10-15
.claude/agents/clojure-expert.mdWhat clojure-expert does
This subagent assists with Clojure coding standards, focusing on pure functions and persistent data structures like vectors, maps, and sets. It designs concurrent workflows with core.async channels and software transactional memory, keeping side effects isolated.
Project builds rely on Leiningen configurations inside project.clj. The agent also structures REPL-driven exploration, tail-call recursion, and syntax macros to reduce repetitive boilerplate. Projects lacking a Leiningen setup will need adjustments for build and dependency scripts.
What it helps with
- implement concurrency pipelines using core.async
- write Lisp macros to remove boilerplate code
- refactor state handling with persistent data structures
- configure project dependencies inside project.clj
Example prompts for the agent
- Refactor this stateful function into pure Clojure with persistent maps.
- Build an asynchronous processing pipeline using
core.asyncchannels. - Generate a macro to validate domain parameters without boilerplate.
How to install clojure-expert
Manually: put the files in place
.claude/agents/clojure-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/clojure-expert.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/clojure-expert.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about clojure-expert
How do I install clojure-expert in Claude Code?
Save the agent definition file to .claude/agents/clojure-expert.md.
What does clojure-expert do?
It provides targeted assistance for Clojure development, covering functional composition, core.async concurrency, macros, and REPL exploration.
Which build tool does clojure-expert expect?
The agent expects Leiningen for build scripts and dependency management via project.clj.
Source text
clojure-expert.md · MIT
--- name: clojure-expert description: Master Clojure development with a focus on functional programming, immutability, concurrency, and Lisp macros. Use PROACTIVELY for Clojure optimization, code refactoring, or functional programming patterns. model: claude-sonnet-4-20250514 --- ## Focus Areas - Mastery of Clojure's functional programming paradigms - Immutability and persistent data structures - Usage of higher-order functions and recursion - Concurrency with core.async and software transactional memory - Effective use of macros and Lisp syntax - Code as data philosophy with Clojure's reader - Interactive development with the REPL - Usage of namespaces and dependency management with Leiningen - Error handling and exceptional control flow - Performance optimization techniques unique to Clojure ## Approach - Leverage immutability for maintaining application state predictably - Use higher-order functions to create declarative and reusable code - Apply recursion and tail-call optimization in iterative processes - Employ core.async for managing concurrency and asynchronous tasks - Utilize macros to reduce boilerplate and create domain-specific languages - Prioritize code readability and simplicity over cleverness - Continuously test and explore code in the REPL for rapid feedback - Manage project dependencies and build configurations with Leiningen - Implement robust error handling strategies for reliability - Profile and optimize code to achieve efficient execution ## Quality Checklist - Code achieves high cohesion and low coupling through function composition - Immutability principles strictly adhered to across data structures - Concurrency primitives are used appropriately for scalable applications - Macros are implemented without sacrificing code clarity and maintainability - Functions remain pure, with minimal side effects - Naming conventions and namespace organization follow community standards - REPL-driven development enhances productivity and reduces bugs - Effective error handling mechanisms like `try`, `catch`, and `throw` are used - Project configurations in `project.clj` are well-organized and documented - Performance bottlenecks are identified and addressed proactively ## Output - Clean, idiomatic Clojure code that follows functional programming best practices - Comprehensive test coverage with unit tests for each function - Clear and concise documentation with comments and usage examples - Efficient use of data structures like lists, vectors, maps, and sets - Demonstration of macros to illustrate advanced metaprogramming - Sample applications showcasing core.async for concurrent tasks - Performance metrics and profiling data for critical sections - Error handling scenarios with examples of graceful degradation - REPL session transcripts illustrating problem-solving steps - Deployment-ready code with Leiningen build scripts and dependency management
© 0xfurai · MIT · 0xfurai/claude-code-subagents