/squint:squintfrom squint
Provides operational depth for Squint ClojureScript development including compilation model, REPL workflow, language semantics, and debugging. Useful when writing or reviewing .cljs files compiled to .mjs, working with Squint REPL sessions, or setting up Squint builds.
Ships in squint. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Squint is a ClojureScript-syntax compiler that emits ES module JavaScript. It is NOT standard ClojureScript (shadow-cljs) and NOT SCI — it has fundamentally different semantics for data structures, keywords, and async. The Clojure skill's S3 Dialects section provides cross-dialect comparison; this skill provides full Squint operational depth.
Squint compiles .cljs files to ES modules (.mjs) via configuration in squint.edn:
{:paths ["src"]
:output-dir "lib"
:extension "mjs"}
Key implications:
require compiles to ES import — circular dependencies cause the same issues as in JSReferenceError: X is not defined errorsUse clojure_list_sessions to find the Squint REPL session (typically squint-repl). Test pure functions and verify assumptions in the REPL before committing to files.
Development cycle:
npx squint watch or project-specific watcher) for continuous compilationSquint compiles keywords to plain JavaScript strings:
:foo → "foo", :foo/bar → "foo/bar"(= :loaded "loaded") → true — they are the same valuestr works naturally: (str "prefix-" :status) → "prefix-status"keyword? does not exist — there is no distinct keyword type to test forMaps are JS objects, vectors are JS arrays, sets are JS Sets. No persistent data structures:
assoc, conj, update return shallow copies — the original is not mutated (REPL-verified)(= a b) on maps/vectors is reference equality, not structuralassoc! does NOT exist — use assoc^:async + js-await^:async metadata — they return Promisesjs-await and bare await work (REPL-verified). Convention: use js-await in Squint code for clarity, since bare await is the SCI convention.js-await — must be inside an ^:async functiondoseq does NOT properly await js-await calls — iterations fire concurrentlyloop/recur for sequential async iteration(defn ^:async process-items! [items]
(loop [remaining items]
(when (seq remaining)
(js-await (handle-item! (first remaining)))
(recur (rest remaining)))))
js->clj / clj->jsThese functions do not exist. They compile to unqualified bare calls (js__GT_clj()) that crash at runtime with ReferenceError. Data is already JS-native — no conversion needed.
nil is nullSquint compiles nil to JavaScript null (REPL-verified):
nil? returns true for both null and undefined (uses JS loose equality)identical? distinguishes them: (identical? nil js/undefined) → falseundefined test as nil? but are not identical? to nilSeveral clojure.core functions are missing or behave differently in Squint:
| Function | Status | Workaround |
|---|---|---|
name | does not exist | keywords are already strings — use directly |
keyword | does not exist | use the string directly |
keyword? | does not exist | no distinct keyword type |
sequential? | true for strings | use vector? to distinguish |
js->clj / clj->js | do not exist | data is already JS-native |
Set callability: inline set literals work ((#{:a :b} :a) → "a") but sets bound to vars are not callable (REPL-verified). Use (contains? s :a) for consistent behavior.
No auto-resolved keywords — ::my-key is a compiler error. Spell out the namespace.
When uncertain, query the Squint runtime directly:
node -e "import('squint-cljs/core.js').then(m => console.log(typeof m.someFn))"
undefined means the function does not exist. The Squint source at src/squint/core.js in the Squint repo is the definitive reference for available core functions.
When Squint does not recognize a symbol, it emits an unqualified JS call. The compiler does not error — but the generated code crashes at runtime. refer for missing functions silently succeeds but does not make them available.
(.-my-prop obj) converts hyphens to underscores → obj.my_prop(aget obj "my-prop") for literal property names with hyphens(:key obj) works (compiles to string lookup on JS object)(:require [lib :as alias])js/ prefix works for global access: js/document, js/console.log, js/fetchPrefer idiomatic Clojure functions over JavaScript interop when an equivalent exists. Squint supports most of clojure.string and the core library:
;; Prefer
(string/includes? s "needle")
(string/replace s #"old" "new")
(mapv transform items)
;; Over
(.includes s "needle")
(.replace s "old" "new")
(.map items transform)
JS interop is appropriate for host-specific APIs (DOM, Node.js, browser APIs) where no Clojure equivalent exists.
When a runtime error does not match the source:
.mjs file to see what Squint generatedname(...) instead of squint_core.name(...))ReferenceError: X is not defined back to missing core functionsjs-await by convention in Squint code (distinguishes from SCI's await)js->clj/clj->js — data is already JS-nativecontains? for set membership — do not call sets as functions from variablesWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub betterthantomorrow/awesome-backseat-driver --plugin squintOther plugins' skills for the same job