clojure-symbols
/clojure-symbols
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.
- Author
- brettatoms ↗
- Repository
- agent-skills ↗
- Licence
- MIT
- Last repository change
- 17.08.2026
Assessment and security
- Files in this package
- 4
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 17.08.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
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.
Original author description
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.
How it works
- Prerequisites
- Quick Reference
- Core clj-kondo Commands
- Core REPL Commands
- Common Workflow
- Additional References
SKILL.md preview
---
name: clojure-symbols
description: 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.
allowed-tools: Bash, Read, Edit, Task
---
# 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
```bash
# 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-kondo
```
### clj-nrepl-eval
Discover running nREPL servers:
```bash
clj-nrepl-eval --discover-ports
```
## Quick 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
```bash
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
```bash
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
```bash
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` - Location
- `ns`, `name` - Identity
- `defined-by` - Defining form (e.g., `clojure.core/defn`)
- `fixed-arities`, `doc`, `private`
**var-usages:**
- `from`, `to` - Source and target namespaces
- `name`, `arity` - Symbol name and call arity
- `from-var` - Containing function
- `row`, `col` - Location
## Core REPL Commands
```bash
# 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
```bash
# 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
```bash
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](references/kondo.md) for full analysis options
- **REPL introspection**: See [references/repl.md](references/repl.md) for REPL commands
- **Editing/renaming**: See [references/editing.md](references/editing.md) for rename workflows
Files in this package (4)
- SKILL.md 4 KB
- references/editing.md 3 KB
- references/kondo.md 4 KB
- references/repl.md 3 KB
Versions
The database has no other skills named clojure-symbols.
Database snapshot: 13.11.2026 · package version f3fd7fe215bb (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100clojure-repl
Interact with running Clojure REPLs via nREPL. Evaluate Clojure code, query namespaces, test functions, and debug live Clojure systems. Use when working with .clj/.cljc/.cljs files and a REPL is available. - 100clojure
Clojure-specific coding patterns, inline def usage, code block templates, and namespace handling for Clojure development. Triggers on: **/*.{clj,cljs,cljc,bb,edn.mdx?} - 100code-symbols
Find and edit symbols in code using ast-grep (tree-sitter based). Use when finding function definitions, class definitions, symbol usages, renaming symbols, or replacing code in JavaScript, TypeScript, Python, Go, Rust, and other languages. NOT for Clojure - use clj-symbols instead. - 100clojure-eval
Evaluate Clojure code via nREPL using clj-nrepl-eval. Use this when you need to test code, check if edited files compile, verify function behavior, or interact with a running REPL session. - 100clojure-write
Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions, and best practices. Use when writing, developing, or refactoring Clojure/ClojureScript code. - 100clojure
Expert Clojure programming assistance covering immutable data structures, macros, software transactional memory (STM), and REPL workflows. Use when building concurrent functional systems or data transformation pipelines.