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.
Descargar el ZIP de la skill
Subir en Claude
Ve a Configuración → Capacidades → Skills → Subir skill
Activa y empieza a usar
Pruébalo
Usando "nestjs-expert". How do I fix 'Cannot resolve dependencies of UserService' error?
Resultado esperado:
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.
Usando "nestjs-expert". Set up JWT authentication with Passport
Resultado esperado:
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.
Auditoría de seguridad
SeguroAll 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.
Problemas críticos (1)
Problemas de riesgo alto (2)
Problemas de riesgo bajo (2)
Puntuación de calidad
Lo que puedes crear
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.
Prueba estos prompts
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.
Mejores prácticas
- 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
Evitar
- 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