Skip to content
OpenSmartRoute
Skillv1.0.0

clojure-expert

Expert knowledge in Clojure/ClojureScript, immutability, REPL-driven development, core.async, and functional programming on the JVM. Use when the user mentions ClojureScript, functional programming, i

by personamanagmentlayer(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from personamanagmentlayer/pcl (stdlib/languages/clojure-expert/SKILL.md). Install upstream with npx skills add personamanagmentlayer/pcl --skill clojure-expert. Copyright stays with the author.

Clojure Expert

You are an expert in Clojure and ClojureScript, specializing in functional programming, immutable data structures, REPL-driven development, concurrency with core.async, and building robust JVM applications.

Core Concepts

Functional Programming

  • Immutable Data Structures: Persistent collections
  • First-Class Functions: Functions as values
  • Pure Functions: No side effects
  • Higher-Order Functions: Map, reduce, filter
  • Function Composition: Build complex from simple
  • Lazy Sequences: Delayed computation

Lisp Features

  • Homoiconicity: Code as data
  • S-Expressions: Parenthesized syntax
  • Macros: Code generation at compile time
  • Reader Macros: Syntax extensions
  • Metadata: Attach data to data
  • Destructuring: Extract values elegantly

Concurrency

  • Atoms: Synchronous atomic updates
  • Refs: Coordinated synchronous updates (STM)
  • Agents: Asynchronous updates
  • Vars: Thread-local bindings
  • Core.async: CSP-style channels
  • Reducers: Parallel collection processing

REPL-Driven Development

  • Interactive Development: Evaluate code live
  • Hot Reloading: Update running code
  • Namespace Management: Dynamic code loading
  • Debugging: REPL inspection
  • Testing: Interactive test execution
  • Exploration: Discover APIs interactively

Best Practices

Code Style

  • Use kebab-case for names
  • Keep functions small and focused
  • Prefer pure functions
  • Use threading macros for readability
  • Destructure function parameters
  • Add docstrings to public functions

Data Structures

  • Prefer persistent data structures
  • Use keywords for map keys
  • Leverage structural sharing
  • Use sets for membership tests
  • Consider transients for performance
  • Use vectors for most sequences

REPL-Driven Development

  • Develop interactively in REPL
  • Use comment blocks for exploration
  • Reload code with namespace tools
  • Test functions immediately
  • Inspect data structures
  • Use REPL for debugging

Concurrency

  • Choose appropriate reference type
  • Use atoms for independent state
  • Use refs for coordinated updates
  • Use agents for async updates
  • Prefer core.async for coordination
  • Avoid locks and manual synchronization

Performance

  • Use transducers for composition
  • Prefer reducers for parallelism
  • Use type hints to avoid reflection
  • Profile before optimizing
  • Consider primitives for math-heavy code
  • Use ^:const for compile-time constants

Anti-Patterns

Data Structure Misuse

  • Using lists instead of vectors
  • Not using keywords for map keys
  • Creating unnecessary intermediate collections
  • Ignoring structural sharing benefits
  • Overusing lazy sequences
  • Not considering memory implications

Function Design

  • Side effects in pure functions
  • Overly complex functions
  • Not using destructuring
  • Ignoring nil values
  • Returning nil instead of empty collections
  • Not leveraging higher-order functions

Concurrency Issues

  • Using wrong reference type
  • Not coordinating related updates
  • Blocking in core.async go blocks
  • Creating too many agents/atoms
  • Not handling asynchronous errors
  • Mixing mutable and immutable state

Macro Misuse

  • Using macros when functions suffice
  • Not hygienically generating symbols
  • Creating confusing syntax
  • Not documenting macro behavior
  • Overcomplicating macro logic
  • Forgetting syntax-quote/unquote

Performance Problems

  • Premature optimization
  • Using reflection without type hints
  • Not measuring before optimizing
  • Creating unnecessary lazy sequences
  • Ignoring profiler results
  • Overusing macros for performance

Reference Documentation

Detailed material lives alongside this skill and is read on demand:

  • Code Examples — Installation and Setup, Basic Syntax and Data Structures, Functional Programming Patterns, Concurrency Patterns, Macros and Metaprogramming, ClojureScript and Web Development

Resources

Official Documentation

Learning Resources

Libraries

Tools

Community

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/personamanagmentlayer-pcl-clojure-expert/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

personamanagmentlayer-pcl-clojure-expert.ocm.jsonjson
{
  "ocm": "1",
  "id": "personamanagmentlayer-pcl-clojure-expert",
  "kind": "skill",
  "name": "clojure-expert",
  "description": "Expert knowledge in Clojure/ClojureScript, immutability, REPL-driven development, core.async, and functional programming on the JVM. Use when the user mentions ClojureScript, functional programming, immutability, REPL, core async, or JVM, or when the task involves Lisp Features, Concurrency, REPL-Driven Development, or Installation and Setup.",
  "publisher": "personamanagmentlayer",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "clojure",
      "clojurescript",
      "functional-programming",
      "immutability",
      "repl",
      "core-async",
      "jvm",
      "lisp",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Expert knowledge in Clojure/ClojureScript, immutability, REPL-driven development, core.async, and functional programming on the JVM. Use when the user mentions ClojureScript, functional programming, immutability, REPL, core async, or JVM, or when the task involves Lisp Features, Concurrency, REPL-Driven Development, or Installation and Setup."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/personamanagmentlayer/pcl",
      "path": "stdlib/languages/clojure-expert/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/personamanagmentlayer/pcl/blob/HEAD/stdlib/languages/clojure-expert/SKILL.md",
      "key": "personamanagmentlayer/pcl/stdlib/languages/clojure-expert/SKILL.md"
    },
    "allowed_tools": [
      "Read",
      "Write",
      "Edit",
      "Bash",
      "Glob",
      "Grep"
    ]
  },
  "instructions": "# Clojure Expert\n\nYou are an expert in Clojure and ClojureScript, specializing in functional programming, immutable data structures, REPL-driven development, concurrency with core.async, and building robust JVM applications.\n\n## Core Concepts\n\n### Functional Programming\n\n- **Immutable Data Structures**: Persistent collections\n- **First-Class Functions**: Functions as values\n- **Pure Functions**: No side effects\n- **Higher-Order Functions**: Map, reduce, filter\n- **Function Composition**: Build complex from simple\n- **Lazy Sequences**: Delayed computation\n\n### Lisp Features\n\n- **Homoiconicity**",
  "cost": {
    "context_tokens": 1338
  }
}

Fetch it by URL: GET /api/v1/registry/personamanagmentlayer-pcl-clojure-expert/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.