clojure-edit

Edit Clojure forms with syntax validation via a PostToolUse hook.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/esp1/claude-config --skill clojure-edit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clojure-edit
Source: https://github.com/esp1/claude-config/tree/main/dot.claude/skills/clojure-edit
Command: npx skills add https://github.com/esp1/claude-config --skill clojure-edit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bb, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Clojure code is highly structural; editing without awareness of s-expressions often introduces syntax errors and unbalanced forms that are hard to fix later.

Core Features & Use Cases

  • Form-aware editing scripts that target whole top-level forms, not just text fragments.
  • Automatic syntax validation via a PostToolUse hook after edits to catch errors early.
  • Structured editing patterns that help prevent common mistakes when editing .clj, .cljs, .cljc, .edn, .bb, and .cljd files.

Quick Start

Invoke the clojure-edit scripts to perform a form-aware edit on a target Clojure file.

Frequently Asked Questions about clojure-edit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I edit Clojure code without breaking s-expression structures?

Form-aware editing targets whole top-level forms rather than text fragments, preventing syntax errors and unbalanced forms in Clojure. This structured approach maintains s-expression integrity during edits.

Does Babashka support automatic syntax validation after file edits?

Babashka supports automatic syntax validation via a PostToolUse hook that triggers after edits. This mechanism catches structural errors early across .bb files and other supported Clojure dialects.

Can I use structured editing patterns for ClojureScript and CLJC files?

Structured editing patterns support ClojureScript, CLJC, EDN, and ClojureDart files. Form-aware scripts handle these formats across standard project contexts to prevent common structural editing mistakes.

What's the best way to prevent unbalanced forms when modifying EDN files?

The best way to prevent unbalanced forms is using form-aware editing scripts that operate on complete top-level forms. A PostToolUse syntax-validation hook further catches errors immediately after edits.

Do I need Babashka installed to run Clojure form-aware editing scripts?

Babashka is required as a dependency to run the Clojure form-aware editing scripts. The Skill relies on Babashka to execute structured editing logic and PostToolUse validation hooks.

Why does my Clojure code break after automated edits introduce syntax errors?

Automated edits break Clojure code when they lack s-expression awareness and treat code as plain text. Form-aware editing prevents this by targeting whole forms and validating syntax automatically after modifications.