nw-fp-clojure

nw-fp-clojure is a skill for Claude Code, Codex from nWave-ai/nWave. It costs 25 tokens per session (1,821 once invoked), scanned A, original, MIT.

A guide to functional programming in Clojure, centered on data-first design, interactive REPL development, and runtime validation with specs.

In plain words
What is it for?
Use it to explore code interactively, model data-centric domains, validate maps and fields, and run Clojure tests.
Why use it?
It helps teams work with changing data shapes while making a dynamically typed language's assumptions explicit.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nwave-ai/nwave/nw-fp-clojure
Any agent
npx skills add nWave-ai/nWave --skill nw-fp-clojure
Clone the repo
git clone --depth 1 https://github.com/nWave-ai/nWave

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nw-fp-clojure

README.md
[![agentmods](https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-fp-clojure.svg)](https://agentmods.dev/skills/nwave-ai/nwave/nw-fp-clojure)
Your own site
<a href="https://agentmods.dev/skills/nwave-ai/nwave/nw-fp-clojure"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-fp-clojure.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,821 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00025 $0.01821
Opus 5 $0.00013 $0.00911
Sonnet 5 $0.00005 $0.00364
Haiku 4.5 $0.00003 $0.00182

Measured yesterday against content hash 2bfc7a6d240d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

nw-fp-clojure scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

nWave/skills/nw-fp-clojure/SKILL.md · 225 lines

How it starts

The opening of the file, as written. The whole thing — 225 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FP in Clojure -- Functional Software Crafter Skill

Cross-references: fp-principles | fp-domain-modeling

When to Choose Clojure

  • Best for: data-centric domains | REPL-driven exploration | rapid prototyping | frequently evolving data shapes
  • Not ideal for: teams wanting compile-time type safety | Android | teams unfamiliar with Lisp syntax

[STARTER] Quick Setup

# Install Clojure CLI
brew install clojure/tools/clojure  # macOS
# Create project
mkdir -p order-service/src/order_service order-service/test/order_service
# Run REPL: clj | Run tests: clj -X:test

Namespace caveat: Clojure namespaces use - but filenames use _ (JVM requirement). order-service.core lives in order_service/core.clj.

[STARTER] Domain Modeling with Spec

Clojure is dynamically typed. Domain modeling uses maps with qualified keywords, validated at runtime.

(require '[clojure.spec.alpha :as s])

;; Domain wrappers as specs
(s/def ::order-id pos-int?)
(s/def ::email (s/and string? #(clojure.string/includes? % "@")))
(s/def ::customer-name (s/and string? #(> (count %) 0)))

;; Record types as spec'd maps
(s/def ::customer (s/keys :req [::customer-name ::email] :opt [::phone]))

;; Choice types as spec alternatives
(s/def ::payment-method
  (s/or :credit-card (s/keys :req [::card-number ::expiry-date])
        :bank-transfer (s/keys :req [::account-number])
        :cash #{:cash}))

[STARTER] Validated Construction

(defn make-email [raw-email]
  (if (s/valid? ::email raw-email)
    {:ok raw-email}
    {:error (str "Invalid email: " raw-email)}))

[INTERMEDIATE] Auto-Generated Test Data from Specs

(require '[clojure.spec.gen.alpha :as gen]
         '[clojure.spec.test.alpha :as stest])

(gen/sample (s/gen ::customer) 5)  ;; random valid customers

;; Auto-test functions against their specs
(s/fdef validate-order
  :args (s/cat :raw-order ::raw-order)
  :ret (s/or :ok ::validated-order :error ::validation-error))
(stest/check `validate-order)

Read the full file on GitHub · 225 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 225 lines · 25 tokens per session scan A 2bfc7a6d240d

Subscribe to this mod's changes

nw-fp-clojure is a skill published in the GitHub repository nWave-ai/nWave (604 stars, last pushed 5d ago), licensed MIT. It adds 25 tokens to every session and 1,821 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.