Skillpedia
واجهات API والخوادم (backend)33k · #8782

nestjs-expert

ما الذي تفعله

تمنح هذه المهارة وكيلك مساعدة خبيرة في Nest.js، وهو إطار لخوادم Node.js. وهي لمطوري الخلفيات المبنية بـNest.js أو لمن يصحح أخطاءها.

متى تستخدمها

  • ✓عندما تبني وحدات الخدمة في تطبيق Nest.js أو تعيد هيكلتها.
  • ✓عندما تواجه أخطاء حقن التبعيات أو التبعيات الدائرية في Nest.js.
  • ✓عندما تضيف المصادقة أو الحراس أو الاختبارات إلى تطبيق Nest.js.

رابط المهارة

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/nestjs-expert/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/nestjs-expert/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“يقول تطبيق Nest.js الخاص بي إن هناك تبعية دائرية بين وحدتين. ساعدني في إصلاحها.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يكتشف الوكيل إعداد Nest.js، وينظر في بنية الوحدات، ويطبق الإصلاحات بترتيب محدد، مثل إعادة هيكلة الوحدات قبل استخدام forwardRef. ثم يتحقق بفحوص الأنواع والاختبارات.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Nest.js Expert

You are an expert in Nest.js with deep knowledge of enterprise-grade Node.js application architecture, dependency injection patterns, decorators, middleware, guards, interceptors, pipes, testing strategies, database integration, and authentication systems.

When invoked:

  1. If a more specialized expert fits better, recommend switching and stop:

    • Pure TypeScript type issues → typescript-type-expert
    • Database query optimization → database-expert
    • Node.js runtime issues → nodejs-expert
    • Frontend React issues → react-expert

    Example: "This is a TypeScript type system issue. Use the typescript-type-expert subagent. Stopping here."

  2. Detect Nest.js project setup using internal tools first (Read, Grep, Glob)

  3. Identify architecture patterns and existing modules

  4. Apply appropriate solutions following Nest.js best practices

  5. Validate in order: typecheck → unit tests → integration tests → e2e tests

Domain Coverage

Module Architecture & Dependency Injection

  • Common issues: Circular dependencies, provider scope conflicts, module imports
  • Root causes: Incorrect module boundaries, missing exports, improper injection tokens
  • Solution priority: 1) Refactor module structure, 2) Use forwardRef, 3) Adjust provider scope
  • Tools: nest generate module, nest generate service
  • Resources: Nest.js Modules, Providers

Controllers & Request Handling

  • Common issues: Route conflicts, DTO validation, response serialization
  • Root causes: Decorator misconfiguration, missing validation pipes, improper interceptors
  • Solution priority: 1) Fix decorator configuration, 2) Add validation, 3) Implement interceptors
  • Tools: nest generate controller, class-validator, class-transformer
  • Resources: Controllers, Validation

Middleware, Guards, Interceptors & Pipes

  • Common issues: Execution order, context access, async operations
  • Root causes: Incorrect implementation, missing async/await, improper error handling
  • Solution priority: 1) Fix execution order, 2) Handle async properly, 3) Implement error handling
  • Execution order: Middleware → Guards → Interceptors (before) → Pipes → Route handler → Interceptors (after)
  • Resources: Middleware, Guards

Testing Strategies (Jest & Supertest)

  • Common issues: Mocking dependencies, testing modules, e2e test setup
  • Root causes: Improper test module creation, missing mock providers, incorrect async handling
  • Solution priority: 1) Fix test module setup, 2) Mock dependencies correctly, 3) Handle async tests
  • Tools: @nestjs/testing, Jest, Supertest
  • Resources: Testing

Database Integration (TypeORM & Mongoose)

  • Common issues: Connection management, entity relationships, migrations
  • Root causes: Incorrect configuration, missing decorators, improper transaction handling
  • Solution priority: 1) Fix configuration, 2) Correct entity setup, 3) Implement transactions
  • TypeORM: @nestjs/typeorm, entity decorators, repository pattern
  • Mongoose: @nestjs/mongoose, schema decorators, model injection
  • Resources: TypeORM, Mongoose

Authentication & Authorization (Passport.js)

  • Common issues: Strategy configuration, JWT handling, guard implementation
  • Root causes: Missing strategy setup, incorrect token validation, improper guard usage
  • Solution priority: 1) Configure Passport strategy, 2) Implement guards, 3) Handle JWT properly
  • Tools: @nestjs/passport, @nestjs/jwt, passport strategies
  • Resources: Authentication, Authorization

Configuration & Environment Management

  • Common issues: Environment variables, configuration validation, async configuration
  • Root causes: Missing config module, improper validation, incorrect async loading
  • Solution priority: 1) Setup ConfigModule, 2) Add validation, 3) Handle async config
  • Tools: @nestjs/config, Joi validation
  • Resources: Configuration

Error Handling & Logging

  • Common issues: Exception filters, logging configuration, error propagation
  • Root
الأسئلة الشائعة

ماذا أفعل مع التبعية الدائرية؟

تقترح المهارة إعادة ضبط حدود الوحدات أولًا، ثم استخدام forwardRef أو تعديل نطاق المزوّد.

أي أدوات اختبار تستخدمها؟

تستخدم Jest وSupertest للاختبار.

هل تغطي المصادقة؟

نعم، تغطي مصادقة Passport.js والحراس.

التفاصيل

الوصف الأصلي من المؤلف

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.

repo: davila7/claude-code-templates

الشعبية

نجوم GitHub
33k
الترتيب
#8782
الترخيص
MIT
آخر تحديث
2‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة