技能 nestjs-expert
📦

nestjs-expert

安全

엔터프라이즈 NestJS 애플리케이션 구축

NestJS 개발자들은 의존성 주입, 모듈 구성, 인증 설정 등 복잡한 아키텍처 문제에 직면합니다. 이 스킬은 NestJS 패턴, 테스트 전략, 일반적인 문제 해결에 대한 전문적인 가이드를 제공합니다.

支援: Claude Codex Code(CC)
⚠️ 66
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

測試它

正在使用「nestjs-expert」。 'Cannot resolve dependencies of UserService' 오류를 어떻게 수정하나요?

預期結果:

이 오류는 일반적으로 모듈에 프로바이더가 누락되었음을 의미합니다. 확인사항: 1) 의존성이 모듈의 providers 배열에 있는가? 2) 모듈 간에 사용된다면 export 되었는가? 3) 프로바이더 이름에 오타가 없는가? 두 서비스 간에 순환 의존성이 있다면 forwardRef() 를 사용하세요.

正在使用「nestjs-expert」。 Passport 를 사용한 JWT 인증 설정

預期結果:

1) @nestjs/passport, @nestjs/jwt, passport, passport-jwt 설치. 2) PassportStrategy(Strategy) 를 확장하는 JwtStrategy 생성. 3) forRoot() 에서 secret 과 함께 JwtModule 설정. 4) JwtAuthGuard 를 사용한 AuthGuard 생성. 5) 보호된 라우트에 @UseGuards(AuthGuard) 적용.

安全審計

安全
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
規範符合性

你能建構什麼

NestJS 의존성 주입 오류 수정

누락된 프로바이더, 잘못된 모듈 내보내기 또는 순환 의존성을 식별하여 'Cannot resolve dependencies' 오류를 해결합니다.

JWT 인증 설정

Passport.js 전략을 JWT 와 함께 설정하고, 적절한 가드 구현 및 토큰 검증을 수행합니다.

포괄적인 테스트 작성

mock 을 사용한 단위 테스트, 테스트 데이터베이스를 사용한 통합 테스트, Supertest 를 사용한 e2e 테스트를 생성합니다.

試試這些提示

순환 의존성 수정
NestJS 애플리케이션에서 UserService 와 AuthService 사이에 'Circular dependency detected' 오류가 발생하고 있습니다. forwardRef() 를 사용하거나 아키텍처를 리팩토링하여 해결해 주세요.
JWT 인증 설정
NestJS 앱에 Passport.js 를 사용한 JWT 인증을 구현해야 합니다. JwtStrategy, JwtModule, AuthGuard 를 설정하는 방법을 보여주세요.
단위 테스트 작성
Jest 를 사용하여 UserService 에 대한 단위 테스트를 작성하는 것을 도와주세요. UserRepository 와 JwtService 에 의존합니다. 적절한 mocking 을 보여주세요.
TypeORM 엔티티 설정
Posts 와 Comments 와 관계가 있는 User 엔티티가 있습니다. NestJS 에서 TypeORM 과 함께 OneToMany 와 ManyToOne 관계를 설정하는 방법을 보여주세요.

最佳實務

  • 의존성 주입을 사용하여 서비스를 느슨하게 결합하고 테스트 가능하게 유지
  • 모듈형 아키텍처 준수: 도메인 엔티티당 하나의 기능 모듈
  • class-validator 와 class-transformer pipe 를 사용하여 DTO 를 항상 검증

避免

  • 컨트롤러에 모듈을 직접 import 하지 않기 - 서비스 주입 사용
  • 검증 pipe 를 생략하지 않기 - 들어오는 요청 데이터를 항상 검증
  • 모듈 간 긴밀한 결합 피하기 - export 와 interface 사용

常見問題

NestJS 란 무엇인가요?
NestJS 는 효율적이고 확장 가능한 서버 사이드 애플리케이션을 구축하기 위한 Node.js 프레임워크입니다. TypeScript 를 사용하며 OOP, FP, FRP 의 요소를 결합합니다.
NestJS 에서 순환 의존성을 어떻게 수정하나요?
순환 의존성의 양쪽에 forwardRef() 를 사용하거나, 공유 로직을 세 번째 모듈로 추출하도록 리팩토링하세요.
NestJS 서비스를 어떻게 테스트하나요?
@nestjs/testing 을 사용하여 Test.createTestingModule() 을 생성합니다. useValue 또는 useClass 를 사용하여 의존성을 mock 한 후 컴파일하고 서비스를 테스트합니다.
가드와 인터셉터의 차이점은 무엇인가요?
가드는 라우트 접근 가능 여부 (인가) 를 결정합니다. 인터셉터는 요청/응답을 변환하거나 메서드 실행 전후에 추가 로직을 추가합니다.
NestJS 와 함께 TypeORM 을 어떻게 설정하나요?
@nestjs/typeorm 패키지를 사용하세요. AppModule 에서 TypeOrmModule.forRoot() 를 import 하고, 엔티티 배열과 함께 기능 모듈에서 TypeOrmModule.forFeature() 를 import 하세요.
이 스킬이 완전한 애플리케이션을 작성할 수 있나요?
이 스킬은 전문적인 가이드, 코드 패턴, 문제 해결을 제공합니다. 완전한 애플리케이션을 생성하는 대신 NestJS 솔루션을 이해하고 구현할 수 있도록 도와줍니다.

開發者詳情

檔案結構

📄 SKILL.md