المهارات nestjs-expert
📦

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.

يدعم: Claude Codex Code(CC)
⚠️ 66 ضعيف
1

تنزيل ZIP المهارة

2

رفع في Claude

اذهب إلى Settings → Capabilities → Skills → Upload skill

3

فعّل وابدأ الاستخدام

اختبرها

استخدام "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.

التدقيق الأمني

آمن
v1 • 2/24/2026

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
الملفات التي تم فحصها
558
الأسطر التي تم تحليلها
5
النتائج
1
إجمالي عمليات التدقيق

مشكلات حرجة (1)

False Positive: Dangerous Combination Heuristic
Static scanner flagged 'Code execution + Network + Credential access' as dangerous. This is a false positive. The skill documents standard development workflows: CLI commands (nest generate), documentation URLs, and JWT_SECRET environment variable configuration - all legitimate Nest.js development patterns.

مشكلات عالية المخاطر (2)

False Positive: Weak Cryptographic Algorithm
Scanner flagged lines as 'weak cryptographic algorithm'. Upon review: lines contain YAML frontmatter, forwardRef() for DI, and TypeORM decorators. No cryptographic code exists.
False Positive: Sensitive Data Exposure
Scanner flagged JWT_SECRET environment variable as sensitive exposure. This is legitimate authentication configuration guidance - standard practice for secure JWT implementation.
مشكلات منخفضة المخاطر (2)
False Positive: External Commands
Scanner flagged shell backticks as 'external_commands'. These are documentation showing CLI commands (nest generate, npm run build, grep, find) - not actual code execution. This is standard developer documentation.
False Positive: Network Access (Hardcoded URLs)
Scanner flagged hardcoded URLs. These are official documentation links to Nest.js, Jest, TypeORM, and Passport.js - legitimate reference material.
تم تدقيقه بواسطة: claude

درجة الجودة

38
الهندسة المعمارية
100
قابلية الصيانة
87
المحتوى
50
المجتمع
61
الأمان
87
الامتثال للمواصفات

ماذا يمكنك بناءه

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.

جرّب هذه الموجهات

Fix Circular Dependency
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.
Set Up JWT Auth
I need to implement JWT authentication in my NestJS app with Passport.js. Show me how to configure the JwtStrategy, JwtModule, and AuthGuard.
Write Unit Tests
Help me write unit tests for my UserService using Jest. It depends on UserRepository and JwtService. Show me proper mocking.
Configure TypeORM Entities
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

الأسئلة المتكررة

What is NestJS?
NestJS is a Node.js framework for building efficient, scalable server-side applications. It uses TypeScript and combines elements of OOP, FP, and FRP.
How do I fix circular dependencies in NestJS?
Use forwardRef() on both sides of the circular dependency, or refactor to extract shared logic into a third module.
How do I test NestJS services?
Use @nestjs/testing to create Test.createTestingModule(). Mock dependencies using useValue or useClass, then compile and test the service.
What is the difference between guards and interceptors?
Guards determine if a route can be accessed (authorization). Interceptors transform requests/responses or add extra logic before/after method execution.
How do I configure TypeORM with NestJS?
Use @nestjs/typeorm package. Import TypeOrmModule.forRoot() in AppModule and TypeOrmModule.forFeature() in feature modules with entity arrays.
Can this skill write complete applications?
This skill provides expert guidance, code patterns, and troubleshooting. It helps you understand and implement NestJS solutions rather than generating complete applications.

تفاصيل المطور

المؤلف

sickn33

الترخيص

MIT

مرجع

main

بنية الملفات

📄 SKILL.md