clojure-write
Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions, and best practices. Use when writing, developing, or ref…
它会碰到什么
扫了多少2 个文本文件,3 KB
它会碰到什么联网
命中总数1 处
命中统计严重 0 · 高 0 · 中 0 · 低 1
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
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
- Write code into a file.
- Evaluate the file's namespace and make sure it loads correctly with:
./bin/mage -repl --namespace metabase.app-db.connection
- 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.
- 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, verify readability with
-check-readable - End all files with a newline
- When editing tabular code, where the columns line up, try to keep them aligned
- Spaces on a line with nothing after it is not allowed
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。
它属于哪个仓库
星标★ 398
本站分层T2
该仓技能数2148
原文件路径
skills_categorized/debugging/clojure-write/SKILL.md同一个仓库里的其他技能
同名技能的其他版本
有 7 个不同仓库或目录里都有叫 clojure-write 的技能。它们内容并不相同,别混用:
- Microck/ordinary-claude-skills — Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions
- Microck/ordinary-claude-skills — Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions
- Microck/ordinary-claude-skills — Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions
- Microck/ordinary-claude-skills — Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions
- Microck/ordinary-claude-skills — Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions
- Microck/ordinary-claude-skills — Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions