nestjsAvoid common NestJS mistakes — DI scoping, circular dependencies, validation pipes, and module organization traps.
Install via ClawdBot CLI:
clawdbot install ivangdavila/nestjsRequires:
providers 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 valueGenerated Mar 1, 2026
Building a scalable online marketplace with user authentication, product catalog management, and order processing. This scenario leverages NestJS's modular structure for clean separation of concerns, such as user, product, and order modules, while using validation pipes to ensure data integrity in API requests.
Creating a secure financial application for handling transactions, account management, and compliance reporting. NestJS's dependency injection and request-scoped providers help manage sensitive state across user sessions, and exception filters ensure robust error handling for regulatory requirements.
Developing a patient-facing portal for appointment scheduling, medical record access, and telehealth features. This scenario uses NestJS's module organization to isolate sensitive health data modules and validation pipes with whitelisting to protect against malicious input in patient forms.
Implementing a backend for managing IoT devices, including real-time data ingestion, device configuration, and alert systems. NestJS's execution order ensures middleware and guards handle authentication before data processing, and async providers facilitate connections to external IoT platforms.
Building a headless CMS for publishing and managing digital content across multiple channels. This scenario utilizes NestJS's global modules for shared logging and configuration, while testing strategies with mocks enable efficient unit and E2E testing of content APIs.
Offering NestJS-based applications as subscription services, such as project management tools or CRM systems. This model benefits from NestJS's scalability and modular design to quickly adapt features for different client tiers, generating recurring revenue.
Providing bespoke backend development services for clients in industries like e-commerce or healthcare. Using NestJS's best practices, such as avoiding circular dependencies and proper validation, reduces maintenance costs and enables fixed-price or hourly billing projects.
Creating and selling access to specialized APIs built with NestJS, such as payment processing or data analytics services. This model leverages NestJS's exception handling and testing capabilities to ensure high availability and reliability, driving pay-per-use or tiered pricing revenue.
💬 Integration Tip
Ensure Node.js is installed and use forwardRef to resolve circular dependencies when integrating with external modules. For validation, always pair class-validator decorators with ValidationPipe to avoid common data errors.
Automatically update Clawdbot and all installed skills once daily. Runs via cron, checks for updates, applies them, and messages the user with a summary of what changed.
Full desktop computer use for headless Linux servers. Xvfb + XFCE virtual desktop with xdotool automation. 17 actions (click, type, scroll, screenshot, drag,...
Essential Docker commands and workflows for container management, image operations, and debugging.
Tool discovery and shell one-liner reference for sysadmin, DevOps, and security tasks. AUTO-CONSULT this skill when the user is: troubleshooting network issues, debugging processes, analyzing logs, working with SSL/TLS, managing DNS, testing HTTP endpoints, auditing security, working with containers, writing shell scripts, or asks 'what tool should I use for X'. Source: github.com/trimstray/the-book-of-secret-knowledge
Deploy applications and manage projects with complete CLI reference. Commands for deployments, projects, domains, environment variables, and live documentation access.
Monitor topics of interest and proactively alert when important developments occur. Use when user wants automated monitoring of specific subjects (e.g., product releases, price changes, news topics, technology updates). Supports scheduled web searches, AI-powered importance scoring, smart alerts vs weekly digests, and memory-aware contextual summaries.