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.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "clojure-symbols" with this command: npx skills add brettatoms/agent-skills/brettatoms-agent-skills-clojure-symbols

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-kondo

clj-nrepl-eval

Discover running nREPL servers:

clj-nrepl-eval --discover-ports

Quick Reference

TaskToolCommand
List symbols in fileclj-kondoclj-kondo --lint file.clj --config '{...}'
Find definitionclj-kondoFilter var-definitions by name
Find usagesclj-kondoFilter var-usages by name
Get var metadataREPL(meta #'ns/var)
Get sourceREPL(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 - 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

# 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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

alpinejs

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

playwright

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

code-symbols

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

browser-tools

No summary provided by upstream source.

Repository SourceNeeds Review