登录
clojure-write.md已公开
current skill~ /skills/clojure-write

clojure-write

Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions, and best practices. Use when writing, developing, or refactoring Clojure/ClojureScript code.

downloads
2
updated
2026/04/06
author
Admin
visibility
已公开
downloads.trend.tsxlast 7 days

当前技能最近 7 天下载趋势

用和首页一致的趋势图,快速判断这个 skill 最近是否还在被持续下载和使用。

7d total
0
quickstart.shinstall
安装命令
npx skills add clojure-write
使用建议

先看趋势和左侧结构化信息,再决定是直接下载、复制安装命令,还是继续阅读原始 `SKILL.md`。

overview.tsdecision summary
@./../shared/development-workflow.md @./../shared/clojure-style-guide.md @./../shared/clojure-commands.md
- Start with small, fundamental functions: - Identify the core features or functionalities required for your task. - Break each feature down into the smallest, most basic functions that can be developed and tested independently. - Write and test in the REPL: - Write the code for each small function directly in the REPL (Read-Eval-Print Loop). - Test it thoroughly with a variety of inputs, including typical use cases and relevant edge cases, to ensure it behaves as expected. - Integrate into source code: - Once a function works correctly in the REPL, move it from the REPL environment into your source code files (e.g., within appropriate namespaces). - Gradually increase complexity: - Build upon tested, basic functions to create more complex functions or components. - Compose smaller functions together, testing each new composition in the REPL to verify correctness step by step. - Ensure dependency testing: - Make sure every function is fully tested in the REPL before it is depended upon by other functions. - This ensures that each layer of your application is reliable before you build on it. - Use the REPL fully: - Use the REPL as your primary tool to experiment with different approaches, iterate quickly, and get immediate feedback on your code. - Follow functional programming principles: - Keep functions small, focused, and composable. - Use Clojure's functional programming features—like immutability, higher-order functions, and the standard library—to write concise, effective code.
SKILL.md previewcollapsible

name
clojure-write
description
Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions, and best practices. Use when writing, developing, or refactoring Clojure/ClojureScript code.
---
name: clojure-write
description: Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions, and best practices. Use when writing, developing, or refactoring Clojure/ClojureScript code.
---

# Clojure Development Skill

@./../_shared/development-workflow.md
@./../_shared/clojure-style-guide.md
@./../_shared/clojure-commands.md

## REPL-Driven Development Workflow

- Start with small, fundamental functions:
- Identify the core features or functionalities required for your task.
- Break each feature down into the smallest, most basic functions that can be developed and tested independently.
- Write and test in the REPL:
  - Write the code for each small function directly in the REPL (Read-Eval-Print Loop).
  - Test it thoroughly with a variety of inputs, including typical use cases and relevant edge cases, to ensure it
    behaves as expected.
- Integrate into source code:
  - Once a function works correctly in the REPL, move it from the REPL environment into your source code files (e.g.,
    within appropriate namespaces).
- Gradually increase complexity:
  - Build upon tested, basic functions to create more complex functions or components.
  - Compose smaller functions together, testing each new composition in the REPL to verify correctness step by step.
- Ensure dependency testing:
  - Make sure every function is fully tested in the REPL before it is depended upon by other functions.
  - This ensures that each layer of your application is reliable before you build on it.
- Use the REPL fully:
  - Use the REPL as your primary tool to experiment with different approaches, iterate quickly, and get immediate
    feedback on your code.
- Follow functional programming principles:
  - Keep functions small, focused, and composable.
  - Use Clojure's functional programming features—like immutability, higher-order functions, and the standard
    library—to write concise, effective code.

## How to Evaluate Code

### Bottom-up Dev Loop

1. Write code into a file.
2. Evaluate the file's namespace and make sure it loads correctly with:

```
./bin/mage -repl --namespace metabase.app-db.connection
```

3. Call functions in the namespace with test inputs, and observe that the outputs are correct
   Feel free to copy these REPL session trials into actual test cases using `deftest` and `is`.
4. Once you know these functions are good, return to 1, and compose them into the task that you need to build.

## Critical Rules for Editing

- Be careful with parentheses counts when editing Clojure code
- After EVERY change to Clojure code, veri

预览已截断。下载完整技能包可查看全部文件内容。

next-steps.mdrecommended flow

1. 先判断它是否匹配你的任务、运行环境和依赖边界。

2. 再结合最近 7 天下载趋势,决定是直接安装还是先下载完整包审阅。

3. 需要程序化集成时,再去 Docs 查看 API 和 OpenAPI 描述。