clojure-symbols
Skill3 starsChanged 10 months agoMITView on GitHub
Find and edit Clojure symbols using clj-kondo and REPL introspection. Use when finding Clojure function definitions, var usages, namespace contents, renaming Clojure symbols, replacing function bodies, or working with .clj/.cljc/.cljs files.
- Installs packages
In this repository13 other files it gives its agents.
- alpinejsSkill
- browser-toolsSkill
- clojure-replSkill
- code-renameSkill
- code-searchSkill
- code-symbolsSkill
- file-navSkill
- githubSkill
- janetSkill
- lib-docsSkill
- plansSkill
- playwrightSkill
- skill-creatorSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Use clj-kondo for static analysis and clj-nrepl-eval for REPL introspection to find Clojure symbols.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Clojure Symbols Skill
Use clj-kondo for static analysis and clj-nrepl-eval for REPL introspection to find Clojure symbols.
For non-Clojure languages, use the code-symbols skill instead.
Prerequisites
clj-kondo
# Arch Linux
sudo pacman -S clj-kondo
# Homebrew
brew install borkdude/brew/clj-kondo
# Script
curl -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/script/install-clj-kondo
chmod +x install-clj-kondo && ./install-clj-kondoclj-nrepl-eval
Discover running nREPL servers:
clj-nrepl-eval --discover-portsQuick Reference
| Task | Tool | Command |
| List symbols in file | clj-kondo | clj-kondo --lint file.clj --config '{...}' |
| Find definition | clj-kondo | Filter var-definitions by name |
| Find usages | clj-kondo | Filter var-usages by name |
| Get var metadata | REPL | (meta #'ns/var) |
| Get source | REPL | (clojure.repl/source fn) |
Core clj-kondo Commands
Note: JSON keys use hyphens (e.g., var-definitions), so use bracket notation in jq.
Find Symbol Definition
clj-kondo --lint src components bases \
--config '{:output {:format :json}, :analysis {:var-definitions true}}' \
| jq '.analysis["var-definitions"][] | select(.name == "my-function")'Find Symbol Usages
clj-kondo --lint src components bases \
--config '{:output {:format :json}, :analysis {:var-usages true}}' \
| jq '.analysis["var-usages"][] | select(.name == "my-function")'List Symbols in File
clj-kondo --lint path/to/file.clj \
--config '{:output {:format :json}, :analysis {:var-definitions true}}' \
| jq '.analysis["var-definitions"]'Output Fields
var-definitions:
filename,row,col,end-row,end-col- Locationns,name- Identitydefined-by- Defining form (e.g.,clojure.core/defn)fixed-arities,doc,private
var-usages:
from,to- Source and target namespacesname,arity- Symbol name and call arityfrom-var- Containing functionrow,col- Location
Core REPL Commands
# Get var metadata
clj-nrepl-eval -p PORT "(meta #'my.namespace/my-function)"
# Get source code
clj-nrepl-eval -p PORT "(clojure.repl/source my-function)"
# List namespace contents
clj-nrepl-eval -p PORT "(dir my.namespace)"
# Search by pattern
clj-nrepl-eval -p PORT "(clojure.repl/apropos \"pattern\")"Common Workflow
Find Definition and All Usages
# Find definition
clj-kondo --lint . \
--config '{:output {:format :json}, :analysis {:var-definitions true}}' \
| jq '.analysis["var-definitions"][] | select(.name == "target-fn") | {ns, name, filename, row}'
# Find all usages
clj-kondo --lint . \
--config '{:output {:format :json}, :analysis {:var-usages true}}' \
| jq '.analysis["var-usages"][] | select(.name == "target-fn") | {from, "from-var", filename, row}'Find Usages of a Namespace
clj-kondo --lint bases components \
--config '{:output {:format :json}, :analysis {:var-usages true}}' \
| jq '.analysis["var-usages"][] | select(.to == "my.namespace") | {from, name, filename, row}'Additional References
- clj-kondo details: See references/kondo.md for full analysis options
- REPL introspection: See references/repl.md for REPL commands
- Editing/renaming: See references/editing.md for rename workflows
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

