add-module
Skill0 starsChanged 31 days agoMITView on GitHub
Scaffold a new feature slice (src/features/<scope>) in <app>: ports.ts consumer-owned interfaces, usecase.ts, module.ts register(), deps wiring in src/bin/api.ts, hexagonal direction, and the fake-backed test gate, as one change.
- Installs packages
11 other projects use a version of this.
Adopted by
Most recently taken up by
- testcontainers/testcontainers-javatheir own version, first seen Nov 16, 2026
- helmut-hoffer-von-ankershoffen/heinzeltheir own version, first seen Nov 8, 2026
- heytcass/claudeostheir own version, first seen Oct 29, 2026
- Cassius2584/claude-uni-workspacetheir own version, first seen Oct 22, 2026
- testcontainers/testcontainers-nodetheir own version, first seen Oct 17, 2026
- ai-erp-collab/deterministic-context-routing-plugintheir own version, first seen Oct 15, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- testcontainers/testcontainers-java★ 8.8ksame name
- fullstackhero/dotnet-starter-kit★ 6.9ksame name
- testcontainers/testcontainers-node★ 2.7ksame name
- Cassius2584/claude-uni-workspace★ 5same name
- serhii12/vault-os★ 2same name
- AURORA-NEURO/aurora-agent★ 1same name
- helmut-hoffer-von-ankershoffen/heinzel★ 1same name
- heytcass/claudeos★ 1same name
- ai-erp-collab/deterministic-context-routing-plugin★ 0same name
- alimranfakir/Claude_skills★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- add-handlerSkill
- claim-checkSkill
- clean-room-rebuildSkill
- corpus-retrievalSkill
- depguard-guardSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- graphifySkill
- grillingSkill
- learnSkill
- ownership-authorSkill
- planSkill
- researchSkill
- reviewSkill
- shipSkill
- specSkill
- tddSkill
- verified-statusSkill
- nodejs-best-practicesSkill
- nodejs-portSkill
- nodejs-reviewSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Do not activate for in-slice refactors that add no new slice and no new cross-feature dependency.
- Very specific: line 31
Every stat needs a source.
- Very specific: line 32
Do not emit the final sketch as a fenced code block when raw output is expected — the sketch is plain text with labelled sections (slice / …
- Very specific: line 33
Verify the cited files exist before reporting.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<app> Add Module
A reusable scaffolding workflow for adding a new feature slice to the <app> codebase. An agent (e.g. the API designer or ownership reviewer role) invokes this skill to produce the slice declaration, the dependency wiring, the module doc, and the boundary check together — so a new slice never lands without its registration and its boundary discipline. The output is a wiring sketch plus a boundary checklist.
When to Activate
- A new vertical slice (
src/features/<scope>/) is requested. - An existing slice needs a new dependency on
#platform/or#shared/. - The hexagonal dependency direction must be verified after a wiring change (adapters must not depend on use cases; kernel must not depend on anything internal).
- A reviewer asks for the module + wiring bundle before approving an internal-structure change.
Do not activate for in-slice refactors that add no new slice and no new cross-feature dependency.
Core Principles
- The slice is the unit of reuse. A new slice is a new
src/features/<scope>/directory with domain.ts / ports.ts / usecase.ts / http.ts / postgres.ts / module.ts / queries.ts — together. - Hexagonal direction is invariant.
#shared/(kernel) imports only node builtins;#platform/imports shared + third-party drivers; features import shared + platform-declared ports;src/bin/api.tsdepends on all. A wire that reverses this is a BLOCK. - Ports are consumer-defined.
ports.tsdeclares the interfaces the slice's use cases need (defined BY the consumer);postgres.tsis the production adapter (pg, over the slice's Kysely-typedqueries.ts); the fake lives besideusecase.test.ts. - The module doc is the contract. The slice's files open with header comments stating what the slice owns and what it depends on.
- Slices never import each other. A shared shape moves down to
#shared/through an architect decision, never as a cross-slice import edge.
Rules
- Anti-hallucination: do not invent import paths or import edges that are not in the tree. Every wiring step cites a file that exists or is being added.
- Every stat needs a source. If you cite the hexagonal architecture, cite the dependency-rules doc; if you cite the
importssubpath-map rule, cite the Node.js packages documentation. No unsourced claims. - Do not emit the final sketch as a fenced code block when raw output is expected — the sketch is plain text with labelled sections (slice / deps / module.ts / direction / checklist).
- Verify the cited files exist before reporting; a wiring step that cites a
Depsfield that is not being added is a hallucination. - A new slice must appear in
src/features/AND be wired viaregister(app, d)insrc/bin/api.ts; one without the other is a REVISE. #shared/must not depend on any other internal feature;#platform/must depend only on shared. A reverse edge is a BLOCK.- Adapter code lives only in
postgres.ts(pg) andhttp.ts(fastify);domain.tsstays pure (node builtins +#shared/only) or eslint domain-pure blocks the build.
Research References
Provenance table — fill the link column from the primary source before relying on a claim. No claim may appear in a finding without a row here.
| claim | source | year | link |
package.json imports subpath maps (#pkg/) are the single declaration point for internal module edges | Node.js packages documentation | 2024 | <TODO: primary doc link> |
| Hexagonal architecture: ports are consumer-defined interfaces | dependency-rules doc / hexagonal architecture | 2024 | <TODO: primary doc link> |
| Fakes beside usecase.test.ts compile out of the production build | vitest documentation (include patterns) | 2024 | <TODO: primary doc link> |
| pnpm install resolves package.json post-rename (no lockfile ships — INV-T3) | pnpm documentation | 2024 | <TODO: primary doc link> |
Output Format
A wiring sketch plus a boundary checklist, anchored to the module root package.json. Plain text — not a fenced block:
MODULE src/features/<scope>
files:
domain.ts -> pure domain types (node builtins + #shared/ imports only)
ports.ts -> consumer-owned interfaces (DB, clock, idgen, email)
usecase.ts -> orchestration over the ports
http.ts -> Fastify handlers + envelope mapping
postgres.ts -> pg adapter over the slice's Kysely-typed queries.ts
module.ts -> register(app, d) route mounting
queries.ts -> Kysely table/row types + named queries (documented delta vs go sqlc)
deps:
package.json imports -> any new internal edge (#<pkg>/...) declared once
src/bin/api.ts -> construct the adapter, pass it in the slice's Deps
module.ts -> register(app, d) joined to the shared app
direction:
#shared/ <- (nothing internal)
#platform/ <- #shared/ + drivers
#features/<scope> <- #shared/ + its declared ports (OK: inward)
CHECKLIST
[ ] slice declared under src/features/<scope>/ with the file set above
[ ] Deps wired once in src/bin/api.ts; register(app, d) mounted
[ ] ports are consumer-defined; exactly one production adapter + one fake
[ ] dependency direction is inward (#shared/ imports node builtins only)
[ ] fakes live beside usecase.test.ts (compiled out of the production build)
[ ] pnpm build green; eslint domain-pure + slice-isolation greenSummary line: add-module: N module(s) added, M wiring step(s) — verdict: APPROVE | REVISE.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

