Backend
Skill hilmifawwazsaad/ExpressJS-ts-Boilerplate/.agents/backend
Generate production-grade Express.js + TypeScript code with Layered Architecture. Routes, handlers, services, repositories, middlewares, validations, utils — no UI.From its SKILL.md
npx -y skills add hilmifawwazsaad/ExpressJS-ts-Boilerplate --skill backendAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 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
3.1 KB, 647 tokens by cl100k_base, as published. Nobody here has run it
Pre-Code Checklist
- Which layer? Map need to exactly one row in the Architecture table
- Call direction:
routes → handlers → services → repositories— no skipping, no reversing - Error to throw? Use typed class from
utils/errors.ts, never rawnew Error()
Architecture
| Layer | File | Constraint |
|---|---|---|
| Path + HTTP method | routes/[name].route.ts | Attach middleware + handler only — no logic |
| Auth, rate limiting | middlewares/[name].middleware.ts | Always call next() or next(err) |
| Body / params / query validation | validations/[name].validation.ts | Zod schema · export z.infer as named type |
| Request → response | handlers/[name].handler.ts | < 20 lines · try/catch/next(err) · no DB |
| Business logic | services/[name].service.ts | No req/res · throw on not-found, never return null |
| DB queries | repositories/[name].repository.ts | Only layer allowed to touch DB |
| Entity interfaces and enums | models/[name].model.ts | Domain types only |
| Env vars, DB connection | config/env.ts · config/database.ts | All process.env here only |
| Helpers, errors, response format | utils/ | Domain-agnostic — no layer imports |
| Express + shared type augmentation | types/express.d.ts | req.user augmentation here only |
TypeScript
strict: trueenforced intsconfig.jsonunknownnotany— ifanyis necessary, add an inline comment- Unused params: prefix with
_—_req,_res,_next - Types from Zod only:
type T = z.infer<typeof schema>— never write duplicate interfaces - All
src/imports via@/alias — never relative../../
Response & Errors
sendSuccess(res, data) · sendCreated(res, data, msg) from utils/response.ts. For errors: next(err).
Errors from utils/errors.ts only — never throw new Error():
NotFoundError · UnauthorizedError · ForbiddenError · ConflictError · ValidationError
Never Do
- Logic in
routes/· DB inhandlers/·req/resinservices/ process.envoutsideconfig/env.ts- Return
nullfor missing data — throwNotFoundError anywithout inline comment · manual types duplicating a Zod schema- Expose raw
err.messageor stack trace to client - Log secrets, tokens, or passwords
- Import libraries not in
package.json
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most data backend skills give in 647 tokens
Counted across 229 of the 229 authors here whose files we hold, read 2026-08-07
- Separate business logic into service layersin 22 of 229, across 15 files
- Retry failures with exponential backoffin 21 of 229, across 14 files
- Select only needed database columnsin 20 of 229, across 13 files
- Abstract data access into repository classesin 19 of 229, across 12 files
- Use centralized error handlersin 17 of 229, across 10 files
- Use AsNoTracking for read-only queriesin 16 of 229, across 4 files
- Use async/await for all I/O operationsin 16 of 229, across 5 files
- Implement structured loggingin 15 of 229, across 4 files
- Use dependency injection for all servicesin 14 of 229, across 2 files
- Use resource-based URLs for REST APIsin 13 of 229, across 7 files
- Invalidate cache after data changesin 13 of 229, across 9 files
- Use a dependency injection containerin 12 of 229, across 4 files
Said here and by no other author read
- Map each need to exactly one architecture layer
- Call layers in order without skipping
- Throw typed errors instead of raw errors
- Prefix unused parameters with an underscore
- Derive types from Zod schemas
- Use the configured import alias
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.