010106 backend architecture
Multi-domain agent skills collection for AI coding agents (Claude, Cursor, Copilot, OpenCode, and more). Covers programming, biology, cooking, and future domains. Installable via npx skills add.
npx -y skills add natuleadan/skills --skill 010106-backend-architectureAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 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 author says it does
Copied from the file, not written here
Backend architecture — typed errors, structured API responses, domain modules, service/repository layering, env sanitization, and FK protection.
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.6 KB, as published. Nobody here has run it
Backend Architecture Standards
Overview
Coding standards for backend module structure, error handling, and API response patterns.
Quick Reference
Module Structure
Standard module files:
types.ts— Interfaces and typesschemas.ts— Validation schemas (e.g., Zod)constants.ts— Domain constantsrepository.ts— Data access (queries + mutations)service.ts— Business logicactions.ts— Server Action entry pointsutils.ts— Pure helper functions
Error Handling
- Use typed error classes:
HttpError→ValidationError,UnauthorizedError,ForbiddenError,NotFoundError - Structured API response:
{ data, error: { code, message, traceId } } - Error codes follow
PREFIX_CATEGORY_INDEX(e.g.,VAL_000_001) - Database errors mapped to user-friendly messages
Environment Variables
- Centralized
env.tswithrequireEnv()for validation - All env vars accessed through this file only
- Logs sanitized before output (strip secrets, emails, tokens)
References
- Error Handling
- Module Structure
- Error Codes Format — Structured error codes, prefix conventions, traceId
- Foreign Key Chains — Multi-currency FK chain, translation FK chain, FK protection for admin DELETE