mit einem Klick
component
Create a new Clojure component
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Menü
Create a new Clojure component
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Basierend auf der SOC-Berufsklassifikation
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
| 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