Install
openclaw skills install nestjsAvoid common NestJS mistakes — DI scoping, circular dependencies, validation pipes, and module organization traps.
openclaw skills install nestjsproviders array AND exports if used by other modulesforwardRef(() => Module) in both modules@Injectable({ scope: Scope.REQUEST }), propagates to dependentsimports: [UserModule] not providers: [UserService]exports makes providers available to importers — without it, provider stays private@Global() decorator — only for truly shared (config, logger)forRoot() vs forRootAsync() — async for when config depends on other providersValidationPipe needs class-validator decorators — plain classes won't validatetransform: true for auto-transformation — string "1" to number 1whitelist: true strips unknown properties — forbidNonWhitelisted: true to error instead@ValidateNested() AND @Type(() => NestedDto) — both requiredthrow new HttpException() not return — must throw for filter to catchHttpException — or implement ExceptionFilterBadRequestException, NotFoundException, etc. — use these, not generic HttpExceptioncreateTestingModule doesn't auto-mock — provide mocks explicitly in providers.overrideProvider(X).useValue(mock) — before .compile()app.init() — and app.close() in afterAll@Body() without DTO returns plain object — no validation, no transformation@Param('id') is always string — use ParseIntPipe for number: @Param('id', ParseIntPipe)useFactory: async () => await createConnection()await on async service methods — returns Promise, not value