在 Manus 中运行任何 Skill
一键导入
一键导入
一键在 Manus 中运行任何 Skill
开始使用component
星标1
分支1
更新时间2026年3月4日 21:23
Create a new Clojure component
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
Create a new Clojure component
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | component |
| description | Create a new Clojure component |
| allowed-tools | Read, Edit, Write, Grep, Glob, mcp__clojure-mcp__* |
Create a new Clojure component following project conventions. Before starting,
read docs/clojure.org.
Every component namespace follows this structure:
(ns bits.foo
(:require
[bits.spec]
[clojure.spec.alpha :as s]
[com.stuartsierra.component :as component]))
;;; ----------------------------------------------------------------------------
;;; API
(defn do-thing
[foo-component arg]
;; Component as first argument
...)
;;; ----------------------------------------------------------------------------
;;; Component
(defrecord Foo [config-val other-val]
component/Lifecycle
(start [this]
;; Initialize, return updated this
this)
(stop [this]
;; Cleanup, return this
this))
(defn make-foo
[config]
{:pre [(s/valid? :bits.foo/config config)]}
(map->Foo config))
(defmethod print-method Foo
[foo ^java.io.Writer w]
(.write w "#<Foo>"))
To avoid cyclic dependencies, put component config specs in bits.spec:
;; In bits.spec (use literal keywords)
(s/def :bits.foo/config-val string?)
(s/def :bits.foo/config
(s/keys :req-un [:bits.foo/config-val]))
All defaults live in bits.app/read-config:
;; In bits.app
(defn read-config []
{:foo {:config-val "default"}
...})
BANNED:
System/getenv outside bits.appmake-* functionsAdd to bits.app/make-system:
(component/system-map
...
:foo (component/using
(foo/make-foo (:foo config))
[:dependency-component]))
bits.spec with literal keywordsbits.app/read-configcomponent/Lifecyclemake-<name> with :pre validation$ARGUMENTS
Synchronise Nix deps hash after changing deps.edn
Diagnose and fix CI build failures
Create atomic commits from all unstaged changes
Create atomic commits from session changes only
Work on form UI components
Run Kaocha tests