Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Ensure Claude prefers clojure-mcp if it is available. (#66860)

Timothy S. Dean68b1a18e1ff5
diff --git a/.claude/skills/_shared/clojure-commands.md b/.claude/skills/_shared/clojure-commands.md
index 68ea17bf472..06ad2586d65 100644
--- a/.claude/skills/_shared/clojure-commands.md
+++ b/.claude/skills/_shared/clojure-commands.md
@@ -29,6 +29,11 @@ to run 3 tests, or
## REPL Usage
+> **Note:** If you have `clojure-mcp` tools available (check for tools like `clojure_eval`),
+> **always prefer those over `./bin/mage -repl`**. The MCP tools provide better integration,
+> richer feedback, and avoid shell escaping issues. Only use `./bin/mage -repl` as a fallback
+> when clojure-mcp is not available.
+
- **Evaluating Clojure Code:** `./bin/mage -repl '<code>'`
- See "Sending Code to the REPL" section for more details
diff --git a/.claude/skills/clojure-write/SKILL.md b/.claude/skills/clojure-write/SKILL.md
index 5e26ade64a4..17b665f7927 100644
--- a/.claude/skills/clojure-write/SKILL.md
+++ b/.claude/skills/clojure-write/SKILL.md
@@ -5,6 +5,16 @@ description: Guide Clojure and ClojureScript development using REPL-driven workf
# Clojure Development Skill
+## Tool Preference
+
+When `clojure-mcp` tools are available (e.g., `clojure_eval`, `clojure_edit`), **always use them**
+instead of shell commands like `./bin/mage -repl`. The MCP tools provide:
+- Direct REPL integration without shell escaping issues
+- Better error messages and feedback
+- Structural Clojure editing that prevents syntax errors
+
+Only fall back to `./bin/mage` commands when clojure-mcp is not available.
+
@./../_shared/development-workflow.md
@./../_shared/clojure-style-guide.md
@./../_shared/clojure-commands.md
diff --git a/CLAUDE.md b/CLAUDE.md
index 0f5095676f5..3c33dd34859 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -18,3 +18,7 @@ For detailed guidance on writing and reviewing code and documentation, see the s
- **[docs-write](.claude/skills/docs-write/SKILL.md)** - Documentation writing with Metabase style guide
- **[docs-review](.claude/skills/docs-review/SKILL.md)** - Documentation review checklist
+
+## Tool Preferences
+
+If `clojure-mcp` tools are available, prefer them over shell-based alternatives for Clojure development.