agentsclimarketplace

Nestjs modules di

Skill dkmqflx/nestjs-best-practices-plugin/plugins/nestjs-best-practices/skills/nestjs-modules-di

Claude Code plugin: 12 NestJS best-practice skills (90 rules) grounded in the official NestJS docs

Install
npx -y skills add dkmqflx/nestjs-best-practices-plugin --skill nestjs-modules-di

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 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

NestJS module organization and dependency injection best practices. Use when writing or reviewing NestJS modules, providers, or DI wiring. Triggers on @Module, @Injectable, provider registration, injection scopes, dynamic modules, or circular dependencies.

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.0 KB, as published. Nobody here has run it

NestJS Modules & Dependency Injection

Best-practices reference for organizing NestJS applications into encapsulated feature modules and wiring providers through the IoC container correctly. Covers module boundaries, provider visibility, dynamic modules, injection scopes, custom provider tokens, and circular dependencies.

When to Apply

  • Designing or reviewing @Module structure and feature boundaries
  • Registering providers and deciding what to export
  • Building configurable libraries with forRoot/forRootAsync
  • Choosing an injection scope (singleton vs REQUEST vs TRANSIENT)
  • Wiring custom providers (useClass/useValue/useFactory) and injection tokens
  • Resolving or avoiding circular dependencies
  • Deciding whether a module should be @Global()

Rules

  • feature-module-boundaries - one module per feature/domain; keep providers encapsulated
  • export-shared-providers - only providers listed in exports are visible to importing modules
  • dynamic-modules-forroot - configure reusable modules via forRoot/forRootAsync returning DynamicModule
  • injection-scopes-default-singleton - prefer default singleton scope; REQUEST scope bubbles up and hurts performance
  • custom-provider-tokens - use useClass/useValue/useFactory with injection tokens and interfaces
  • constructor-injection - prefer constructor injection over property injection
  • avoid-circular-dependencies - restructure first; use forwardRef only as a last resort
  • global-module-sparingly - reserve @Global() for truly cross-cutting modules (config, logger)

How to Use

Read individual rule files in rules/ for explanation + incorrect/correct examples.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.