Agent skill

nestjs

Provides comprehensive guidance for NestJS using the official documentation. Use when the user asks about NestJS architecture, controllers, providers, modules, middleware, guards, pipes, interceptors, dependency injection, GraphQL, WebSockets, microservices, OpenAPI/Swagger, security, or testing.

Stars 254
Forks 41

Install this agent skill to your Project

npx add-skill https://github.com/partme-ai/full-stack-skills/tree/main/skills/nodejs-skills/nestjs

SKILL.md

When to use this skill

Use this skill whenever the user wants to:

  • Build or refactor a NestJS application
  • Implement controllers, providers, and modules
  • Apply middleware, pipes, guards, or interceptors
  • Configure DI scopes, dynamic modules, or lifecycle hooks
  • Add validation, serialization, caching, logging, or queues
  • Integrate GraphQL, WebSockets, or microservices
  • Document APIs with OpenAPI/Swagger
  • Implement authentication/authorization or security hardening
  • Write unit or e2e tests for NestJS

How to use this skill

  1. Identify the topic from the user's request and find the corresponding example file in the mapping below

  2. Load the appropriate example file from the examples/ directory

  3. Follow the specific instructions in that example file for syntax, structure, and best practices

    Important Notes:

    • All examples follow NestJS official documentation structure
    • Examples include both JavaScript and TypeScript versions where applicable
    • Each example file includes key concepts, code examples, and official documentation links
    • Always check the example file for best practices and common patterns
  4. Use templates from the templates/ directory to speed up common scaffolding

Doc mapping (one-to-one with https://docs.nestjs.com/)

Overview (概览)

Fundamentals (基础)

Techniques (技巧)

Security (安全)

GraphQL

WebSockets

Microservices

OpenAPI (Swagger)

CLI & Testing & Recipes

Examples and Templates

This skill includes detailed examples organized to match the NestJS official documentation structure (https://docs.nestjs.com/). All examples are in the examples/ directory, organized by topic (see mapping above).

To use examples:

  • Identify the topic from the user's request
  • Load the appropriate example file from the mapping above
  • Follow the instructions, syntax, and best practices in that file
  • Adapt the code examples to your specific use case

To use templates:

  • Reference templates in templates/ directory for common scaffolding
  • Templates include: controller, provider, module, middleware, guard, pipe, interceptor, exception filter, DTO, and project structure
  • Adapt templates to your specific needs and coding style

Best Practices

  1. Use dependency injection: Leverage NestJS DI container for better testability and maintainability
  2. Organize by modules: Group related functionality into feature modules
  3. Use decorators consistently: Follow NestJS decorator patterns for controllers, providers, and routes
  4. Validate input data: Use ValidationPipe and DTOs for request validation
  5. Handle errors gracefully: Implement global exception filters for consistent error handling
  6. Use guards for authorization: Protect routes with guards rather than inline checks
  7. Leverage interceptors: Use interceptors for cross-cutting concerns like logging and transformation
  8. Type safety: Use TypeScript for better type safety and developer experience
  9. Test thoroughly: Write unit tests for services and E2E tests for API endpoints
  10. Follow official patterns: Refer to official documentation for recommended patterns and practices

Resources

Keywords

NestJS, Node.js, framework, controller, provider, module, middleware, exception filter, pipe, guard, interceptor, dependency injection, GraphQL, WebSocket, microservice, OpenAPI, Swagger, testing, validation, caching, logging, TypeScript, decorator, DI, IoC, 控制器, 提供者, 模块, 中间件, 守卫, 管道, 拦截器, 依赖注入

Expand your agent's capabilities with these related and highly-rated skills.

partme-ai/full-stack-skills

ocrmypdf-batch

OCRmyPDF batch processing skill — process multiple PDFs, Docker automation, shell scripting, and CI/CD integration. Use when the user needs to OCR many PDFs, set up automated OCR pipelines, or integrate OCR into workflows.

254 41
Explore
partme-ai/full-stack-skills

ocrmypdf-optimize

OCRmyPDF optimization skill — compress PDFs, configure PDF/A output, JBIG2 encoding, and lossless optimization. Use when the user needs to reduce PDF file size, create archival PDF/A files, or optimize OCR output.

254 41
Explore
partme-ai/full-stack-skills

ocrmypdf-image

OCRmyPDF image processing skill — deskew, rotate, clean, despeckle, remove border from scanned documents. Use when the user needs to improve scanned PDF quality, fix skewed pages, remove noise, or clean up scanned documents before OCR.

254 41
Explore
partme-ai/full-stack-skills

ocrmypdf-api

OCRmyPDF Python API and plugin skill — use OCRmyPDF programmatically from Python, integrate with applications, and extend with plugins (EasyOCR, PaddleOCR, AppleOCR). Use when the user needs to call OCRmyPDF from Python code, build OCR pipelines, or use alternative OCR engines.

254 41
Explore
partme-ai/full-stack-skills

ocrmypdf

OCRmyPDF core skill — add searchable OCR text layer to scanned PDFs, convert images to searchable PDFs, support 100+ languages via Tesseract. Use when the user needs to OCR a PDF, make a scanned PDF searchable, or extract text from scanned documents.

254 41
Explore
partme-ai/full-stack-skills

svelte

Guides Svelte and SvelteKit development including reactive components, stores, transitions, lifecycle hooks, SSR, file-based routing, and deployment. Use when the user needs to build Svelte components, create SvelteKit applications, implement reactivity patterns, or configure Svelte with Vite.

254 41
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results