nestjs-best-practices
NestJS best practices and architecture patterns for building production-ready applications.
Skill by Kadajett
Chalk Labs
Need help deploying nestjs-best-practices?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ifernandez89-nestjs-best-practices
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
nestjs-best-practices- Description
- NestJS best practices and architecture patterns for building production-ready applications. This skill should be used when writing, reviewing, or refactoring NestJS code to ensure proper patterns for modules, dependency injection, security, and performance.
- License
- MIT
- Metadata
- author: Kadajett · version: 1.2.0
- Instructions
- 124 lines in SKILL.md · view on GitHub
Files (43)
- SKILL.md
- _sections.md · rules/
- _template.md · rules/
- api-use-dto-serialization.md · rules/
- api-use-interceptors.md · rules/
- api-use-pipes.md · rules/
- api-versioning.md · rules/
- arch-avoid-circular-deps.md · rules/
- arch-feature-modules.md · rules/
- arch-module-sharing.md · rules/
- arch-single-responsibility.md · rules/
- arch-use-events.md · rules/
- arch-use-repository-pattern.md · rules/
- db-avoid-n-plus-one.md · rules/
- db-use-migrations.md · rules/
- db-use-transactions.md · rules/
- devops-graceful-shutdown.md · rules/
- devops-use-config-module.md · rules/
- devops-use-logging.md · rules/
- di-avoid-service-locator.md · rules/
- di-interface-segregation.md · rules/
- di-liskov-substitution.md · rules/
- di-prefer-constructor-injection.md · rules/
- di-scope-awareness.md · rules/
- di-use-interfaces-tokens.md · rules/
- error-handle-async-errors.md · rules/
- error-throw-http-exceptions.md · rules/
- error-use-exception-filters.md · rules/
- micro-use-health-checks.md · rules/
- micro-use-patterns.md · rules/
- micro-use-queues.md · rules/
- perf-async-hooks.md · rules/
- perf-lazy-loading.md · rules/
- perf-optimize-database.md · rules/
- perf-use-caching.md · rules/
- security-auth-jwt.md · rules/
- security-rate-limiting.md · rules/
- security-sanitize-output.md · rules/
- security-use-guards.md · rules/
- security-validate-all-input.md · rules/
- test-e2e-supertest.md · rules/
- test-mock-external-services.md · rules/
- test-use-testing-module.md · rules/
SKILL.md (first lines)
# NestJS Best Practices Comprehensive best practices guide for NestJS applications. Contains 40 rules across 10 categories, prioritized by impact to guide automated refactoring and code generation. ## When to Apply Reference these guidelines when: - Writing new NestJS modules, controllers, or services - Implementing authentication and authorization - Reviewing code for architecture and security issues - Refactoring existing NestJS codebases - Optimizing performance or database queries - Building microservices architectures ## Rule Categories by Priority | Priority | Category | Impact | Prefix | |----------|----------|--------|--------| | 1 | Architecture | CRITICAL | `arch-` | | 2 | Dependency Injection | CRITICAL | `di-` | | 3 | Error Handling | HIGH | `error-` | | 4 | Security | HIGH | `security-` | | 5 | Performance | HIGH | `perf-` | | 6 | Testing | MEDIUM-HIGH | `test-` | | 7 | Database & ORM | MEDIUM-HIGH | `db-` | | 8 | API Design | MEDIUM | `api-` | | 9 | Microservices | MEDIUM | `micro-` | | 10 | DevOps & Deployment | LOW-MEDIUM | `devops-` | ## Quick Reference ### 1. Architecture (CRITICAL) - `arch-avoid-circular-deps` - Avoid circular module dependencies - `arch-feature-modules` - Organize by feature, not technical layer - `arch-module-sharing` - Proper module exports/imports, avoid duplicate providers - `arch-single-responsibility` - Focused services over "god services" - `arch-use-repository-pattern` - Abstract database logic for testability - `arch-use-events` - Event-driven architecture for decoupling ### 2. Dependency Injection (CRITICAL) - `di-avoid-service-locator` - Avoid service locator anti-pattern - `di-interface-segregation` - Interface Segregation Principle (ISP) - `di-liskov-substitution` - Liskov Substitution Principle (LSP) - `di-prefer-constructor-injection` - Constructor over property injection - `di-scope-awareness` - Understand singleton/request/transient scopes - `di-use-interfaces-tokens` - Use injection tokens for interfaces ### 3. Error Handling (HIGH) - `error-use-exception-filters` - Centralized exception handling - `error-throw-http-exceptions` - Use NestJS HTTP exceptions - `error-handle-async-errors` - Handle async errors properly ### 4. Security (HIGH) - `security-auth-jwt` - Secure JWT authentication - `security-validate-all-input` - Validate with class-validator - `security-use-guards` - Authentication and authorization guards - `security-sanitize-output` - Prevent XSS attacks - `security-rate-limiting` - Implement rate limiting ### 5. Performance (HIGH) - `perf-async-hooks` - Proper async lifecycle hooks - `perf-use-caching` - Implement caching strategies - `perf-optimize-database` - Optimize database queries - `perf-lazy-loading` - Lazy load modules for faster startup ### 6. Testing (MEDIUM-HIGH) - `test-use-testing-module` - Use NestJS testing utilities - `test-e2e-supertest` - E2E testing with Supertest - `test-mock-external-services` - Mock external dependencies ### 7. Database & ORM (MEDIUM-HIGH) - `db-use-transactions` - Transaction management - `db-avoid-n-plus-one` - Avoid N+1 query problems - `db-use-migrations` - Use migrations for schema changes ### 8. API Design (MEDIUM) - `api-use-dto-serialization` - DTO and response serialization - `api-use-interceptors` - Cross-cutting concerns - `api-versioning` - API versioning strategies - `api-use-pipes` - Input transformation with pipes ### 9. Microservices (MEDIUM) - `micro-use-patterns` - Message and event patterns - `micro-use-health-checks` - Health checks for orchestration - `micro-use-queues` - Background job processing ### 10. DevOps & Deployment (LOW-MEDIUM) - `devops-use-config-module` - Environment configuration - `devops-use-logging` - Structured logging - `devops-graceful-shutdown` - Zero-downtime deployments ## How to Use Read individual rule files for detailed explanations and code examples: ``` rules/arch-avoid-circular-deps.md rules/security-validate-all-input.md rules/_sections.md ``` Each rule file contains: - Brief explanation of why it matters - Incorrect code example with explanation - Correct code example with explanation - Additional context and references ## Full Compiled Document
From ifernandez89/productos_crud_bkd, MIT.
More from ifernandez89/productos_crud_bkd
- 0.565score
blender-automation
JarBees 3D Studio
Guía experta y patrones de producción para automatización headless de Blender (v5.x/4.x) mediante Python (bpy).
SkillAFreshness: AClaude Code +9 - 0.561score
threejs-graphics
JarBees Graphic Studio
Guía experta y patrones de producción para Three.js r165 en entornos WebGL 2.0 y headless Playwright.
SkillAFreshness: AClaude Code +9 - 0.474score
playwright-best-practices
currents.dev
Use when writing Playwright tests, fixing flaky tests, debugging failures, implementing Page Object Model, configuring CI/CD, optimizing performance, mocking…
SkillCFreshness: CClaude Code +9 - 0.469score
bun
ifernandez89
Use when building, testing, and deploying JavaScript/TypeScript applications.
SkillCFreshness: CClaude Code +9 - 0.469score
prisma-cli
prisma
Prisma CLI commands reference covering all available commands, options, and usage patterns.
SkillCFreshness: CClaude Code +9 - 0.445score
frontend-design
ifernandez89
Create distinctive, production-grade frontend interfaces with high design quality.
SkillCFreshness: CClaude Code +9 - 0.445score
frontend-design
ifernandez89
Create distinctive, production-grade frontend interfaces with high design quality.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 19, 2026 (14 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.2.0
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.561score
nestjs-best-practices
Kadajett
NestJS best practices and architecture patterns for building production-ready applications.
SkillCFreshness: C★ 28Claude Code +9 - 0.333score
nestjs-best-practices
Kadajett
NestJS best practices and architecture patterns for building production-ready applications.
SkillBFreshness: B★ 2Claude Code +9
More from Kadajett
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get nestjs-best-practices running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
nestjs-best-practices skill. Agent Mart. https://agentmart.dev/skills/ifernandez89-nestjs-best-practices (last updated 2026-10-24)