nestjs-best-practices

Guide NestJS architecture, security, performance, and testing best practices.

1|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/salafidurus/salafi-audios --skill nestjs-best-practices-salafidurus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nestjs-best-practices
Source: https://github.com/salafidurus/salafi-audios/tree/main/apps/api/.opencode/skills/nestjs-best-practices
Command: npx skills add https://github.com/salafidurus/salafi-audios --skill nestjs-best-practices-salafidurus

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill provides a comprehensive set of rules and best practices to ensure NestJS applications are robust, maintainable, secure, and performant, reducing common pitfalls and improving development velocity.

Core Features & Use Cases

  • Architecture: Guidance on module organization, dependency management, and design patterns.
  • Security: Rules for input validation, authentication, authorization, and preventing common vulnerabilities.
  • Performance: Best practices for database queries, caching, and efficient code execution.
  • Use Case: A developer can use this Skill to review their NestJS code, ensuring it adheres to critical architectural principles, or to guide the development of new features by following specific rules for error handling, dependency injection, and API design.

Quick Start

Review the 'Architecture' rules to understand how to organize your NestJS project.

Frequently Asked Questions about nestjs-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the best practices for NestJS architecture and module organization?

NestJS architecture best practices involve strict module organization, controlled dependency management, and established design patterns to ensure applications remain robust and maintainable. This skill enforces critical rules to guide your project's structural foundation.

How do I handle errors and dependency injection in a NestJS application?

Handling errors and dependency injection in a NestJS application requires following specific rules for robust execution. This skill guides development by enforcing critical principles for error handling and dependency injection to generate production-ready code.

Does this guide cover NestJS security and performance optimization?

Yes, this guide covers NestJS security and performance optimization by providing rules for input validation, authentication, authorization, caching, and efficient database queries. These practices prevent common vulnerabilities and ensure performant applications.

Can I use these rules to review and refactor existing NestJS code?

You can use these rules to review and refactor existing NestJS code by checking it against critical architectural principles. The skill aids AI agents in architectural reviews and refactoring to improve code quality and maintainability.

What is the best way to design APIs and microservices in NestJS?

The best way to design APIs and microservices in NestJS is by following structured rules for API design and DevOps. This skill provides specific guidance to ensure your microservices and database interactions are production-ready.