dependency-injection

Installation
SKILL.md

NestJS Dependency Injection

When to Use This Skill

Use this skill when:

  • Working with custom providers beyond standard class providers
  • Using factory providers for dynamic or async initialization
  • Implementing value providers for configuration or constants
  • Creating alias providers with useExisting
  • Working with non-class-based injection tokens (strings or symbols)
  • Implementing async providers that require initialization
  • Understanding the three-step provider registration process
  • Configuring provider scopes beyond singleton

What is Dependency Injection?

Dependency Injection (DI) is an inversion of control pattern where dependencies are provided to a class rather than the class creating them itself. NestJS has a built-in IoC (Inversion of Control) container that manages the entire DI system.

Three-Step Provider Registration

Related skills
Installs
2
GitHub Stars
1
First Seen
Mar 29, 2026