Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计提醒

clojure-evalClojure 评估

Agent Skill

clojure-eval 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,070

周安装

88

GitHub Stars

156

下载量

725
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:clojure-eval(Clojure 评估)
来源仓库:https://github.com/bhauman/clojure-mcp-light
仓库路径:skills/clojure-eval
安装命令:
npx skills add https://github.com/bhauman/clojure-mcp-light --skill clojure-eval
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bhauman/clojure-mcp-light --skill clojure-eval

简介

Clojure REPL 交互式求值工具,支持命名空间加载和表达式调试。

  • 适用于验证 Clojure 代码编译状态、测试函数行为及排查运行时问题。
  • 会话状态持久化,可在多次调用间共享命名空间引用和绑定变量。
  • 需提前启动 nREPL 服务器并确保 host:port 地址可被本技能访问。
  • clojure-eval 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Clojure REPL Evaluation

When to Use This Skill

Use this skill when you need to:

  • Verify that edited Clojure files compile and load correctly
  • Test function behavior interactively
  • Check the current state of the REPL
  • Debug code by evaluating expressions
  • Require or load namespaces for testing
  • Validate that code changes work before committing

How It Works

The clj-nrepl-eval command evaluates Clojure code against an nREPL server. Session state persists between evaluations, so you can require a namespace in one evaluation and use it in subsequent calls. Each host:port combination maintains its own session file.

Instructions

0. Discover and select nREPL server

First, discover what nREPL servers are running in the current directory:

clj-nrepl-eval --discover-ports

This will show all nREPL servers (Clojure, Babashka, shadow-cljs, etc.) running in the current project directory.

Then use the AskUserQuestion tool:

  • If ports are discovered: Prompt user to select which nREPL port to use:

- question: "Which nREPL port would you like to use?" - header: "nREPL Port" - options: Present each discovered port as an option with: - label: The port number - description: The server type and status (e.g., "Clojure nREPL server in current directory") - Include up to 4 discovered ports as options - The user can select "Other" to enter a custom port number

  • If no ports are discovered: Prompt user how to start an nREPL server:

- question: "No nREPL servers found. How would you like to start one?" - header: "Start nREPL" - options: - label: "deps.edn alias", description: "Find and use an nREPL alias in deps.edn" - label: "Leiningen", description: "Start nREPL using 'lein repl'" - The user can select "Other" for alternative methods or if they already have a server running on a specific port

IMPORTANT: IF you start a REPL do not supply a port let the nREPL start and return the port that it was started on.

1. Evaluate Clojure Code

Evaluation automatically connects to the given port

Use the -p flag to specify the port and pass your Clojure code.

Recommended: Use heredoc via stdin to avoid shell escaping issues. The single-quoted delimiter (<<'EOF') passes all characters through literally.

clj-nrepl-eval -p <PORT> <<'EOF'
(+ 1 2 3)
EOF

For multiple expressions:

clj-nrepl-eval -p <PORT> <<'EOF'
(def x 10)
(+ x 20)
EOF

2. Display nREPL Sessions

Discover all nREPL servers in current directory:

clj-nrepl-eval --discover-ports

Shows all running nREPL servers in the current project directory, including their type (clj/bb/basilisp) and whether they match the current working directory.

Check previously connected sessions:

clj-nrepl-eval --connected-ports

Shows only connections you have made before (appears after first evaluation on a port).

3. Common Patterns

Require a namespace (always use:reload to pick up changes):

clj-nrepl-eval -p <PORT> "(require '[my.namespace :as ns] :reload)"

Test a function after requiring:

clj-nrepl-eval -p <PORT> "(ns/my-function arg1 arg2)"

Check if a file compiles:

clj-nrepl-eval -p <PORT> "(require 'my.namespace :reload)"

Multiple expressions:

clj-nrepl-eval -p <PORT> "(def x 10) (* x 2) (+ x 5)"

Complex multiline code:

clj-nrepl-eval -p <PORT> <<'EOF'
(def x 10)
(* x 2)
(+ x 5)
EOF

With custom timeout (in milliseconds):

clj-nrepl-eval -p <PORT> --timeout 5000 "(long-running-fn)"

Reset the session (clears all state):

clj-nrepl-eval -p <PORT> --reset-session
clj-nrepl-eval -p <PORT> --reset-session "(def x 1)"

Available Options

  • -p, --port PORT - nREPL port (required)
  • -H, --host HOST - nREPL host (default: 127.0.0.1)
  • -t, --timeout MILLISECONDS - Timeout (default: 120000 = 2 minutes)
  • -r, --reset-session - Reset the persistent nREPL session
  • -c, --connected-ports - List previously connected nREPL sessions
  • -d, --discover-ports - Discover nREPL servers in current directory
  • -h, --help - Show help message

Important Notes

  • Prefer heredoc via stdin: Use clj-nrepl-eval -p <PORT> <<'EOF'... EOF to avoid shell escaping issues
  • Sessions persist: State (vars, namespaces, loaded libraries) persists across invocations until the nREPL server restarts. --reset-session only resets the nREPL session (clearing dynamic vars like *e, *1), not def'd vars or loaded namespaces
  • Automatic delimiter repair: The tool automatically repairs missing or mismatched parentheses
  • Always use:reload: When requiring namespaces, use :reload to pick up recent changes
  • Default timeout: 2 minutes (120000ms) - increase for long-running operations
  • Input precedence: Command-line arguments take precedence over stdin

Typical Workflow

  1. Discover nREPL servers: clj-nrepl-eval --discover-ports
  2. Use AskUserQuestion tool to prompt user to select a port
  3. Require namespace: clj-nrepl-eval -p <PORT> "(require '[my.ns:as ns]:reload)"
  4. Test function: clj-nrepl-eval -p <PORT> "(ns/my-fn...)"
  5. Iterate: Make changes, re-require with :reload, test again

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.74%
按下载量换算281

Claude

31.71%
按下载量换算230

Cursor

17.26%
按下载量换算125

Gemini CLI

9.46%
按下载量换算69

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/bhauman/clojure-mcp-light --skill clojure-eval 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills