ClojureScript Smells Fix (Placeholder)
This skill is a placeholder. ClojureScript-specific code review against a curated smells catalog is planned but not yet implemented. Running /cljs-smells-fix today shows this notice and exits. The argument grammar and mutation contract land now so the eventual implementation has a contract to honor. See CONVENTIONS.md in the repo root for the standard.
Arguments
| Input | Target |
|---|---|
| (no argument) | Fix changed files only (staged + unstaged) |
all |
Fix the full codebase, sampling high-risk and high-traffic namespaces |
path/to/dir |
Fix files under directory |
path/to/file.cljs |
Fix specific file |
--report |
Disable all writes; produce the report only |
Examples:
/cljs-smells-fix
/cljs-smells-fix src/my_app
/cljs-smells-fix src/my_app/core.cljs
/cljs-smells-fix all
/cljs-smells-fix --report
When implemented, the skill mirrors the mutation contract of /clj-smells-fix: Stage 1 mechanical findings and Stage 2 DEFECT-tier findings within a defined safety band are auto-applied; SMELL and HINT findings remain report-only; --report disables all writes.
When (no argument) is invoked outside a git worktree, the eventual implementation will ask the operator what to fix rather than widening silently to all.
The eventual implementation will honor Rule 4 in CONVENTIONS.md: vendored, generated, and dependency-locked paths are excluded from broad scopes (.gitignore matches plus a hardcoded floor of node_modules/, vendor/, third_party/, .bundle/, target/, build/, dist/, out/, .shadow-cljs/, cljd-out/, and the standard lock files). Naming a vendored path directly through <path> or <glob> bypasses the filter for that target.
Status
Not implemented. A ClojureScript-specific smells catalog is pending. Reusing the JVM-Clojure clj-smells catalog catches the cross-dialect smells the /clj-smells-fix skill in clojure-skills already covers, but it does not flag the ClojureScript-specific failure modes that come from JavaScript interop, externs handling, advanced compilation, and the JS event loop.
For host-neutral smells in .cljs and .cljc files, run /clj-smells-fix from clojure-skills. It already filters .cljs files into scope and uses clj-kondo plus an LLM pass against the curated catalog.
Planned Categories
When implemented, this review will cover ClojureScript-specific failure modes:
- Advanced-compilation hazards:
ageton objects, property access without^jshints on values that flow into advanced builds,goog.object/getwith non-string keys, missing externs for libraries that escape inference. - Macro stage confusion: macros defined in
.cljsfiles (must be.cljor.cljc),:require-macrosused where:include-macros truewould suffice,:referused for symbols that are actually macros. - Truthiness and number traps:
ifon values that are0,"", orNaNwithout^booleanhints, equality checks across0and0.0(which evaluates totrueon ClojureScript), reliance onRatioorBigDecimalliterals that do not exist on the host. - Async / event-loop patterns: blocking patterns ported from JVM code,
core.async<!outside agoblock in code that runs in the browser, unhandled rejected promises, leaks from unwrappedsetTimeout/setInterval. - Reagent / re-frame patterns: derefing reagent atoms outside reactive contexts, side-effecting subscriptions, mutating component-local state across render boundaries, missing keys on lists, hooks called conditionally.
- JS interop hygiene:
js->cljwithout:keywordize-keys truefollowed by:foolookups that miss,clj->jswithout symmetric:keyword-fn, directjs/windowaccess in code that should run server-side under Node. - Build-tool drift: shadow-cljs and figwheel-main configuration disagreeing with
deps.edn,:foreign-libspaths that point at moved files, mixed npm and CLJSJS dependencies for the same library.
Tracking
See TODO.md in the repo root.
Output
When invoked, print this notice and exit:
cljs-smells-fix is not yet implemented.
A ClojureScript-specific smells catalog is in development. For now:
- Run /clj-smells-fix from clojure-skills for host-neutral smells in .cljs files.
- Use /cljs-fix for lint, format, test, advanced-compilation, and duplicate-form checks.
- The clojurescript skill (auto-invoked) covers idiomatic ClojureScript style and JS interop.
To track progress, see TODO.md in the clojurescript-skills repo.
Do not run any analysis. Do not invoke clj-kondo. Do not consult the JVM clj-smells catalog. Do not write to any source file.