nestjs-expert
Nest.js framework expert specializing in module architecture, dependency injection, middleware, guards, interceptors, testing with Jest/Supertest, TypeORM/Mongoose integration, and Passport.js authentication. Use PROACTIVELY for any Nest.js application issues including architecture decisions, testing strategies, performance optimization, or debugging complex dependency injection problems. If a specialized expert is a better fit, I will recommend switching and stop.
Author
Category
Development ToolsInstall
Hot:5
Download and extract to your skills directory
Copy command and send to OpenClaw for auto-install:
Download and install this skill https://openskills.cc/api/download?slug=sickn33-skills-nestjs-expert&locale=en&source=copy
Nest.js Framework Expert
Skill Overview
A Nest.js Expert specializes in module architecture design, dependency injection configuration, middleware/guards/interceptors implementation, TypeORM/Mongoose database integration, Passport.js authentication, and Jest/Supertest testing-related issues in enterprise-grade Nest.js application development.
Suitable Scenarios
- Nest cannot resolve service dependencies
- Detecting circular dependencies between modules
- Dynamic module configuration and using forwardRef
- Provider scopes and custom injection tokens
- TypeORM Entity configuration and relationship mapping
- Mongoose schema definition and model injection
- Passport JWT strategy configuration
- Multi-database connection setup
- Jest unit testing and dependency mocking
- Writing Supertest E2E tests
- Debugging memory leaks in production
- N+1 query and caching optimization
Core Capabilities
- Automatically detects the Nest.js project structure and version
- Identifies module dependency relationships and potential circular references
- Analyzes TypeORM/Mongoose configuration problems
- Pinpoints failures in the JWT authentication chain
- Covers high-frequency issues from GitHub and Stack Overflow
- Provides community-validated solutions such as using forwardRef and renaming exported services
- Includes recommendations for handling version-specific regressions
- Offers targeted fixes for common pitfalls like Entity decorator syntax errors and Repository Mock issues
- Validates fixes in the correct order: type checking → unit tests → integration tests → E2E tests
- Provides minimal-mock testing module mode
- Guides using getRepositoryToken for TypeORM testing
- Supports helper tooling like @golevelup/ts-jest createMock()
Common Questions
What should I do if Nest prompts “can't resolve dependencies”?
This is one of the most common Nest.js errors. First, check whether the Provider is declared in the module’s
providers array. If it’s used across modules, confirm that the source module properly exports that service. Also ensure the Provider name is spelled correctly. The question mark (?) in the error message can help locate the missing dependency.How do I resolve circular dependency detection errors?
The community recommends three approaches: first consider extracting shared logic into a third module. If you need to keep the existing structure, use
forwardRef() on both sides of the circular dependency. Note that forwardRef may conceal design problems, so in the long run you should refactor module boundaries.TypeORM says “Unable to connect” but the connection configuration is correct?
This error is often misleading; the actual cause is frequently an Entity configuration issue. Check the syntax of the
@Column() decorator (use @Column() rather than @Column('description')), confirm that the Entity is registered in TypeOrmModule.forFeature(), and verify that relationship decorators are correct. For production environments, it’s recommended to wrap the connection logic in useFactory to prevent database failures from crashing the entire application.