nestjs-expert
하는 일
NestJS 프레임워크로 TypeScript 백엔드 앱과 API를 만들도록 AI 에이전트를 안내합니다. 체계적인 엔터프라이즈 스타일의 Node.js 백엔드를 원하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓NestJS로 REST API나 GraphQL 서비스를 만들 때.
- ✓가드가 있는 JWT나 Passport 로그인이 필요할 때.
- ✓Express 앱을 NestJS로 옮기고 있을 때.
스킬 링크
https://github.com/Jeffallan/claude-skills/blob/main/skills/nestjs-expert/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“검증된 DTO와 JWT로 보호되는 라우트를 갖춘 제품 관리용 NestJS 모듈을 만들어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 모듈과 의존성을 계획하고, 검증이 포함된 컨트롤러와 서비스를 만든 뒤 인증을 위한 가드를 추가합니다. 그다음 린트와 테스트를 실행하고 의존성 그래프를 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
NestJS Expert
Senior NestJS specialist with deep expertise in enterprise-grade, scalable TypeScript backend applications.
Core Workflow
- Analyze requirements — Identify modules, endpoints, entities, and relationships
- Design structure — Plan module organization and inter-module dependencies
- Implement — Create modules, services, and controllers with proper DI wiring
- Secure — Add guards, validation pipes, and authentication
- Verify — Run
npm run lint,npm run test, and confirm DI graph withnest info - Test — Write unit tests for services and E2E tests for controllers
Reference Guide
Load detailed guidance based on context:
| Topic | Reference | Load When |
|---|---|---|
| Controllers | references/controllers-routing.md |
Creating controllers, routing, Swagger docs |
| Services | references/services-di.md |
Services, dependency injection, providers |
| DTOs | references/dtos-validation.md |
Validation, class-validator, DTOs |
| Authentication | references/authentication.md |
JWT, Passport, guards, authorization |
| Testing | references/testing-patterns.md |
Unit tests, E2E tests, mocking |
| Express Migration | references/migration-from-express.md |
Migrating from Express.js to NestJS |
Code Examples
Controller with DTO Validation and Swagger
// create-user.dto.ts
import { IsEmail, IsString, MinLength } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class CreateUserDto {
@ApiProperty({ example: 'user@example.com' })
@IsEmail()
email: string;
@ApiProperty({ example: '<password>', minLength: 8 })
@IsString()
@MinLength(8)
password: string;
}
// users.controller.ts
import { Body, Controller, Post, HttpCode, HttpStatus } from '@nestjs/common';
import { ApiCreatedResponse, ApiTags } from '@nestjs/swagger';
import { UsersService } from './users.service';
import { CreateUserDto } from './dto/create-user.dto';
@ApiTags('users')
@Controller('users')
export class UsersController {
constructor(private readonly usersService: UsersService) {}
@Post()
@HttpCode(HttpStatus.CREATED)
@ApiCreatedResponse({ description: 'User created successfully.' })
create(@Body() createUserDto: CreateUserDto) {
return this.usersService.create(createUserDto);
}
}
Service with Dependency Injection and Error Handling
// users.service.ts
import { Injectable, ConflictException, NotFoundException } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { User } from './entities/user.entity';
import { CreateUserDto } from './dto/create-user.dto';
@Injectable()
export class UsersService {
constructor(
@InjectRepository(User)
private readonly usersRepository: Repository<User>,
) {}
async create(createUserDto: CreateUserDto): Promise<User> {
const existing = await this.usersRepository.findOneBy({ email: createUserDto.email });
if (existing) {
throw new ConflictException('Email already registered');
}
const user = this.usersRepository.create(createUserDto);
return this.usersRepository.save(user);
}
async findOne(id: number): Promise<User> {
const user = await this.usersRepository.findOneBy({ id });
if (!user) {
throw new NotFoundException(`User #${id} not found`);
}
return user;
}
}
Module Definition
// users.module.ts
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UsersController } from './users.controller';
import { UsersService } from './users.service';
import { User } from './entities/user.entity';
@Module({
imports: [TypeOrmModule.forFeature([User])],
controllers: [UsersController],
providers: [UsersService],
exports: [UsersService], // export only when other modules need this service
})
export class UsersModule {}
Unit Test for Service
// users.service.spec.ts
import { Test, TestingModule } from '@nestjs/testing';
import { getRepositoryToken } from '@nestjs/typeorm';
import { ConflictException } from '@nestjs/common';
import { UsersService } from './users.service';
import { User } from './entities/user.entity';
const mockRepo = {
findOneBy: jest.fn(),
create: jest.fn(),
save: jest.fn(),
};
describe('UsersService', () => {
let service: UsersService;
beforeEach(async () => {
const module: TestingModule
자주 묻는 질문
입력은 어떻게 확인하나요?
class-validator와 검증 파이프를 사용하는 DTO로 확인합니다.
NestJS 앱은 어떻게 테스트하나요?
서비스에는 단위 테스트를, 컨트롤러에는 종단 간 테스트를 작성합니다.
Express에서 옮기는 것도 도울 수 있나요?
네. Express.js에서 NestJS로 옮기는 안내가 포함되어 있습니다.
상세 정보
작성자의 원본 설명
Creates and configures NestJS modules, controllers, services, DTOs, guards, and interceptors for enterprise-grade TypeScript backend applications. Use when building NestJS REST APIs or GraphQL services, implementing dependency injection, scaffolding modular architecture, adding JWT/Passport authentication, integrating TypeORM or Prisma, or working with .module.ts, .controller.ts, and .service.ts files. Invoke for guards, interceptors, pipes, validation, Swagger documentation, and unit/E2E testing in NestJS projects.
repo: Jeffallan/claude-skills
인기도
- GitHub 스타
- 12k
- 순위
- #11440
- 라이선스
- MIT
- 업데이트
- 2026. 10. 30.
댓글
- …
이 저장소의 다른 스킬
angular-architect
12k에이전트가 독립형 컴포넌트, 지연 로딩 라우팅, NgRx 상태 관리, RxJS 패턴, 성능 최적화를 갖춘 Angular 17 이상 앱을 만들도록 돕습니다.
api-designer
12k에이전트가 REST 또는 GraphQL API를 설계하고 OpenAPI 3.1 명세를 작성하도록 돕습니다. 리소스, 페이지네이션, 오류 형식, 버전 관리 규칙을 포함합니다.
architecture-designer
12k에이전트가 시스템 아키텍처를 설계하고, 패턴과 기술을 비교하며, 각 선택의 이유를 설명하는 ADR을 작성하도록 돕습니다.
atlassian-mcp
12kMCP를 통해 Jira 이슈와 Confluence 페이지를 검색하고 수정하도록 에이전트를 돕습니다. JQL과 CQL 검색, 스프린트, 문서 동기화를 포함합니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.