Install any skill in seconds. Free to start, no credit card required.
Get Started Free →nwave-ai/nw-fp-clojure
Clojure language-specific patterns, data-first modeling, REPL-driven development, and spec
Passed 19 of 23 test cases with the skill, and 15 of 23 without it.
and 3 more in the full report
5 fixed14 passed either way3 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
Write a Clojure constructor function 'make-user' that takes a raw string input, validates it against a spec, and returns an explicit result structure distinguishing success from failure.
| Checked | Without skill | With skill |
|---|---|---|
| Uses s/valid? to evaluate raw input against spec. | Passed | Passed |
| Returns {:ok raw-input} map on valid validation. | Missed | Passed |
The instructions your model reads when the skill loads.
Cross-references: fp-principles | fp-domain-modeling
# 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.
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])
test cases passed, vs 15 / 23 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.