Nestjs documentation
Skill FilippoDeSilva/skills/skills/nestjs/nestjs-documentation
Skills for my agentic development workflow.
npx -y skills add FilippoDeSilva/skills --skill nestjs-documentationAssembled 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
Automate Swagger/OpenAPI documentation and standardize API response schemas in NestJS. Use when generating OpenAPI specs, documenting paginated or generic responses, configuring the Nest CLI Swagger plugin, or publishing versioned API docs.
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
2.3 KB, as published. Nobody here has run it
OpenAPI & Documentation
Priority: P2 (MAINTENANCE)
Workflow
- Enable Swagger plugin in
nest-cli.jsonto auto-generate@ApiPropertyfrom DTOs. - Annotate controllers with
@ApiTags,@ApiResponse, and auth decorators. - Create generic wrappers for paginated and polymorphic responses.
- Generate separate docs for public vs internal audiences.
Setup
See implementation examples for nest-cli.json plugin config and Swagger bootstrap.
Response Documentation
- Strictness: Every controller method must
@ApiResponse({ status: 200, type: UserDto }). - Generic Wrappers: Define
ApiPaginatedResponse<T>decorators usingApiExtraModels+getSchemaPath()to handle generics properly.
Advanced Patterns
- Polymorphism: Use
@ApiExtraModelsandgetSchemaPathforoneOf/anyOfunion types. - File Uploads: Use
@ApiConsumes('multipart/form-data')with explicit@ApiBodyschema. - Authentication: Use
@ApiBearerAuth()or@ApiSecurity('api-key')matchingDocumentBuilderconfig. - Enums: Force named enums:
@ApiProperty({ enum: MyEnum, enumName: 'MyEnum' }).
Operation Grouping
- Tags: Mandatory
@ApiTags('domains')on every Controller. - Multiple Docs: Generate separate docs for different audiences (Public vs Internal).
Anti-Patterns
- No missing @ApiResponse: Every controller method must declare its response type and status code.
- No /docs in production: Disable Swagger in production to prevent API schema exposure.
- No manual @ApiProperty everywhere: Use Nest CLI Swagger plugin to auto-generate from DTOs.