Skill: Clojure Code Quality and Structural Editing
Goal
Automatically fix malformed Clojure expressions, balance delimiters, and validate syntax using local OpenCode tools.
Use This Skill When
- •Clojure/ClojureScript files report unmatched delimiters or EOF errors.
- •You need a safe pre-flight check before running Shadow-CLJS builds.
- •You want to normalize delimiter structure after refactors.
Do Not Use This Skill When
- •The task is unrelated to Clojure or ClojureScript.
- •The error is a runtime logic error (use the app-specific debugging flow).
Tools
- •
fix_clojure_delimiters(Parinfer indent/paren or cljstyle mode) - •
validate_clojure_syntax(clj-kondo lint)
Workflow
- •Run
fix_clojure_delimiterswithparinfer-indent. - •Run
validate_clojure_syntax. - •If validation fails, retry
fix_clojure_delimiterswithparinfer-paren. - •If validation still fails, switch to
clojure-syntax-rescuefor manual analysis.
Output
- •Balanced delimiters in the target file.
- •clj-kondo lint passes for the file.
Strong Hints
- •Constraint: Only run
cljstyleif the CLI is installed and available in PATH. - •Tip: Start with Parinfer indent mode; only use paren mode when indent mode fails.