010118 repository factories
Domain repository factory — functions accepting Drizzle tables to create reusable CRUD for test (tst_) and production (prd_/sys_) tables.From its SKILL.md
npx -y skills add natuleadan/skills --skill 010118-repository-factoriesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
1.0 KB, 198 tokens by cl100k_base, as published. Nobody here has run it
Repository Factories
When to use
When building data access layers that need to work with different table schemas (test vs production) without duplicating code.
References
| Topic | File |
|---|---|
| Factory pattern overview | references/factory-pattern.md |
| Service dual-mode (index + test) | references/service-dual-mode.md |
| Generic admin system factory | references/admin-sys-factory.md |
Quick checklist
- Create one factory per domain, accepting tables as parameters
- Return an object with CRUD methods
- Use a type alias for the accepted table shape
- Cast with
as anyat the call site, not inside the factory - Create paired services:
index.ts(sys_) andtest.ts(tst_) - For simple CRUD tables, use the generic
createSysRepo()factory
What ships with it: 6 files
5.3 KB alongside SKILL.md, 1 of them executable
evals/
- evals.json312 B
references/
- admin-sys-factory.md1.1 KB
- factory-pattern.md1.2 KB
- service-dual-mode.md1.1 KB
scripts/
- generate-factory.pyruns1.2 KB
- metadata.json450 B