clojure-expert — субагент для Claude Code: обзор и установка
Субагент clojure-expert помогает писать и оптимизировать код на Clojure, настраивать core.async и выстраивать чистые функции с иммутабельными структурами данных.
MIT ★ 1 029 обновлён 2025-10-15
.claude/agents/clojure-expert.mdЧто делает clojure-expert
Субагент ориентирован на функциональное программирование в Clojure. Он генерирует чистые функции, работает с векторами, мапами и множествами, исключая лишние побочные эффекты. При проектировании параллелизма и асинхронных процессов субагент задействует библиотеку core.async и программную транзакционную память (STM).
Для управления сборкой и зависимостями субагент опирается на Leiningen и файл project.clj. Он помогает писать макросы без раздувания бойлерплейта, настраивает хвостовую рекурсию и оформляет интерактивные сессии в REPL. Без установленного Leiningen запустить готовые сценарии сборки из коробки не получится.
Какие задачи решает
- спроектировать асинхронную обработку данных через core.async
- написать макросы для предметно-ориентированного синтаксиса
- оптимизировать хвостовую рекурсию и чистые функции
- настроить конфигурацию зависимостей в project.clj через Leiningen
Примеры запросов агенту
- Оптимизируй обработку очередей через
core.asyncбез блокировки потоков. - Напиши макрос для валидации параметров конфигурации в
project.clj. - Перепиши этот рекурсивный алгоритм на чистый Clojure с хвостовой оптимизацией.
Как установить clojure-expert
Вручную: положить файлы
.claude/agents/clojure-expert.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/clojure-expert.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/clojure-expert.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о clojure-expert
Как установить clojure-expert в Claude Code?
Сохраните файл субагента по пути .claude/agents/clojure-expert.md.
Что делает clojure-expert?
Субагент помогает писать и рефакторить код на Clojure, проектировать каналы core.async, создавать макросы и управлять зависимостями проекта.
Какой инструмент сборки использует субагент?
Субагент по умолчанию ориентируется на Leiningen и структуру зависимостей в файле project.clj.
Исходный текст
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