Iβve started using Claude Code and if you are using emacs or nvim you should check it out. https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview It does a very good job with clojure
How does this supplement or replace things you showed off in January, e.g. gptel?
Quite a lot. Claude code is able to explore the code base on its own, change files and run shell commands. It is more of a self contained code agent
Do you end up interacting with Claude more on the CLI then than from within emacs?
I have a vterm session within emacs and itβs just a buffer
Do you find you pay more for Anthropic API usage under Claude Code than you did before?
@ovidiu.stoica1094 I just saw your repomix mention, I haven't seen that tool before. I've just been cloning opensource libs into a dedicated docs dir.. but repomix sounds better? Could you share an example of how you use it with clojure projects?
For example I just ran it on reitit and it output:
π Top 5 Files by Character Count and Token Count:
ββββββββββββββββββββββββββββββββββββββββββββββββββ
1. dev-resources/json/json100k.json (101,542 chars, 37,100 tokens)
2. test/cljc/reitit/openapi_test.clj (61,948 chars, 10,218 tokens)
3. CHANGELOG.md (58,548 chars, 17,900 tokens)
4. perf-test/clj/reitit/opensensors_perf_test.clj (42,911 chars, 11,897 tokens)
5. test/cljc/reitit/ring_coercion_test.cljc (36,614 chars, 7,360 tokens)
None of those top 5 files seem really relevant to Claude who needs the ns APIshttps://repomix.com/ β you can use it here and change the include pattern to only include stuff that's relevant? (e.g. src and docs maybe)
How would you make an "expert" with this, an llm with specific context and prompt to help fix a specific problem, eg deal with some missionary code?
expose a Prompt via MCP Server and add the server to your MCP client. E.g. Claude Desktop, Claude Code and Cursor are MCP clients. Cursor has some ergonomics around this where you add prompting rules under .cursor/rules and inform the model in .cursor/rules/README.md or in CLAUDE.md at top-level.
Modex does not support Prompts yet
here are my https://github.com/theronic/clojure-prompts
you can also configure MCP servers for Claude Code
@martinklepsch started a collective project to group prompts like this
ah cool, I haven't seen it yet, but he has reached out to me on twtr re: collaborating on context I briefly glossed over the Clojure style guide on ctxs now, but it seems more focused on style & convention (e.g. whitespace) than principles (I haven't read all of it) these new clojure-prompts are more about naming, structure, usage
The Clojure style guide is submitted by @chris358 β I fully expect there to be multiple Clojure style guides on the site :)
@yenda1 would be cool to get your missionary stuff in. Even if it is niche, itβs useful for people in #missionary and can be shared
Ah and btw, rebuilding the site to be a bit more dynamic, with product hunt style upvotes & GitHub Auth https://ctxs.ai/weeklyhttps://ctxs.ai/weeklyhttps://ctxs.ai/weekly
$130 dollars in the last two days. would go down a lot with: β’ a good claude.md file that make it use clj-kondo after edits to at least ask for manual help when dealing with parens imbalance because it can spin for minutes on a missing parens otherwise β’ integration of MCP servers for complex libs like honeysql or missionary so it doesn't write garbage code that have no chance to do anything β’ some good guidelines to do test driven development the right way, because it can easily decide midway to start mocking stuff and after minutes of spinning instead of fixing a bug it basically replaced every piece of code you were testing by mocks that do exactly what the test expects. it might sound bad the way I describe it but it's not, it's really already impressive out of the box, and I think there is ways to make it avoid these culprits and go even further already today.
YES! π For a heavy duty day, I pay 5$ easy. But I heard cases of people paying 50$ days π΅
I did the clj-kondo change and it does solve the parens imbalance issue quite well
The clj-kondo change sounds like a great idea. Do you have the exact CLAUDE.md snippet for that? Iβd love to see those MCP servers. What I did to improve output is I put a dedicated doc for llms with the full repomix for UIX, re-frame & daisy-ui and it can query necessary parts when it needs. Works quite well
- ALWAYS run clj-kondo --report-level error --lint your.namespace` after editing a namespace and immediately fix any issue.`
Golden!
yeah the repomix is a good idea, I wish claude allowed to publish a project as mcp server because I already have quite a good expert at missionary and honeysql and I don't feel like diving into how to make my own mcp server yet
cc @petrus for MCP server advice with https://github.com/theronic/modex
Example https://github.com/theronic/datomic-mcp/blob/main/src/modex/mcp/datomic.clj#L64-L131 using Modex.
Currently, the tools macro accepts an ordered vector of args like fn or defrecord methods for tool parameters, then extracts metadata for the MCP types, docstrings & optionality.
I will probably simplify this so your tool handler takes a map of args with some macro sugar so you can resolve the upcoming tools/handler to defn for proper indentation, e.g.
(defhandler ^:string foo
"Foo tool takes name & age & greets user."
[{:keys [name age]
:or {age 37}
:type {name :string, age :number}
:doc {name "A person's name"
age "A person's age"}}]
(str name " is " age " years old"))
where presence in :or implies optional arg.
or maybe (def my-tool (tools/handler [{:keys [...]} ..)
Note that Modex does not support pagination yet, but you can work around it. The MCP spec is also evolving to support streaming.the Modex tools macro is just sugar on top of (tool/->Tool ...) record and tool args via tools/->Parameter record, and returns a map where key is tool name and value is Tool record.
You can build these directly if you want, but it's work to specify the MCP types/docstrings this way π