clj-replace
Installation
SKILL.md
clj-replace: Structural Clojure Code Replacement
A Clojure-aware code replacement tool that improves on Claude Code's built-in str_replace by comparing code structure (S-expressions) rather than literal text.
When to Use
Use /clj-replace when:
- Claude Code's
str_replacefails because formatting (whitespace, indentation, line breaks) differs between theold_stringand target code - You need to replace code but the exact whitespace/formatting doesn't match the source
- You want replacements to preserve the original file's formatting and style
Example: If str_replace fails with "old_string not found" but the code structure looks identical, switch to clj-replace.
How It Works
Instead of comparing text character-by-character, clj-replace uses structural comparison: