prompts/skills/clojure-polylith-new-brick/SKILL.md
Create new Polylith bricks in Clojure workspaces. Use when adding a new component, base, or project and when wiring the new brick into workspace config before implementation so it is visible to dev and deployable projects.
npx skillsauth add ramblurr/nix-devenv clojure-polylith-new-brickInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this sequence whenever creating a new component, base, or project:
workspace.edn for :top-namespace, :interface-ns, :dialects, and :projects.poly is available:command -v poly >/dev/null && poly version
If poly is present, prefer it for this session. clojure -M:poly ... is equivalent to
poly ... and can be used as the fallback.
Do all workspace wiring immediately after poly create ..., before writing real implementation
code. That keeps the new brick visible to the development project, IDE, and target deployable
projects while the change is still fresh.
If workspace.edn has :vcs {:auto-add false}, generated files may still need git add.
Choose the name before creating the brick:
validator, invoicer, or purchaseraccount or car-api suffix, such as foobarcorp-apis3, dynamodb, and cloudwatch are fine; vendor-grouped names like aws-s3 can also improve poly info and poly deps outputinvoicer and invoicer-remoteinvoicer-rest-api or report-generator-lambdainvoicer or report-generatorBefore creating a component, decide whether it introduces a new interface or is another
implementation of an existing interface. The default is a new interface matching the component
name. Use interface:<name> only when intentionally implementing an existing interface from a
different component.
Create it:
poly create component name:{component_name}
Possible variants:
poly create component name:{component_name} dialect:cljs
poly create component name:{component_name} interface:{shared_interface_name}
Immediately wire it:
poly/{component_name} {:local/root "components/{component_name}"} to ./deps.edn under :aliases :dev :extra-deps"components/{component_name}/test" to ./deps.edn under :aliases :test :extra-paths./projects/*/deps.edn that should include itpoly info and poly checkOnly after that, implement the component:
interface/ directory when truly neededsrc, require only other components' interfaces, never their implementation namespacescomponents/{component_name}/deps.edndeps.edn; those belong in root or project deps.edn files via :local/rootCreate it:
poly create base name:{base_name}
Possible variant:
poly create base name:{base_name} dialect:cljs
Immediately wire it:
poly/{base_name} {:local/root "bases/{base_name}"} to ./deps.edn under :aliases :dev :extra-deps"bases/{base_name}/test" to ./deps.edn under :aliases :test :extra-paths./projects/*/deps.edn that should include itpoly info and poly checkOnly after that, implement the base:
src, require component interfaces onlybases/{base_name}/deps.edndeps.edn to a component; project and development config supply local bricksCreate it:
poly create project name:{project_name}
Possible variant:
poly create project name:{project_name} dialect:cljs
Immediately wire it:
./workspace.edn under :projects, for example "{project_name}" {:alias "{short_alias}"}projects/{project_name}/deps.edn and add the components and bases it should include via :local/root../../components/... and ../../bases/... paths from project deps.ednpoly info and poly checkProject rules:
src directory; production code should live in bricksresources or test directories are fine when neededBefore writing implementation code, confirm all of this is already true:
poly info shows the new brick or projectpoly check passes./deps.edn includes the new component or base in :dev and test pathsdeps.edn includes the new brickworkspace.edn has the project alias if a new project was created../clojure-polylith/commands.md for command usage../clojure-polylith/patterns.md for interface and dependency patterns../clojure-polylith/conventions.md for naming conventionstools
Use when working with Nixbot CI, forge commit statuses, Nix flake checks, nixbot.toml, Nixbot effects, or nixbot-cli - explains how Nixbot runs flake CI and how to inspect builds and logs.
testing
Use this OCP when executing or preparing to execute commands that change a live or important system, service reloads/restarts, package changes, deployments, migrations, firewall/network/access changes, credential rotation, NixOS switch/test/boot/deploy, or incident mitigation. It guides safe operations with a persisted ledger for scope, preflight, baseline, rollback, validation, and evidence.
development
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
documentation
Naming conventions for workflow documents in prompts/. Use when creating plans, PRDs, research reports, idea capture or other workflow documents. Triggers on (1) creating new planning documents, (2) naming PRDs or research reports, (3) questions about document organization in prompts/.