nestjs-expert
Build Enterprise NestJS Applications
NestJS developers face complex architectural challenges including dependency injection, module organization, and authentication setup. This skill provides expert guidance on NestJS patterns, testing strategies, and common issue resolution.
تنزيل ZIP المهارة
رفع في Claude
اذهب إلى Settings → Capabilities → Skills → Upload skill
فعّل وابدأ الاستخدام
اختبرها
استخدام "nestjs-expert". How do I fix 'Cannot resolve dependencies of UserService' error?
النتيجة المتوقعة:
This error typically means a provider is missing from your module. Check: 1) Is the dependency in the module's providers array? 2) Is it exported if used across modules? 3) Check for typos in provider names. Use forwardRef() if you have circular dependencies between two services.
استخدام "nestjs-expert". Set up JWT authentication with Passport
النتيجة المتوقعة:
1) Install @nestjs/passport, @nestjs/jwt, passport, passport-jwt. 2) Create JwtStrategy extending PassportStrategy(Strategy). 3) Configure JwtModule with secret in forRoot(). 4) Create AuthGuard using JwtAuthGuard. 5) Apply @UseGuards(AuthGuard) to protected routes.
التدقيق الأمني
آمنAll static findings are false positives. The skill provides documentation and CLI command references for Nest.js development - standard patterns for a framework expert skill. No malicious code execution, credential exfiltration, or cryptographic vulnerabilities exist. External commands are documented CLI tools, network URLs are official documentation links, and environment variable references are legitimate configuration guidance.
مشكلات حرجة (1)
مشكلات عالية المخاطر (2)
مشكلات منخفضة المخاطر (2)
درجة الجودة
ماذا يمكنك بناءه
Fix NestJS Dependency Injection Errors
Resolve 'Cannot resolve dependencies' errors by identifying missing providers, incorrect module exports, or circular dependencies.
Set Up JWT Authentication
Configure Passport.js strategies with JWT, proper guard implementation, and token validation.
Write Comprehensive Tests
Create unit tests with mocks, integration tests with test database, and e2e tests with Supertest.
جرّب هذه الموجهات
I'm getting 'Circular dependency detected' error in my NestJS application between UserService and AuthService. Help me resolve this using forwardRef() or refactor the architecture.
I need to implement JWT authentication in my NestJS app with Passport.js. Show me how to configure the JwtStrategy, JwtModule, and AuthGuard.
Help me write unit tests for my UserService using Jest. It depends on UserRepository and JwtService. Show me proper mocking.
I have a User entity with relationships to Posts and Comments. Show me how to configure OneToMany and ManyToOne relationships in TypeORM with NestJS.
أفضل الممارسات
- Use dependency injection to keep services loosely coupled and testable
- Follow the modular architecture: one feature module per domain entity
- Always validate DTOs using class-validator and class-transformer pipes
تجنب
- Avoid importing modules directly into controllers - use service injection
- Do not skip validation pipes - always validate incoming request data
- Avoid tight coupling between modules - use exports and interfaces