Nestjs production api contracts
Skill xirothedev/skills/skills/nestjs-production-api-contracts
NestJS API best-practice skill and adapter pack for coding agents.
npx -y skills add xirothedev/skills --skill nestjs-production-api-contractsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 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
Use for production NestJS API contract work involving OpenAPI/Swagger, DTO validation, versioning, public error envelopes, guards and policy authorization, rate limiting behind proxies, CORS/helmet/cookie hardening, or file upload boundaries.
SKILL.md
2.3 KB, as published. Nobody here has run it
NestJS Production API Contracts
Use this skill when a NestJS API must be stable, documented, secure, and safe to expose to clients. Treat controllers as public contracts and services as internal behavior.
When to Apply
Use this skill when:
- Writing or reviewing OpenAPI decorators, DTOs, response schemas, or API versioning
- Designing public error envelopes or exception filters
- Implementing guards, policy checks, roles, ownership, or tenant authorization
- Configuring rate limits behind a proxy, CORS, helmet, cookies, or upload limits
- Auditing controller methods that accept raw request bodies, files, or unbounded data
Load On Demand
Start with this file. Load detailed files only when the task needs them:
references/_sections.md
references/api-openapi-contracts.md
references/api-versioning-error-contracts.md
references/security-policy-guards.md
references/security-rate-limit-proxy.md
references/security-http-hardening.md
references/api-file-upload-boundary.md
dataset/api/openapi-contracts/correct.ts
sources/inventory.json
Each rule file includes:
- Why the pattern matters
- Incorrect and correct examples
- Dataset path with larger TypeScript examples
- Official source references
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | API Contracts | CRITICAL | api- |
| 2 | Security & Authorization | CRITICAL | security- |
| 3 | Operations | HIGH | ops- |
Source Policy
Prefer official NestJS docs and official package docs for @nestjs/swagger, @nestjs/throttler, and HTTP platform behavior. Do not let generated OpenAPI docs drift from actual DTOs and response behavior.