clj-replace

Community

Replace Clojure code without whitespace pain.

Authorhumorless
Version1.0.0
Installs0

System Documentation

What problem does it solve?

clj-replace fixes brittle code edits by enabling format-agnostic replacement of Clojure or Babashka code when whitespace changes make str_replace fail.

Core Features & Use Cases

  • Structural replacement via S-expressions: compares Clojure code by parsed structure rather than literal text, so formatting differences do not block matches.
  • Preserves original formatting: replaces matched nodes while keeping the file’s existing whitespace and style.
  • Ambiguity detection with actionable errors: reports exact line/column locations and fails when the old pattern matches multiple S-expressions, prompting you to provide a more specific old-string.
  • Typical use cases: rename function parameters or local bindings after cljfmt/zprint/zprint changes indentation; update multi-line forms; perform reliable structural refactors where text-based matching is unreliable.

Quick Start

Run a structural rename by telling your AI to invoke clj-replace as: bb /path/to/clj-replace.bb path/to/file.clj "old-string" "new-string".

Dependency Matrix

Required Modules

None required

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: clj-replace
Download link: https://github.com/humorless/clj-native-agent/archive/main.zip#clj-replace

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.