realgenekim

Babashka CLI and Claude Code skill for structural Clojure refactoring — move forms, fix declares, rename namespaces, explore via AST.

15
2
100% credibility
Found Apr 26, 2026 at 15 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Clojure
AI Summary

clj-surgeon is a tool for exploring and refactoring Clojure codebases by viewing code structure and performing precise rearrangements like reordering functions, extracting to new files, fixing forward references, and renaming namespaces.

How It Works

1
🔍 Discover clj-surgeon

While teaming up with your AI coding buddy on a big Clojure project, you learn about this handy tool that makes tidying up code files quick and painless.

2
📥 Set it up easily

Download the tool and install it into your everyday tools folder with a few simple steps, so it's ready whenever you need it.

3
🧑‍🏫 Show your AI buddy

Add a short note to your project instructions, teaching your AI helper exactly when and how to use this tool for better results.

4
🗺️ Peek inside your code

Get an instant map of all the building blocks in your files, showing where everything sits and how pieces connect, without reading every line.

5
Choose your fix
🔄
Fix messy previews

Automatically reorder functions to eliminate those pesky forward peeks.

➡️
Move pieces around

Shift functions to new spots or even fresh files, pulling along what they need.

✏️
Rename sections

Update names across your whole project smoothly, keeping everything linked.

6
Make the changes

Run your chosen fix and watch the tool rearrange everything perfectly, then check that it all works great.

🎉 Clean and speedy project

Your codebase is now beautifully organized, your AI buddy zips through tasks without getting bogged down, and refactoring feels effortless.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 15 to 15 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is clj-surgeon?

clj-surgeon is a Babashka-powered CLI tool for Clojure devs tackling structural refactoring on large codebases. It parses Clojure files as AST data to outline namespaces, explore dependencies, move forms between files, fix declares by reordering defs topologically, rename namespaces across projects, and extract forms to new files. Paired with Claude as a code skill, it lets AI agents handle mechanical edits while you direct the strategy.

Why is it gaining traction?

It crushes AI pain points like Claude burning tokens rereading giant .clj files—AST outlines map 5k lines in milliseconds at 150x token efficiency versus explore agents. User-facing ops like `:ls` for form boundaries, `:fix-declares!` to nuke forward refs without whack-a-mole, and `:rename-ns!` for instant project-wide renames beat grep or manual LSP tweaks. Babashka's instant startup and zero deps make it a drop-in for CLI workflows, nREPL tinkering, or GitHub Actions.

Who should use this?

Clojure backend devs splitting monolithic namespaces in production apps, AI-assisted coders pairing with Claude on refactors, or teams cleaning declare hell from auto-generated code. Ideal for anyone moving forms, renaming namespaces, or auditing deps in 2k+ line files without IDE plugins.

Verdict

Grab it if you're deep in Clojure refactoring with Babashka or Claude—solid docs, tests, and real-world feats make the low 15 stars and 1.0% credibility score overlookable for early adopters. Still maturing, so dry-run everything and test thoroughly before production.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.